singleton « ejb « Java Enterprise Q&A





1. Share static singletons through EJB's    stackoverflow.com

I'm trying to create a cache in a webservice. For this I've created a new Stateless Bean to provide this cache to other Stateless beans. This cache is simply a static ...

2. How to implement Singleton-like EJB3.0 bean?    stackoverflow.com

I need to implement a simple DAO bean, which also caches data read from the database. This DAO bean is used by stateless beans. Because EJB3.0 doesn't support singleton beans, what would ...

3. ThreadLocal (and Singleton) in EJB Container    stackoverflow.com

I've written an authorization system which relies on objects representing the current user. To simplify programming and increase performance I want to hold those objects in a ThreadLocal after the user ...

4. Java singleton VO class implementing serializable, having default values using getter methods    stackoverflow.com

I have a J2SE application having user threads running in a separate JVM outside JBOSS server. During startup, J2SE invokes a EJB inside jboss, by passing a new object(singleton) of simple JAVA ...

5. How do I write a J2EE/EJB Singleton?    stackoverflow.com

A day ago my application was one EAR, containing one WAR, one EJB JAR, and a couple of utility JAR files. I had a POJO singleton class in one of those ...

6. Can DI frameworks provide singleton scope in EJB app. (varying classloader usage)?    stackoverflow.com

Let's say I want to use an EJB container and I don't know how the container implementation is using classloaders. Now, I want to have in-memory shared state with my ...

7. Static Object in Jboss using EJB3    stackoverflow.com

is it possible to create something like static object using EJB3 in Jboss. in other words i need to create something like a static object using singleton pattern or something like ...

8. Can i make my own Singleton Stateless Bean with EJB 3.0?    stackoverflow.com

Now, with EJB 3.1, we can find the javax.ejb.Singleton annocation that can ensure that this bean is going to be singleton. Is there a way that i can ensure singleton using stateless ...

9. Use singleton EJBs in Eclipse Projects    stackoverflow.com

I just downloaded some days ago the last versions of Eclipse and JBoss, created a SessionBean (EJB3.x) project and now I'm trying to create an Singleton EJB, but eclipse is not ...





10. An EJB singleton as TCP server    stackoverflow.com

I have an EJB, and a web service using it. I would now like to write a simple TCP server as an alternative to the webservice, but I dont want to ...

11. EJB singleton as shared memory?    stackoverflow.com

I wish to ask if you would recommend EJB3.1 singleton beans as storage for application memory shared data. Imagine some simple application that needs to hold data in memory (rather than ...

12. Is it possible to use @WebService, @Stateless and @Singleton altogether in one EJB 3 bean?    stackoverflow.com

I'm using EJB 3 and JBoss AS 6.0.0.Final. I have a stateless session bean with the annotations @Stateless and @WebService. When I add the annotation @Singleton, the deployment is in error ...