Re: [Resin-interest] Duplicate singletons
Jeff Schnitzer wrote: There seems to still be a problem with singletons exposed as hessian services. I can create a test project if necessary, but I'm seeing this behavior in two separate applications: 1) Create a @Singleton bean 2) Give the bean a @Startup @PostConstruct method that initializes some data 3) Give the bean a @HessianService annotation 4) Call the bean via hessian 5) Observe that the data isn't initialized Is this javax.ejb.Singleton or javax.inject.Singleton? (I still can't believe the JavaEE spec allows that confusion.) I've filed it as http://bugs.caucho.com/view.php?id=4175 This was a problem long ago in 4.0.0 (with the equivalent annotations at the time) but I thought it was fixed sometime later. I could be wrong about that though. The old workaround was to have the hessian endpoint on a different bean which itself injects the singleton. Because of all the spec changes and some big internal changes we needed to make to pass the TCK, it's very possible that fix no longer applies. -- Scott Jeff ___ resin-interest mailing list resin-interest@caucho.com http://maillist.caucho.com/mailman/listinfo/resin-interest ___ resin-interest mailing list resin-interest@caucho.com http://maillist.caucho.com/mailman/listinfo/resin-interest
Re: [Resin-interest] Duplicate singletons
On Wed, Aug 11, 2010 at 1:08 PM, Scott Ferguson f...@caucho.com wrote: Jeff Schnitzer wrote: There seems to still be a problem with singletons exposed as hessian services. I can create a test project if necessary, but I'm seeing this behavior in two separate applications: 1) Create a @Singleton bean 2) Give the bean a @Startup @PostConstruct method that initializes some data 3) Give the bean a @HessianService annotation 4) Call the bean via hessian 5) Observe that the data isn't initialized Is this javax.ejb.Singleton or javax.inject.Singleton? (I still can't believe the JavaEE spec allows that confusion.) I'm using javax.inject.Singleton. FWIW javax.ejb.Singleton doesn't seem to register beans with the manager. I don't know if that's correct or not. I've filed it as http://bugs.caucho.com/view.php?id=4175 Cool. Jeff ___ resin-interest mailing list resin-interest@caucho.com http://maillist.caucho.com/mailman/listinfo/resin-interest
[Resin-interest] Duplicate singletons
There seems to still be a problem with singletons exposed as hessian services. I can create a test project if necessary, but I'm seeing this behavior in two separate applications: 1) Create a @Singleton bean 2) Give the bean a @Startup @PostConstruct method that initializes some data 3) Give the bean a @HessianService annotation 4) Call the bean via hessian 5) Observe that the data isn't initialized This was a problem long ago in 4.0.0 (with the equivalent annotations at the time) but I thought it was fixed sometime later. I could be wrong about that though. The old workaround was to have the hessian endpoint on a different bean which itself injects the singleton. Jeff ___ resin-interest mailing list resin-interest@caucho.com http://maillist.caucho.com/mailman/listinfo/resin-interest