[jboss-user] [jBPM] - Outofmemory exception when using jbpm api

roxy1987 do-not-reply at jboss.com
Wed Jul 11 02:23:22 EDT 2012


roxy1987 [https://community.jboss.org/people/roxy1987] created the discussion

"Outofmemory exception when using jbpm api"

To view the discussion, visit: https://community.jboss.org/message/747365#747365

--------------------------------------------------------------
Hi,


Whenever I use Configuration object to create process engine, it takes up a huge amount of memory and is not getting dereferenced for garbage collection on exit. I am using custom configuration. The code is below. Please some one get me out of this pickle. It is really urgent and any help would be highly appreciated. Thanks.

public static Configuration getConfiguration()
{
     org.hibernate.cfg.Configuration configuration = new org.hibernate.cfg.Configuration();
  Configuration configuration2 = new Configuration();
  try
  {
   configuration.configure("jbpm.hibernate.cfg.xml");
   String encrpytedPassword= configuration.getProperty("hibernate.connection.password");
   String decryptedPwd = Encrypt.decrypt(encrpytedPassword);
   configuration.setProperty("hibernate.connection.password",decryptedPwd); 
   configuration2.setHibernateSessionFactory(configuration.buildSessionFactory());
   encrpytedPassword = null; decryptedPwd = null;
  } catch(Exception e)
  {
   CustomErrorHandler.handleException(e, "CustomConfig");
  }
  configuration = null;
  return configuration2;
}
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/747365#747365]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20120711/a9fa8f60/attachment-0001.html 


More information about the jboss-user mailing list