How can I run a single JVM for different classes that are activated by different activation classes? For example, by default, if I create activatable two class ActClass1 and ActClass2 and run them I get two JVMs. Is it possible to run both classes in one JVM?

Greg Granato

I believe this is controlled by the ActivationGroup. When you register the class you are probably doing something like:

Properties props = new Properties();
props.put("", "policy");
ActivationGroupDesc myGroupDesc = new ActivationGroupDesc(props, null);
ActivationGroupID agid = ActivationGroup.getSystem().registerGroup(myGroupDesc);
ActivationGroup.createGroup(agid, myGroupDesc, 0);
ActivationDesc desc = new ActivationDesc (agid, "<package.class>", "file:<package.class>", null, true);

You are probably doing this once for each of your classes. The createGroup translates into a JVM instance. If you were to register both of your classes under the same ActivationGroupID then they would be served from the same JVM.

0 Comments  (click to add your comment)
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



About | Sitemap | Contact