stateless-session-beans

EJB3 Caching Instance Variables

Hi, I've noticed some strange code on a project I am working on - its a SLSB EJB3, and it uses a private instance variable to maintain a cache of data (it even calls it dataCache or something), with a getter/setter. For EJB2 and bellow, this was a typical EJB antipattern - SLSBs are not meant to retain state in between invocations, ther...

JSF + Stateless EJB performance

Hey there, I have a JSF 2.0 application running on GlassFish v3. It has EJBs that serve database data via JPA for the main applications sessions. Even on non-IDE app-server, the EJB calls are very slow. Between some pages, the user has to wait over 10 seconds to get to the next page. The EJB runs on the same application server, and onl...

Can i make my own Singleton Stateless Bean with EJB 3.0 ?

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 beans in EJB 3.0 with some modifications in my code (use of the keyword static, or other way to do that....) ...

How to remove EJB2.1 Stateless session bean

Greetings all, I have a question: How to remove an EJB session bean (especially Stateless beans) ? There's of course remove() method, however it cannot be called while the session object is in transaction i.e. session bean A is called by another session bean B in it's business method. ...

How to acccess an EJB ?

Hi, I am trying to develop a Basic EJB3 application on JBOSS 4.2 in Eclipse I have created an EJB project in eclipse. The following are my remote and local interfaces. package com.test; import javax.ejb.Local; @Local public interface HelloWorldLocal { public String getGreeting(); } package com.test; import javax.ejb.Remote; @R...