Jump to content
We've recently updated our Privacy Statement, available here ×
  • EJBQL JasperReports Server Data Source


    alexmreis

    Installation

    [toc on_off::hide=1]
    1. Prepare JasperReports Server

      1. If you are running JasperReports Server inside JBoss, or other Java EE container capable of exposing persistence units on JNDI:

        1. Remove hibernate*.jar, jta-1.x.jar and dom4j-1.*.*.jar from the JasperServer exploded war folder

        2. 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"/>

    2. If you are running on Tomcat or Jetty, or other non-JavaEE container

      1. Add your JPA provider's (Hibernate, OpenJPA, Toplink, Datanucleus, etc) jars and dependencies to webapp/WEB-INF/lib

    3. Add in your persistence unit jar file to the webapp/WEB-INF/lib folder

    4. Edit build.xml and have webAppDir point to the JasperServer exploded (unzipped) war folder

    5. Run "ant deploy"

    Usage

    1. Log in to JasperReports Server and from the repository, define a new DataSource. The EJBQL DataSource type should be available from the list
    2. 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
    3. Use the newly created data source in reports you deploy to JasperServer
    4. Use the built-in HQL query type for the queries
    5. Send us an email at info@dsquare.be if you found this project to be useful or if you need help using it. 

     


    User Feedback

    Recommended Comments

    There are no comments to display.



    Guest
    This is now closed for further comments

×
×
  • Create New...