• Post Reply Bookmark Topic Watch Topic
  • New Topic

What exactly is the difference between EJB Object,component, container, application  RSS feed

 
Hemal Mehta
Ranch Hand
Posts: 101
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What exactly is the difference between EJB Object,component, container, application and java beans. can anyone explain with an example.
Thanks
 
Suneel Setlur
Ranch Hand
Posts: 202
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Hemal
EJB object is a distributed object that extends the remote interface of the bean you have created there by extending all methods and behaviour of the javax.ejb.EJBObject(this is on the server side). The EJB object works with the container to give the facilities of transaction,security, pooling and all other system level operations of the bean at runtime.
EJB or the bean deployed is a serverside component implementing business methods(logic)
Container is where you store and deploy your EJB(vendor dependant) which provides you the system level operations.
So there exists contract between EJB & Container
Container & Server

Client & Container

Java beans are visually manipulated re-usable client side components. They are in-process components.
Hope it helps

------------------
Suneel
 
Hemal Mehta
Ranch Hand
Posts: 101
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Suneel,
Thanks for the reply. However I have some more doubts.
EJB and bean is different right. I understand that EJB is a set of specifications whihc governs transaction server development technology. While beasn is a reusable softare component, so I am nit sure if they could be used in the same context.
Also you said Java beans are visually manipulated re-usable client side components. They are in-process components: What exactly does this mean, I though they are always server side components.
Thanks for your help.
Hemal
 
Suneel Setlur
Ranch Hand
Posts: 202
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Hemal
EJB is a specification.Sun Micro came out with the specification of EJB so that the programmer could concentrate on the business logic(client requirement) instead of also worrying about all the system level services(Persistance,pooling,security concurency etc). According to the specs all these services would be provided by the container(vendor specific).
The EJB(Enterprise Java Bean) is a server side component and this contains methods for your business logic.
On the otherhand there are Java Beans which are entirely different from EJBs. They are, as I mentioned,visually manipulated re-usable client side components. However, Java beans' functionality has been increased with its introduction in server side programming in JSPs.
When I mean in-process, the component works in the environs from where it has been called that is on the clientside and they form a part of the process.
Whereas EJBs are out of process meaning that they do not necessarily execute within the confines of the calling program.
Suneel
[This message has been edited by Suneel Setlur (edited February 07, 2001).]
 
Hemal Mehta
Ranch Hand
Posts: 101
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your reply Suneel.
 
Giri Kosuru
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Hemal,
In your last reply you said that "They are, as I mentioned,visually manipulated re-usable client side components." regarding Java Beans.
In addition a Java Bean can be a server-side component also.
You can write a JavaBean for accessing database and use it in a IDE tool as a reusable java component.This is not EJB but pure JavaBean.So here the trick is that , not just client side reusable component but component which can be re used in a IDE tool.I hope this helps.
Giri Kosuru.

 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!