• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

WebLogic 9.2 clustering problem

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello all,

I have deployed a web application on weblogic 9.2mp3 in a clustering environment, my application supports clustering, in a mean that everything I set in the session is serializable and I use session.setAttribute() to set objects in the session, I have three servers and a proxy, when I access the application from the proxy everything is fine, suppose that I'm connecting now to Server1, if Server1 crashes, then it's supposed that the next request will be passed to another server from the proxy, this is what is happening, but the problem is that when Server1 crashes, the session becomes invalid and a new session is created and the request is redirected to the login page, can any one help me please? does server shut down causes session to be destroyed some how?if yes, then this is wrong and should not behave in this way, does anyone know how to prevent the session from being destroyed when one of the servers crashes???


Thanks
 
Ranch Hand
Posts: 826
Eclipse IDE Oracle Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Bassam,

As per my understanding, you have your managed servers in a cluster. You want the failover to happen with the sessions replicated.

How many servers do you have in the cluster?

For session replications to happen, you need session replication. This can be achieved through in-memory session replication, file persistence store or jdbc persistence store.

These techniques will save a copy of the sessions in the memory(JVM) or a file or JDBC can be used to achieve this.

Hope this helps.

Please revert in case of any queries!
 
Bassam Shamekh
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi sudipto shekhar,

Thank you for your reply, I use in-memory replication, session replication is happening fine, I know that because I can keep track to which server the user is connected in a given time, when the current server is overloaded, my proxy redirects the user to another server successfully without the need to log in again, but this does not happen if the current server crash(which should for sure).

I have three servers and a proxy, the configuration I did for weblogic is correct, but don't know what is missing that is causing this problem.
 
sudipto shekhar
Ranch Hand
Posts: 826
Eclipse IDE Oracle Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Bassam Shamekh wrote: but this does not happen if the current server crash(which should for sure).



Could you please elaborate a little more on this?

I mean when is session replication not happening.... I did not get the exact cause! M sorry for that
 
Bassam Shamekh
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
suppose that the user is currently connected to server1, some data concerning the user is set on the session(and the data is sreilizable), the session should be replicated to other servers meanwhile, suppose that the current session id is XXX, server1 crashes, so the next request will be passed by the proxy to server2 or server3, suppose the request was passed to server2, in server2 the session id must be exactly the same as the one that was in server1 and all the data that I set on the old session should be available for server2 when asking for those data, but what is happening is that the session id on server2 is different, the server for some reason created another session, the original session was not replicated to server2.
 
sudipto shekhar
Ranch Hand
Posts: 826
Eclipse IDE Oracle Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Bassam,

So when the request is being served by server1, and at that point of time if the same server i.e server1 goes down, your session replication does not happen.

Could you please show the weblogic.xml file?

To be specific, please let us know what is the value for the persistent-store-type under, as following:

<session-descriptor>
<persistent-store-type>?</persistent-store-type>
</session-descriptor>

Thanks
 
Bassam Shamekh
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is what I have in my weblogic.xml

<wls:session-descriptor>
<wls:persistent-store-type>
replicated_if_clustered
</wls:persistent-store-type>
</wls:session-descriptor>

Thank you for having time to reply, I really appreciate it, I'm beginning to lose hope on this
 
sudipto shekhar
Ranch Hand
Posts: 826
Eclipse IDE Oracle Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
try replicated....

<persistent-store-type>replicated</persistent-store-type>


And you are always welcome!
 
Bassam Shamekh
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
didn't work my friend, I still have the same problem
 
sudipto shekhar
Ranch Hand
Posts: 826
Eclipse IDE Oracle Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Just to isolate the issue, have you tried session replication by file persistent store?

Please let us know!
 
Bassam Shamekh
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

No I didn't
 
sudipto shekhar
Ranch Hand
Posts: 826
Eclipse IDE Oracle Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Here is the tag to do so.

<session-descriptor>
<persistent-store-type>file</persistent-store-type>
<persistent-store-dir>D:\sudipto\BEA_sud\BEA10.3.2\session_rep.rep</persistent-store-dir>
</session-descriptor>


Try it out to see if the replication works with this..

The file session_rep.rep should be in a shared location so that all the servers can have an access to it.

Please try this and let me know....
 
Bassam Shamekh
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Did not work
 
sudipto shekhar
Ranch Hand
Posts: 826
Eclipse IDE Oracle Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can you please paste the weblogic.xml file for me?
 
Bassam Shamekh
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is what I have in my weblogic.xml file, which I have in my WEB-INF folder of my application:


 
sudipto shekhar
Ranch Hand
Posts: 826
Eclipse IDE Oracle Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sorry for the late reply......

Are you sure this did not work? Or has it worked now??

sudipto shekhar wrote:Here is the tag to do so.

<session-descriptor>
<persistent-store-type>file</persistent-store-type>
<persistent-store-dir>D:\sudipto\BEA_sud\BEA10.3.2\session_rep.rep</persistent-store-dir>
</session-descriptor>


Try it out to see if the replication works with this..

The file session_rep.rep should be in a shared location so that all the servers can have an access to it.

Please try this and let me know....



 
Bassam Shamekh
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have tried this before and it did not work.

and really thank you a lot for having time to reply
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic