2 Replies Latest reply on Oct 30, 2012 6:50 AM by jacktrades

    @DataSourceDefinition, classname for Hibernate

    jacktrades

      Looking for the analogous of org.apache.derby.jdbc.EmbeddedDataSource.

       

      Looking forward to deploy this in example with Jboss AS 7:

      https://github.com/agoncal/agoncal-application-petstore-ee6/blob/master/src/main/java/org/agoncal/application/petstore/service/DBPopulator.java

       

      standalone.xml relevant part look like this:

       

      <datasources>

                      <datasource jndi-name="java:jboss/datasources/applicationPetstoreDS" pool-name="applicationPetstoreDS" enabled="true" use-java-context="true">

                          <connection-url>jdbc:postgresql://localhost:5432/applicationPetstoreDB</connection-url>

                          <driver>postgresql</driver>

                          <security>

                              <user-name>postgres</user-name>

                              <password>root</password>

                          </security>

                      </datasource>

                      <drivers>

                          <driver name="postgresql" module="org.postgresql">

                              <xa-datasource-class>org.postgresql.xa.PGXADataSource</xa-datasource-class>

                          </driver>

                      </drivers>

                  </datasources>

        • 1. Re: @DataSourceDefinition, classname for Hibernate
          sfcoy

          This application looks like it needs some work before it will work on JBoss AS 7.1.1.Final.

           

          I got it working up to the point where it deploys, but throws an exception when accessed from a browser because it makes the unfortunate assumption that a classloader resource can be accessed as a java.io.File object:

           

          {code:java}    System.setProperty("java.security.auth.login.config",

                                        new File(LoginContextProducer.class.getResource(loginConfigFileName).toURI()).getPath());{code}

          • 2. Re: @DataSourceDefinition, classname for Hibernate
            jacktrades

            Thanks, I'll stick to ticketmonster, even that can't make it work. Can't make the admin page with Forge.