EJB3 rule session JAR files are provided for WebSphere® Application Server 8.0 and 8.5, JBoss 5.1 and 6.1, and WebLogic 10.
To package the JAR files for Java™ EE, write your client application, map the JNDI reference to the execution unit (XU) (optional), and put the files into the relevant archive files. EJB3 deployment descriptors are optional, therefore you do not have to edit and package this XML file.
To package an EJB factory for Java EE:
Use the IlrEJB3SessionFactory and set the necessary JNDI names.
For example, you can use the following values for WebSphere Application Server 8.0, or 8.5:
IlrEJB3SessionFactory sessionFactory = new IlrEJB3SessionFactory();
sessionFactory.setStatelessLocalJndiName("ejblocal:ilog.rules.res.session.impl.ejb3.IlrStatelessSessionLocal");
sessionFactory.setStatelessRemoteJndiName("ilog.rules.res.session.impl.ejb3.IlrStatelessSessionRemote");
sessionFactory.setStatefulLocalJndiName("ejblocal:ilog.rules.res.session.impl.ejb3.IlrStatefulSessionLocal");
sessionFactory.setStatefulRemoteJndiName("ilog.rules.res.session.impl.ejb3.IlrStatefulSessionRemote");
With EJB3, the nonspecific ejb-jar.xml descriptor is not mandatory. However, you might have to modify the application-server specific EJB descriptor to map the JNDI reference to the XU. Default JNDI mappings are included to work with the default XU JNDI name.
<appserver> is a placeholder for the version number of WebSphere Application Server.
You can either edit the deployment descriptors directly or use a tool to add XML tags.
Typically, add the following values:
<application>
........
<module>
<ejb>my_ejb_application.jar</ejb>
</module>
<module>
<ejb>jrules-res-session-ejb3-<appserver>.jar</ejb>
</module>
....
</application>
You can package Java XOM resources in different ways. The simplest way is to put the classes into a separate JAR file, then package the archive with the rule session EJB-JAR in the same EAR file.
grant codeBase "file :jrules-res-session-ejb3-WAS85.jar" {
permission java.lang.RuntimePermission "getClassLoader";
permission java.lang.RuntimePermission "setContextClassLoader";
permission java.io.FilePermission "${java.io.tmpdir}${/}-", "read,write,delete";
/* Log */
permission java.io.FilePermission "${was.install.root}${/}-", "read,write";
permission java.io.FilePermission "${user.install.root}${/}-", "read,write";
/* MBean plugin */
permission com.ibm.websphere.security.WebSphereRuntimePermission "AdminPermission";
permission javax.management.MBeanPermission "*", "*";
permission java.util.PropertyPermission "*", "read,write";
/* XU Config */
permission java.lang.RuntimePermission "accessDeclaredMembers";
permission java.net.NetPermission "specifyStreamHandler";
};
© Copyright IBM Corporation 1987, 2013. | Terms and conditions for information centers | Feedback
This information center is Built on Eclipse™. (www.eclipse.org)