Hi everybody, 

I have spent the last few days pondering and working on some EJB 
related stuff, without getting where I wanted to. Now a friend
helped me out, but I do not know, if the proposed thing is a
good solution or not.

I am in need of something like a local context, into which
I can store data, for shared Access by several of my Beans. 
The idea is to query the database for some parameters, calculate 
the result from this data, and store this data for a certain 
period of time within the jvm.

Actually it sounds like the ideal job for a session bean, but the
data should be accessible by several beans of my business logic, 
and not just one client.

The approach suggested by a friend of mine seems to be plausible,
though I do not know, whether it is permissible. I have created
a stateless session bean, which in turn accesses static methods,
of a class, which in turn has a static field, which acts as
Singleton, into which, and from which I can take the data I need.

If the data is not within the context, it can be requeried and
recalculated, as the need arises. Thus I have a local cache, which
is neither passivated, and which I can access from any beans
within the same jvm.

What I would like to ask now, are there reasons not to go with
this solution. Are there other solutions, to achieve the same
result?

--------------
Another thing, though not that important to me, 
a different thing that I have tried, but which I did not get to
work, was to put an RMI Object into the JNDI, which would be done
at start up time, via a MBean. But I failed to accomplish this,
and fear that this is beyond my skills for the time being.
RMI Server runs ok, by itself, but when I try to instantiate it
and bind it from the MBean I get a NoSuchObjectException when I 
try to access it from a client. If anyone happened to have done this
already, I would of course be interested to know what I did wrong.

Thanks in advance
Robert Herzig

----------------------------------------------------
 Diese Nachricht wurde �ber tower media 1 gesendet
Ihre 1. Adresse zum Kommunizieren: http://www.tm1.at

_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to