• Post Reply Bookmark Topic Watch Topic
  • New Topic

how the session bean and remote interface are communicated without implementing in definition  RSS feed

 
Sampath Uppula
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
when creating the session bean we are not implementing the remote interface but implementing the methods of it.
how the container will know it..

please explain.
 
Jonh Smith
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I take you are in ejb 2.1 and want to know how the container makes its job.

several ways are possible based on the information about the bean class you provide in the deployment descriptor:

composition : something along the lines of http://en.wikipedia.org/wiki/Proxy_pattern
inheritance (the actual container bean inherits from your bean and delegates the strictly business part to your bean's methods.)
aspect weaving (the container services are weaved into your code)

They all end up providing the same : surrounding your business logic with a set of services configurable in a declarative way.

 
Sampath Uppula
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jonh Smith wrote:I take you are in ejb 2.1 and want to know how the container makes its job.

several ways are possible based on the information about the bean class you provide in the deployment descriptor:

composition : something along the lines of http://en.wikipedia.org/wiki/Proxy_pattern
inheritance (the actual container bean inherits from your bean and delegates the strictly business part to your bean's methods.)
aspect weaving (the container services are weaved into your code)

They all end up providing the same : surrounding your business logic with a set of services configurable in a declarative way.



Thanks for the explanation, i have learned a new pattern based on this.
so based on the information provided in the ejb-jar.xml file, container will be communicated and validated the implementation.
 
Jonh Smith
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yep. the dd is where you tell the container what class implements what interface. the container then does its job using one of the mentioned mechanisms.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!