Solved

J2ee designing questions in terms of EJB

Posted on 2006-07-12
4
231 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
Suggested Courses

634 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