Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > get and set Attribute for EJB Context (Storing objects)

Reply
Thread Tools

get and set Attribute for EJB Context (Storing objects)

 
 
JehanNYNJ@aol.com
Guest
Posts: n/a
 
      12-08-2004
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.

 
Reply With Quote
 
 
 
 
Michael Borgwardt
Guest
Posts: n/a
 
      12-08-2004
http://www.velocityreviews.com/forums/(E-Mail Removed) wrote:

> 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.
 
Reply With Quote
 
 
 
 
Collin VanDyck
Guest
Posts: n/a
 
      12-08-2004
(E-Mail Removed) wrote:
> 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?

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Possible to generate "ejb-jar.xml" from EJB class (source)? "ejb-jar.xml" appserver independent? Raymond Schanks Java 0 08-03-2010 08:21 AM
ejb.xml and ejb-jar.xml ....are these same ? gk Java 2 10-23-2006 06:41 PM
To EJB or not to EJB Jeremy Haile Java 5 09-10-2003 03:52 AM
EJB on Weblogic7 : accessing Ejb thru *Local interface* fails due to JNDI lookup Mumbai Joe Java 0 07-29-2003 04:16 PM
Dynamically Access & Call An EJB From Another EJB? Steve Java 1 07-15-2003 06:47 PM



Advertisments