Hi All,
I'm using JBOSS 4.0.3 and my stand alone client failed to connect to EJB.
I tried to implement it as follow :
in the server side :
I create a stateless AuthorBean class which implements Authors
Remote interface
in the client side I wrote :
Properties jndiProps = new Properties();
|
jndiProps.setProperty(Context.INITIAL_CONTEXT_FACTORY,"org.jnp.interfaces.NamingContextFactory");
|
jndiProps.setProperty(Context.URL_PKG_PREFIXES,"org.jboss.naming:org.jnp.interfaces");
| jndiProps.setProperty(Context.PROVIDER_URL,
"jnp://localhost:1099");
| Context c = new InitialContext(jndiProps);
| Object reference = c.lookup("Authors");
|
but I'm receiving the following error:
javax.naming.CommunicationException: Could not obtain connection to any of
these urls: localhost:1099 and discovery failed with error:
java.security.AccessControlException: access denied (java.net.SocketPermission
230.0.0.4 connect,accept,resolve) [Root exception is
javax.naming.CommunicationException: Failed to connect to server localhost:1099
[Root exception is java.security.AccessControlException: access denied
(java.net.SocketPermission 127.0.0.1:1099 connect,resolve)]]
| at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1399)
| at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:579)
| at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:572)
| at javax.naming.InitialContext.lookup(InitialContext.java:351)
| at client.startApplication.main(startApplication.java:29)
|
What I'm doing wrong ?
Can someone point me to an example of how to implement such call
from stand alone client to ejb on JBOSS?
tnx, amit
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3912582#3912582
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3912582
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user