When the JReport Enterprise Server is used with APIs by EJBs, you can specify the dsInfo either in the file ejb-jar.xml in /META-INF or web.xml in /WEB-INF.
For information about specifying a data source in the web.xml file, see section Specifying data source in web.xml (for the WAR mode).
Note: If the dsInfo is stored in a Web module, you should add the JReport Enterprise Server context listener to the WEB-INF/web.xml file. Here is an example:
|
You can specify the dsInfo in the META-INF/ejb-jar.xml file using the <env-entry></env-entry> tags. For example, here is an EJB named firstEJB which creates the JReport Enterprise Server instance. You can add the <env-entry></env-entry> tags to the EJB's configuration file - META-INF/ejb-jar.xml as follows:
|