get and set Attribute for EJB Context (Storing objects)

J

JehanNYNJ

Are there any methods like getAttribute and setAttribute off the EJB
Context object like there is for Servlet context?

Currently I did not see any in the API. How then are we supposed to
store objects that we want to exist for the life of the app server and
to be accesible by our beans?

Thanks for any suggestions.
 
M

Michael Borgwardt

Are there any methods like getAttribute and setAttribute off the EJB
Context object like there is for Servlet context?
Nope.

Currently I did not see any in the API. How then are we supposed to
store objects that we want to exist for the life of the app server and
to be accesible by our beans?

Not at all. Such objects would not be compatible with the concept of EJBs,
which includes clustering.

You have to use entity beans for such purposes.
 
C

Collin VanDyck

Are there any methods like getAttribute and setAttribute off the EJB
Context object like there is for Servlet context?

Currently I did not see any in the API. How then are we supposed to
store objects that we want to exist for the life of the app server and
to be accesible by our beans?

Thanks for any suggestions.

Could you use JNDI to store and lookup the objects like you would a
DataSource?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,898
Latest member
BlairH7607

Latest Threads

Top