Win a copy of Micro Frontends in Action this week in the Server-Side JavaScript and NodeJS forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

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

 
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?
 
Ranch Hand
Posts: 8943
Firefox Browser Spring Java
  • 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: 8943
Firefox Browser Spring Java
  • 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?

 
Poop goes in a willow feeder. Wipe with this tiny ad:
the value of filler advertising in 2020
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic