users@glassfish.java.net

Configuring remote ejb location outside sun-web.xml

From: <glassfish_at_javadesktop.org>
Date: Tue, 12 Oct 2010 00:29:50 PDT

Hi guys
We are running two instances of GF 3.0.1, one with the presentation layer and one backend server that exposes remote EJB's.

Right now we have configured the url's to the backend directly in sun-web.xml like this:

        <ejb-ref>
                <ejb-ref-name>StatusService</ejb-ref-name>
                <jndi-name>corbaname:iiop:localhost:3700#no.evote.service.StatusService</jndi-name>
        </ejb-ref>

But this is not very dynamic and we have to build separate war's for different environments, since th hostname is hardcoded here.

Would it be possible to read the hostname and port from a properties file? Or is there a better way of specifying the url to the backend server?

Regards,
Anders
[Message sent by forum member 'andersaab']

http://forums.java.net/jive/thread.jspa?messageID=484936