[jboss-user] [JBoss Portal] - Re: Sharing a data among different browser instances

Antoine_h do-not-reply at jboss.com
Wed Sep 6 12:12:28 EDT 2006


It is because the singleton class is used inside different class loaders.
so there are actually multiple "singleton" working on the plateform.

you have to put it in a lib, as you have done, but also make sure to call the instance from the same class loader.

I would do it using a JMX service of JBoss.
you build a service with your communication class, and get what you want.
At least, the service may only be a factory, that provide to any one calling it the same instance of the singleton.
or more feature as a service.
look at the JMX documentation and tutorials.
and, as an example, look at the code of the CMSPortlet and how it uses the CMSService.

or may be an EJB...

for inter portlet communication, look also for "IPC" in the forum, wiki, and at the Michelle Osmond web pages and proposed library : it works well and do most of the job.
I built a JMX service above this library to access it above multiple war and 'isolated' portlets. The reste is done by the librairy.


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3969791#3969791

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3969791



More information about the jboss-user mailing list