Logo 
Search:

Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

Problem with singleton pattern in weblogic

  Asked By: Robert    Date: Jun 14    Category: Java    Views: 1192
  

I work with weblogic
I deploy 2 module (A war module and an ejb module in
weblogic) I write a singleton class in 2 module
When I get an instance in 2 module, they are differ
with them. What I replace with this singleton class ?

Share: 

 

1 Answer Found

 
Answer #1    Answered By: Ethan Evans     Answered On: Jun 14

I guess that behavior is correct, because you are deploying singleton  class in different modules. Unless you follow a pattern  like

java.sun.com/.../ServiceLocator.html

This is completely dependent on how you deploy  it and how you manage the clustering, but the class  itself is still a singleton. In an framework environment such as J2EE containers, you need to look at ways of deployment as well as the pattern you are following.

Yet, I would like to get others opinions too.

 
Didn't find what you were looking for? Find more on Problem with singleton pattern in weblogic Or get search suggestion and latest updates.




Tagged: