how to make an object distributed across multiple jres?
Hi,
We used cache data mechanism for performance tuning. It will store data in static variable (Hashtable) and get initialized when app starts . We are using IPlanet Application Server and
Using 6 KJS engines. This object ( Hashtable) is not distributed across all JRES.It has to reinitialize data again when request goes to any other KJS.
We avoid sharing data in session and request, as data is huge.
Can any one help us how to make this object distributed across all KJSs?
Thanks in advance.
raj
[542 byte] By [
raj_217a] at [2007-9-27 12:46:41]

> We used cache data mechanism for performance tuning.
> It will store data in static variable (Hashtable) and
> get initialized when app starts.
> We are using IPlanet Application Server and
> Using 6 KJS engines. This object ( Hashtable) is not
> distributed across all JRES. It has to reinitialize
> data again when request goes to any other KJS.
> We avoid sharing data in session and request, as data
> is huge.
> Can any one help us how to make this object
> distributed across all KJSs?
When you say 'initialized when app starts' do you mean iPlanets StartUp classes, rather than the Servlets init() ? Given a 'huge' dataset, avoid the latter.
I'd suggest that a better approach is to implement this as an Entity Bean and accessed from Session bean and using Value Objects to return the data subsets.
Checkout the Java Pet Store
http://java.sun.com/blueprints/code/jps13/datasheet.html
Hi Raj,
I am faced with a similar problem. I have multiple JREs on my UNIX server and I am using IPlanet 6.5 application server. Also, I want to store data in a static Hashtable.
Buy unfortunately every JRE will need to instantiate the object.
What I need to do is have my object shared across multiple JREs.
I was wondering whether you can help me by suggesting an approach to this problem.
Thanking you in anticipation.
parag
Hi
Below are my suggestions:
My understanding from your forum is that you wanted to store some common data in the memory so that it can be shared by all the users.
1) If the scope of this data is in the web tier, then... I would suggest you to put the data in the ServletContext object. For this you have to read the data when the application server starts and use setAttribute(.,.) to put the data in the application Context.
2) If the scope of this data is in the ejb tier, and if the data that you are storing in a HashTable is small and related to application
Configuration (e.g. data source name, file path ...etc). Then you can store as environment variables of EJB or use JNDI approach.
Thanks,
Praveen
This is a common problem with a solution called object synchronization. This technology can reliably synchronize
object state across multiple JVMs or across network connections.
Softwired iBus has a good implementation.
--
Jeff <jeffff@runbox.com>
Technical Lead
eBay.com
eBay.com is recruiting for multiple open Java engineering positions.
Email me your resume to be put in contact with a hiring manager.
Principles only.
Hi,
I do not need to store data pertaining to an application that is being run on the app server( using multiple JREs)
Here is what i am trying to achieve;
I have created a JAVA class containing a static Hashtable. This class is being called by all the applications running in the application server( EJB and sevlets). This application server has 6 JREs running.
I am assuming that this class containing the static object will be instantiated on every JRE.
Thus when I read this static object for data i will not get the right object as i will not know from which JRE its coming from.
So I need to define this object in such a way that all the JREs write to it in a synchronous way.
I am not using a EJB or servlet, but it is a plain JAVA class.
I hope i have provided clarity to my problem.
Thanks for the help.
Parag