I am using merlin (artifact:merlin/merlin-impl#3.3.0") in an embedded 
style.  My application has a "restart" feature that calls the shutdown 
method of the current kernel, and then recreate it with 
factory.create(criteria).  

At issue is the memory foot print after each restart.  It keeps growing at 
about 8 to 10 Megs per restart.  Eventually, if enough restart occurs, JVM 
runs out of memory in my memory constrained application.  

Could this behavior be due to Merlin ?
Could Merlin be hanging on to something after shutdown method is called?
Is there any cleanup I should due after shutdown method is called?

Each restart, I recreate the kernel as follows.

  InitialContextFactory initial = new
DefaultInitialContextFactory("config/myapp");
  initial.setCacheDirectory( getRepositoryDir());
  initial.setOnlineMode( false  );
  InitialContext context = initial.createInitialContext();
  Artifact artifact = Artifact.createArtifact(MERLIN_SPEC);
  Builder builder = context.newBuilder(artifact);
  Factory factory = builder.getFactory();.
  Map criteria = factory.createDefaultCriteria();
  criteria.put("merlin.info", new Boolean(isInfo)
  : // many more criteria added
  m_kernel = factory.create(criteria);

Your help will be appreciated.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to