Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

J2ee designing questions in terms of EJB

Posted on 2006-07-12
4
Medium Priority
?
237 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 800 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 400 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 400 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

Build and deliver software with DevOps

A digital transformation requires faster time to market, shorter software development lifecycles, and the ability to adapt rapidly to changing customer demands. DevOps provides the solution.

Question has a verified solution.

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

For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
In this post we will learn different types of Android Layout and some basics of an Android App.
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
Suggested Courses

688 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