jeeunit currently takes a domain.xml file from
src/test/resources/domain.xml, which I admit is not really cool, but a
reasonable default for Maven users. Of course, it would be easy to make
this configurable.
Going by what Bhavani said, there is no way to set individual config
properties via the Embedded Glassfish API, and I'm not too keen on
parsing and modifying domain.xml files programmatically in jeeunit.
Maven resource filtering might be an option to interpolate properties
into a domain.xml template. I think this would require a small but
reasonable change in jeeunit to access domain.xml as a URL and not as a
File.
Best regards,
Harald
Am 18.08.2011 13:16, schrieb Bhavanishankar:
> You can use 'asadmin set' command via CommandRunner
> <http://embedded-glassfish.java.net/nonav/apidocs/org/glassfish/embeddable/CommandRunner.html>
>
> Or you can pass your own domain.xml with modified IIOP port using
> GlassFishProperties.setConfigFileURI()
> <http://embedded-glassfish.java.net/nonav/apidocs/org/glassfish/embeddable/GlassFishProperties.html#setConfigFileURI%28java.lang.String%29>
> API.
>
> Those are the only two ways.
>
> _Bhavani.
>
> On 08/18/2011 02:40 AM, forums_at_java.net wrote:
>> Hello,
>>
>> I work actualy with JEEUNIT for my unit test case. And I want to change
>> programmatically IIOP listener port.
>>
>> Is it possible without changing the domain.xml file?
>>
>>
>>
>> Thanks for your help
>> Regards,
>>
>> Sébastien