Discussion:
[jade-develop] Where to put code for container creation
guidocelada
2014-09-20 21:22:03 UTC
Permalink
Hello,
I'm starting to create an app for load balancing in JADE.
I'm trying to create a container programmatically, i understand that the
code for creating a container is:

Runtime runtime = Runtime.instance();
AgentContainer container = runtime.createAgentContainer(new ProfileImpl());

So my question is: where should i put this code? in which class? a main one?

Thanks in advance,
Regards.
Guido Celada.



--
View this message in context: http://jade.17737.x6.nabble.com/Where-to-put-code-for-container-creation-tp5002730.html
Sent from the JADE - Dev mailing list archive at Nabble.com.
Caire Giovanni
2014-09-24 20:40:32 UTC
Permalink
Hi,

Of course it depends on what you want to achieve. Basically you can put this call whenever you need it: there are no particular limitations.
Just note that Runtime.createAgentContainer() creates a new JADE container in the LOCAL JVM.
If you need to create a new container in a separated process (possibly on a remote host) you should use the TestSuiteDaemon. Recently there has been a detailed e-mail discussion on this: you can find it in the e-mail archive.

Bye,

Giovanni

-----Messaggio originale-----
Da: jade-develop [mailto:jade-develop-bounces at avalon.tilab.com] Per conto di guidocelada
Inviato: sabato 20 settembre 2014 23:22
A: jade-develop at avalon.tilab.com
Oggetto: [jade-develop] Where to put code for container creation

Hello,
I'm starting to create an app for load balancing in JADE.
I'm trying to create a container programmatically, i understand that the code for creating a container is:

Runtime runtime = Runtime.instance();
AgentContainer container = runtime.createAgentContainer(new ProfileImpl());

So my question is: where should i put this code? in which class? a main one?

Thanks in advance,
Regards.
Guido Celada.



--
View this message in context: http://jade.17737.x6.nabble.com/Where-to-put-code-for-container-creation-tp5002730.html
Sent from the JADE - Dev mailing list archive at Nabble.com.
_______________________________________________
jade-develop mailing list
jade-develop at avalon.tilab.com
http://jade.tilab.com/mailman/listinfo/jade-develop
UNSUBSCRIBE INSTRUCTIONS AT
http://jade.tilab.com/community-mailinglist.htm

Continue reading on narkive:
Loading...