I am having an issue with Geronimo and memory. First, this could be a configuration issue or a memory leak. Here is what happens.
· When we build java objects, we deploy to the Geronimo application server.
· We then run Junit tests to test the remote interface and bring back data objects
· Most of the time, this works without a hitch. However, after a while (say a good week or so) everything will break and say that we are out of memory (perm size)
I know that one on the actions that can be taken is to update the perm size. First question is to how to do this correctly for Geronimo? Second, what is the ideal perm size (if there is one) for Geronimo.
The other idea is that there could be a memory leak. My objects are basic data objects and we are using the entity manager from the container to access the data. Is there something that needs to be released after I make the database calls? Here is an example of the code that I have:
public class Faction implements IFactionRemote
@PersistenceContext(unitName = "domain.ecommerce")
private EntityManager m_em;
private ILoggerLocal m_logger;
private IEntityEmdsLocal m_emdsEntity;
* Default constructor.
* Returns an MDS Entity Group
* @param EntityId
* @param BusinessType
* @return EmdsEnity - MDS Group Entity
public EmdsEntity ReturnGroup(String EntityId, String BusinessType)
PkEntity oKey = new PkEntity();
EmdsEntity oEntity = null;
oEntity = this.m_emdsEntity.ReturnEntity(oKey);
this.m_logger.error("Faction error: ", ex);
Is there anything that I need to be doing to the EntityManager or other EJB’s to release the resources? Do I explicitly set the entity manager to null? Any help that you can give me will be greatly appreciated.
Sr. Software Engineer
McLane Advanced Technology