Installation
[toc on_off::hide=1]-
Prepare JasperReports Server
-
If you are running JasperReports Server inside JBoss, or other Java EE container capable of exposing persistence units on JNDI:
-
Remove hibernate*.jar, jta-1.x.jar and dom4j-1.*.*.jar from the JasperServer exploded war folder
-
To make JBoss publish the managed EntityManager and EntityManagerFactory to JNDI, add to your persistence.xml properties section:
<property name="jboss.entity.manager.jndi.name" value="java:/M2isPersistenceUnit"/>
<property name="jboss.entity.manager.factory.jndi.name" value="java:/M2isPersistenceUnitFactory"/>
-
-
-
If you are running on Tomcat or Jetty, or other non-JavaEE container
-
Add your JPA provider's (Hibernate, OpenJPA, Toplink, Datanucleus, etc) jars and dependencies to webapp/WEB-INF/lib
-
-
Add in your persistence unit jar file to the webapp/WEB-INF/lib folder
-
Edit build.xml and have webAppDir point to the JasperServer exploded (unzipped) war folder
-
Run "ant deploy"
Usage
- Log in to JasperReports Server and from the repository, define a new DataSource. The EJBQL DataSource type should be available from the list
- Select EJBQL Data Source, and type in your persistence unit's name, and if you're using a Java EE container, the JNDI names for the EM and EMF
- Use the newly created data source in reports you deploy to JasperServer
- Use the built-in HQL query type for the queries
- Send us an email at info@dsquare.be if you found this project to be useful or if you need help using it.
Recommended Comments
There are no comments to display.