0 Replies Latest reply on Jan 17, 2014 1:35 PM by lp perez

    Access the h2 in-memory defined as JNDI resource in JBOSS

    lp perez Newbie

      Hello everybody,


      I have defined my h2 in-memory database as follows:


              <subsystem xmlns="urn:jboss:domain:datasources:1.1">


                      <datasource jta="false" jndi-name="java:/jdbc/ORA_BQWJB001" pool-name="QWJB2" enabled="true" use-ccm="false">

                          <connection-url>jdbc:h2:mem:elara;DB_CLOSE_DELAY=-1;INIT=RUNSCRIPT FROM 'D:/DOCUMENTS/lo/sql/QWJB_DDL.sql'</connection-url>












                          <driver name="h2" module="com.h2database.h2">



                          <driver name="OracleJDBCDriver" module="oracle.jdbc"/>





      The problem is that the application that tries to access the data base is defined in the 8080 port. Therefore I cannot access the h2 data base. I have tried to change the port including the following sentence but it does not work.

                          <connection-url>jdbc:h2:mem:elara;DB_CLOSE_DELAY=-1;INIT=RUNSCRIPT FROM 'D:/DOCUMENTS/lo/sql/QWJB_DDL.sql';PORT=30000</connection-url>


      I have read in the h2 documentation that it is necessary to create a TCP server in order to be able to access the database. Does anybody knows how can I define the TPC server in the standalone.xml? Or does anybody knows how to change the port of the h2?


      Thank you very much in advance!