users@glassfish.java.net

Re: Two embedded glassfish domains

From: <forums_at_java.net>
Date: Sun, 18 Sep 2011 08:07:40 -0500 (CDT)

Thanks Sahoo for the reply. I tried to instantiate two embedded domains, but
the second one fails when starting AMX mbeans (the are already loaded).

You are absolutely right, you need only a reference to GlassFishRuntime to
start a domain. This is not a problem when you have a single test class, or
several test classes groupped in a single junit test suite (test suite can
hold static reference to gfruntime). But how to pass this reference between
testsuites? I used reflection to nullify GlassFishRuntime reference and
bootstrap the runtime once again. I found also some problems when one domain
is started/stopped and then the second one is started then. Some operations
simply does not work in that domain (cli commands in my case - Normal 0 21
false false false PL X-NONE X-NONE /* Style Definitions */
table.MsoNormalTable {mso-style-name:Standardowy; mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99;
mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0cm 5.4pt 0cm
5.4pt; mso-para-margin:0cm; mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan; font-size:11.0pt;
font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin; mso-fareast-font-family:"Times New Roman";
mso-fareast-theme-font:minor-fareast; mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;} see

http://java.net/jira/browse/GLASSFISH-17308 [1])

Best regards

Marcin


[1] http://java.net/jira/browse/GLASSFISH-17308

--
[Message sent by forum member 'mkwapisz']
View Post: http://forums.java.net/node/843309