EE application- web application?
Hi all,
iam about to code a web applciation(Appointment system).
It will requie a database, email reminders, and JSP pages. I am not familirar with this Enterprise structure for creating applciations. However for some reason I feel that I am supposed to be using EjB for this.
I have 3 different netbean tutuorials that show how to connect to a DB but I'm confused as to which is more suitable:
1) http://www.netbeans.org/kb/55/mysql-webapp.html
2) http://www.netbeans.org/kb/55/ejb30.html
3) http://www.netbeans.org/kb/55/persistence.html
I am confused, which one is right for this aplication and why. Please help me
Thanks
# 1
Hi,
I think that if you want to build an application using multi layer, you can learn all those tutorial.
For presentation layer, you will get more information from the first tutorial.
For bussiness logic layer, you will get more information from the second one. And for object-relational layer, you will get from the third one.
thanks
daniel
# 3
Session EJB is a good choice when your application has significant security and transactional requirements. By using Session EJB you can effectively utilize the declarative security and transactional features of an application server. This will reduce the amount of service-level code that needs to be written and will free up time for coding the business functionality.
If your requirements have significant security and transactional requirements and you decide to handle these service-level aspects programmatically, it will decrease the amount of time for programming the business functionality.
Declarative security reqs. and transaction management are the major deciding factors for making an EJB design decision.
# 5
I'd suggest you use EJB 3.0. I've found it to be easy to use and fast enough (depending on how you configure it). Then you can use cacheable session beans to access this data, and servlets as controllers, and JSPs and your view. Simple MVC. It's extensible too. But definately EJB 3.0.
# 6
The EJB tutorial (http://www.netbeans.org/kb/55/ejb30.html)
uses a Message-driven beanbean. I understand that they are used for processing messages asynchronously. But when would this be needed in application? Please can anyone give an example applciation when this would be neede as oppose to the normal session bean. I am not sure if I it would be needed in my appointment system or if I only need to use the regular session bean.
I am new with this technology so any help would be be so appreciated
Thanks
Message was edited by:
Scientist2
# 7
Hi,
I think it depends on your requirement on your application.
Example ( I know it is bad application but I just want to give an overview), The client need to send the request to server and it needs the data on that request is stored in database. The client doesn't need to know anything about the process. It just send the request and continue to do next task. For that requirement, we can consider to use Message driven bean instead of Session Bean.
However, if the client need to process the result from that process, you can consider to use Session Bean instead of Message driven bean.
Hope this help. Correct me if I am wrong.
thanks
daniel
# 8
So for the record:
If I am simply adding something from eg a JSP page, into a database and I dont need the dataabse to return anything to the jsp page, then I should use a Message driven bean?
If iam quering the database eg for user account details, and I want the result displayed on the jsp page, I should use a Session bean?
Is this correct?