[jboss-user] [EJB3] - AccessEJBsRemotely

Administrator Administrator do-not-reply at jboss.com
Thu Jan 20 10:57:52 EST 2011


Administrator Administrator [http://community.jboss.org/people/admin] modified the document:

"AccessEJBsRemotely"

To view the document, visit: http://community.jboss.org/docs/DOC-9047

--------------------------------------------------------------
h2.  How do I access EJBs remotely

h3.  JNDI Properties

h4.  Using a Provider URL

You'll need a jndi.properties on the remote client which looks like this:

#jboss JNDI properties
java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
java.naming.provider.url=jnp://localhost:1099
java.naming.factory.url.pkgs=org.jnp.interfaces

### The TimedSocketFactory connection timeout in milliseconds (0 == blocking) 
jnp.timeout=0
### The TimedSocketFactory read timeout in milliseconds (0 == blocking) 
jnp.sotimeout=0


Replace localhost with the jboss's DNS name or IP and if you have configured the jboss naming service for some other port, you will need to change the 1099 to reflect that port. You can also provide a delimited list for the provider URL like java.naming.provider.url=jnp://192.168.99.1:1100,192.168.99.2:1100,192.168.99.3:1100

The last two timeout properties are optional, defaults are zero.

h4.  Using Naming Discovery

If you would like to use Naming Discovery (appropriate for a clustered environment), you will need a jndi.properties on the remote client which looks like this:
#jboss JNDI properties
java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
java.naming.provider.url=
java.naming.factory.url.pkgs=org.jnp.interfaces
jnp.partitionName=YourPartitionName


This configuration presupposes that your network is set up in such a way that multicast traffic is visible between your remote client and the EJB-serving JBoss instance.  (e.g. the machines are on the same subnet)  It also assumes that you have  http://community.jboss.org/docs/DOC-10386 configured your serving JBoss instance to be a member of the
YourPartitionName
partition.

h3.  Interfaces

You must use Remote and RemoteHome interfaces.

h3.  Security

If you have configured a secure realm, you will need to set up a JAAS security login to the EJB tier.
--------------------------------------------------------------

Comment by going to Community
[http://community.jboss.org/docs/DOC-9047]

Create a new document in EJB3 at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=102&containerType=14&container=2029]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20110120/b3d14ceb/attachment.html 


More information about the jboss-user mailing list