Hi,

the host switch didnt work for me either

The cleanest way to configure jboss is (IMHO) to use the port-bindings.xml
configure the server to bind to a dedicated adapter/port combination for each service. ( see docs/examples/binding-manager.xml)
(see dtd at file head for more information as the parameters to specify depend on the services used...)

hope this helps
johannes



erik777 <[EMAIL PROTECTED]>
Gesendet von: [EMAIL PROTECTED]

12.02.2004 23:54
Bitte antworten an jboss-user

       
        An:        [EMAIL PROTECTED]
        Kopie:        
        Thema:        [JBoss-user] [EJB/JBoss] - Re: EJB Lookup, Connection Refused.



View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3821317#3821317

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3821317

This blows me away because when I set JBoss' host to be 192.168.1.8 via --host= I get connection refused from 127.0.0.1.  But, when i set JBoss' host to 127.0.0.1, I get connection refused from 192.168.1.8!  



Here is the code I'm using to try to connect:





     Context context = getContext();

     log.debug("                Context.DNS_URL: " + context.DNS_URL);

     log.debug("Context.INITIAL_CONTEXT_FACTORY: " +

context.INITIAL_CONTEXT_FACTORY);

     log.debug("           Context.PROVIDER_URL: " +

context.PROVIDER_URL);

     Hashtable table = context.getEnvironment();

     String url = "" table.get(context.PROVIDER_URL);

     log.debug("                            URL: " + url);

     ClientConfig config = new ClientConfig();

     config.setRemoteJNDIhost("192.168.1.8");

     url = "">
     log.debug("                        new URL: " + url);

     try {

       table.put(Context.PROVIDER_URL, url);

       context = new InitialContext(table);

       Object remoteObject =

         context.lookup(url + "/" + SECURITY_CONTEXT_NAME +

"/SecurityController");

       log.debug("Obtained remote home interface.  Narrowing...");

       securityControllerHome =

         

(SecurityControllerHome)PortableRemoteObject.narrow(remoteObject,

                                         SecurityControllerHome.class);

       return securityControllerHome;

     } catch (Exception ex) {

       log.debug("Caughting exception trying to get remote interface");

       log.debug("Message: " + ex.getMessage());

       ex.printStackTrace();

     }





I'm using JBoss 3.2.3.  



If this is not the correct way to connect to an EJB in another container, then can someone please clarify.



The actual host IP will be dynamically configured.  It cannot be in the ear.  So I am intentionally using the JNDI code to get it to look at the host I specify.



The code above is just test code to get it to work.  Later I'll clean it up and make it truly dynamic.




-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to