i was wondering how can we share objects.......


General J2EE: i was wondering how can we share objects.......

  1. i was wondering how can we share objects....... (3 messages)

    i was wondering how can we share objects between two web modules (web application) so that the objects can be made avaliable to all web modules running in perticular application server

    Eg . Suppose we have a webmodule handling only the login tasks
    and stores all logged user in a serializable object

       Now how can we actually access that object, of logged user,in diferent web module

    Is is possible in tomcat???

    Is it possible to store all info in flat file and then gain the access???
    Can all info of logged user can be stored in database table???
    Is there some simple way????

    Can it be done using any different server???


    Threaded Messages (3)

  2. Sure You Can[ Go to top ]

    well ... codes that u wanna be shared between more than one module should be written as stand alone java code zipped as Jar and depolyes within (lib) folder of your application server .. as for tomcat it should be deployes as for example login.jar under %Tomcat path%/common/lib.

    Now you can import whatever class u may need from such standlone code inside any of your web module.

    Hope i do well explaining such view. :)
  3. Sure You Can[ Go to top ]

    Its not like that....
    Suppose an runtime object like an session object is to be shared by different web modules then ....
    Is it possible....
  4. On WebSphere 5.1.X (WPS 5.1), I use the DistributedMap service to share data between different portlets (running in different war files)..

    It's basically a global HashMap service..

    Does your AppServer support some sort of Distributed Cache? If not, you can probably take a look at Tangosol Coherence, or one of the opensource cluster caching products..

    I believe JBoss 3.2.6+ also has a distributed cache service..