Connecting to JBoss Application Server
Procedure
-
Copy all
.jar files into a local directory.
- The .jar files are located in the JBoss_Home/client directory, where JBoss_Home is the directory your JBoss Application Server version 6.x installs into.
- The .jar files are located in the JBoss_Home/bin/client directory, where JBoss_Home is the directory your JBoss Application Server version 7.1.x and WildFly 8.x install into.
For more information about the server JAR files, see related documents from your EJB server vendor.
-
In this local directory, create
.properties files and add contents to each
.properties file. Create
.properties files based on the version of your JBoss Application Server.
- JBoss Application Server version 6.x
Create a .properties file with file name jndi.properties and add the following content to the file:
java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory java.naming.provider.url=jnp://<JBoss6_IP_Address>:<Port> java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
- JBoss Application Server version 7.1.x and WildFly 8.x
Create a .properties file with file name jndi.properties and add the following content to the file:
jboss.naming.client.ejb.context=true java.naming.security.principal=remote://<JBoss7_IP_Address>:<Port> java.naming.factory.initial=org.jboss.naming.remote.client. InitialContextFactory java.naming.security.principal=<username> java.naming.security.credentials=<password>
Create another .properties file with file name jboss-ejb-client.properties and add the following content to the file:remote.connectionprovider.create.options.org.xnio.Options.SS L_ENABLED=false remote.connections=default remote.connection.default.host=<JBoss7_IP_Address> remote.connection.default.port=<Port> remote.connection.default.connect.options.org.xnio.Options.S ASL_POLICY_NOANONYMOUS=false remote.connection.default.username=<username> remote.connection.default.password=<password>
- JBoss Application Server version 6.x
- Expand the created project in the Project Explorer view, drag the local directory to the lib folder.
- Click Link to files and folders in the prompted File and Folder Operation dialog and press Enter.
- Click Window > Open Perspective > Others > Java and press Enter.
- In the Package Explorer view, expand META-INF, right-click MANIFEST.MF; then click Open With > Plug-in Manifest Editor.
- In the Runtime tab, click Add in the Classpath panel.
- In the Jar Selection window, click lib > the local directory name and press Enter.
Copyright © Cloud Software Group, Inc. All Rights Reserved.