Skip to main content

How to create a @Singleton bean that implements a WebService...

Please note these forums are being decommissioned and use the new and improved forums at
1 reply [Last post]
Joined: 2011-03-21

I want to convert my webservice which is @WebService;@Stateless implementation into a @Singleton bean but when i add in the @Singleton annotation and deploy glassfish flags a severe error: Annotations processing failed for...

so i tried removing the webservice/stateless and replaced it with the @Singleton annotation but now it does not appear to deploy as a webservice at all. I have an interface that is marked up with @WebService and @WebMethod and this new @Singleton class implements it...

Any advice or help is greately appreciated.

below are some links which led me to believe Singleton beans can be used in the manner i'm trying to use them.

"Singleton session beans offer similar functionality to stateless session beans but differ from them in that there is only one singleton session bean per application, as opposed to a pool of stateless session beans, any of which may respond to a client request. Like stateless session beans, singleton session beans can implement web service endpoints."

James Chan

SingletonWebServiceCompatibility.PNG14.64 KB

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2011-03-21