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

[711 byte] By [Scientist2a] at [2007-11-27 8:03:29]
# 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

java4every1a at 2007-7-12 19:45:37 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 2
Yes but what method would you use to code this system. I lean towards thed first method because I am not used to ejb, but isn't the first way out of date for today? How do you know when to use ejb as oppose to the first method?
Scientist2a at 2007-7-12 19:45:37 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 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.

GhostRadioTwoa at 2007-7-12 19:45:37 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 4
1) Just wondered what message beans are for eg of application that they are needed? 2) Do I need them for this application ie Appointment system?
Scientist2a at 2007-7-12 19:45:37 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 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.
prideafricaa at 2007-7-12 19:45:37 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 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

Scientist2a at 2007-7-12 19:45:37 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 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

java4every1a at 2007-7-12 19:45:37 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 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?

Scientist2a at 2007-7-12 19:45:37 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 9

Use session beans in both cases. Asynchronous messaging is used when you want to send messages to different listeners where the listeners may be many or the single listener doesn't need to receive the parameters in the message instantly, neither does it need to reply. Messaging may also be synchronous.

tobiassen666a at 2007-7-12 19:45:37 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 10
Ok for my application you suggest i use session beans,Thank you. However I am a little confused with your explanation for Asynchronous messaging. Could youy give an example through an common application please.
Scientist2a at 2007-7-12 19:45:37 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...