• Post Reply Bookmark Topic Watch Topic
  • New Topic

basic high level question

 
Fred Close
Ranch Hand
Posts: 42
Mac
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I'm quite new to J2EE, EJB and all the Java Server side. I assume I could easily find an answer in some books or on the net ...
- can a container contain more than one EJB ?
- I understood that EJB are only accessible thanks 2 interfaces that are associated to them ... it is for a request that comes from the web but is it also true for a request from an object that is on the same layer i.e. can an object make a direct call to an EJB ?
 
Mike Curwen
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
first question: A container can ( and frequently does ) contain more than one EJB.

second question: If you mean 'can ejb's use one another?' the answer is yes. But they still cannot use them 'directly'. They must obtain a reference just like a client program/applet/servlet. If you download the J2SDKEE, you will find a tutorial that has an example of beans that use other beans.
 
Cundra Mundra
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, now I am a bit confused. What I know, EJB is a class or object, most likely used for implementing a business logic on server.
JB (JavaBeans) are components that a developer can build and these components are used to build UI, and so are plugged into containers.
Can you clear this one further for me? Thank you.
 
Vishakha Ahuja
Ranch Hand
Posts: 191
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
EJB is a class or object, most likely used for implementing a business logic on server.
JB (JavaBeans) are components that a developer can build and these components are used to build UI, and so are plugged into containers.

I think you got EJB mixed up with javabeans. They are different other than the similar names.
<cite>The Enterprise JavaBeans (EJB) architecture is a server-side technology for developing and deploying components
containing the business logic of an enterprise application.</cite>
 
Rahul Mahindrakar
Ranch Hand
Posts: 1869
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

- can a container contain more than one EJB ?

The answer is defenetly Yes. a container can contain more than one EJB just like a web container can contain more than one servlet.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!