0

We have a class, Foo, which is a singleton and inherits from Thread. We were having some issues after redeploy where it seemed like 2 of these threads might be running. I added some print statements to retrieve the ClassLoader every time Foo woke up from sleep. The prints indicate that in fact another instance of the class has been created with a different ClassLoader.

I don't know if it is relevant, but Foo always gets created via Foo::instance for the first time via a Session Bean. Foo is meant to run as a service to take care of DB sanitization.

Thanks

foobar1234
  • 91
  • 1

1 Answers1

0

Apparently there are 2 redeploy methods. It seems that both of them will continue to let the old application run until it is no longer servicing requests. The 2 methods vary only in how they go about removing the application. The method we're using keeps the old application running completely and uses different class loaders to load the new app. Our old application was not being undeployed. That being said, if you are running a thread somewhere that wasn't explicitly terminated (which turned out to be the case), you will potentially have 2 instances of the same class loaded via different class loaders executing simultaneously. Running threads that Weblogic doesn't have a death-grip on is considered bad practice and unsafe. Now I know why.

foobar1234
  • 91
  • 1