Solved

J2ee designing questions in terms of EJB

Posted on 2006-07-12
4
227 Views
Last Modified: 2013-11-24
Hi Experts,

while I was reading some of the articles about J2ee and EJB, I had these questions.

* Is web application that was developed in Struts frame always J2ee?

* When developers are designing J2ee web app, EJB is always necessary?

* In order to separate functionality of application components among session beans, entity beans and MDBs, what are things that they consider?

thanks in advance,
0
Comment
Question by:dkim18
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 16

Accepted Solution

by:
suprapto45 earned 200 total points
ID: 17096079
>>"Is web application that was developed in Struts frame always J2ee?"
Yes it is. Struts is basically the J2EE framework so if the web application is using Struts, it must be in J2EE. Additionally, only J2EE App Server can run Struts.

>>"When developers are designing J2ee web app, EJB is always necessary? "
Not necessarily. EJB may be powerful but it also took a lot of memory as well as high learning curves. The lighter alternative is now preferred such as Hibernate or etc.

>>"In order to separate functionality of application components among session beans, entity beans and MDBs, what are things that they consider?"
Firstly, normally, sessions beans are always the place where you locate all your business logics. All the complicated and complex things are located there. Entity Bean will only be the representation of your table in database so it just helps you in persisting the data to and from database. MDB plays a different role. It helps you in sending the message to another system. Normally, the session beans will call the MDB to send some messages such as email to the SMTP Server or etc.

I hope that helps
David
0
 
LVL 10

Assisted Solution

by:mukundha_expert
mukundha_expert earned 100 total points
ID: 17096975
>>* In order to separate functionality of application components among session beans, entity beans and MDBs, what >> are things that they consider?

Remember,

Data represention --> Entity Beans
Business Logic --> Session Bean
Communication with other system --> MDB

Business Logic in turn can be logic that depends on the previous state ( stateful session ) and that do not depend on previous state (statless session)
So we have stateful session Bean and stateless session bean.
Depending on your business requirements you can decide on which type of session bean to use.

One more thing to consider here is scalability,
Stateless session beans are more scalable than stateful session beans ( obvious thing ).

Entity beans are used to represent data. the persistence can be either Container managed ( container will take of persistence of data ) or Bean managed ( programmer has to take care of persistence ).

first seperate the application components into components that represent data and that do business logic and that communicate with othersystems,

for data decide on which type of persistence you are going to use
for business logic based on the scenario decide between the stateful and stateless session beans. ( an application can have both the stateless and stateful session beans, stateful session beans can use some functionality of the stateless session beans).


0
 
LVL 10

Expert Comment

by:mukundha_expert
ID: 17096984
>>* When developers are designing J2ee web app, EJB is always necessary?

No. it depends on your application. you need EJB only if the application needs it. if you can develop more scalable application without using EJB then you might prefer not to use EJB's.

0
 
LVL 6

Assisted Solution

by:valipotor
valipotor earned 100 total points
ID: 17334411
1. Actually, Struts is not a part of J2EE, it makes use of J2EE components. JSP & JSF are part of J2EE.
2. EJB is not always necessary. They provide extra services as Security, load balancing, trasactions, etc.
3. Here is a usefull link:
http://www.phptr.com/articles/article.asp?p=31937&seqNum=3&rl=1.

valipotor
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.
Suggested Courses

710 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question