English 中文(简体)
如何在7.x的JBossss上寻找ejb
原标题:How to lookup ejb on JBoss AS 7.x

I try ejb lookup for jndi name. That ejb is same jboss server then is success. But ejb is other jboss server then is failed. My source code:

Hashtable<String, String> env = new Hashtable<String, String>();
env.put("java.naming.provider.url","jnp://192.168.100.10:8484");
env.put("java.naming.factory.initial",
                "org.jboss.as.naming.InitialContextFactory");
env.put("java.naming.factory.url.pkgs",
                "org.jboss.as.naming.interfaces.java");
env.put("java.naming.security.principal", "Admin");
env.put("java.naming.security.credentials",
            "password");
Context context = new InitialContext(env);
IMyLogic infoLogic = (IMyLogic) context.lookUp("java:global/MyApplication/MyModule/MyLogic!org.test.interfaces.IMyLogic");

IMyLogic ejb 192.168.100.10 jboss as 7.1 deployed. I try lookup 192.168.100.15 jboss as 7.1. Thanks.

最佳回答
问题回答

暂无回答




相关问题
Webspehere 6.1 and JNDI for something other than a Datasource

I was wondering: how does one go about configuring WAS if they want to store some confidential information that is not datasource, JMS or Mail related? I m looking more for an adhoc JNDI resource (a ...

JBoss JNDI Binding Manager - maximum length of value?

I m using the technique described here to register string values on the JNDI tree via an XML file deployed to JBoss. This is working fine for my system constants (URLs and the like). However I am ...

How to configure JPA to use JNDI?

I have a working persistence definition that works on java level tests. Now I want to incorporate that into a web application which defines the database connection as JNDI in the context.xml. What do ...

Jetty JNDI Java Mail

I am using Jetty 7 with JBoss Seam and have 2 Java Mail Sessions configured, one for support notifications and another for general notifications. The problem I am having appears to be from JBoss Seam ...

Using JNDI for Database connections

This might sound like a noob question but this is the first time I m treading into Database territory. From here I got the info that The most efficient way to implement communication between the ...

JNDI Names -- Is Prefix "jdbc/" needed?

What s up with JNDI names? I m trying to get a javax.sql.DataSource using the new annotations feature of Java 5. It s not working for me, so I want to ask... I have a in my web.xml, inside of it is ...

热门标签