Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Tricky question (How to pass javax.ejb.Handle)

 
Qand Davaatsedev
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a J2EE project which has two WARs and one EJB JAR.
The only EJB is a stateful session bean which was created
to maintain client state (according to Java Blueprints best
practices). To be able to access this stateful
bean I have to pass javax.ejb.Handle object from one web module
to another.
The question is how can I do it? If there exist some easy way to
pass this object between two web modules, then why do I need the
stateful session bean?
 
Pradeep bhatt
Ranch Hand
Posts: 8927
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Put the handle in a location that both web modules can access.
 
Qand Davaatsedev
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I can put the client state there as well.
What's the point to store client state in a SFSB then?
 
Pradeep bhatt
Ranch Hand
Posts: 8927
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
SFSB are not shared. They can be thought of as logical extension of the client but running on an EJB container. EJB container provides tx,security support.

Originally posted by Qand Davaatsedev:
I can put the client state there as well.
What's the point to store client state in a SFSB then?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic