4 Replies Latest reply on Nov 30, 2004 1:36 AM by puneet kapahi

    interfacing JBoss with postgres

    puneet kapahi Newbie


      I have just begun my career as a developer and am new to the intricacies of the j2ee world.

      I am currently working on the migration of an application from Websphere6.1 and Oracle 9i to JBoss and PostgreSQL 7.4.5.

      My application is up on the server but I am not able to connect to the database.Anyone please tell me where all the configuration will happen in JBoss to achieve this.Step by step guidelines will be extremely helpful.

      I am in deep shit now as I am the only one handling this and my boss is really pressing on me.Please take this as SOS call from one of the junior members and dont ignore it.Help or suggestions of any kind are welcome.

      Thanks in anticipation.

        • 1. Re: interfacing JBoss with postgres
          beyarecords Novice

          what version of jboss are you using?


          • 2. Re: interfacing JBoss with postgres
            puneet kapahi Newbie

            I am using JBoss 3.2.5 and PostgreSQL 7.4.5.

            • 4. Re: interfacing JBoss with postgres
              puneet kapahi Newbie


              I made the changes in jboss.xml and ejb-jar.xml accordinglyBut I forgot to mention that I was getting :

              ObjectName: jboss.mq:service= StateManager state: NOTYETINSTALLED

              Also when I start run.sh I get messages on my postgres console(on a remote system).

              It tries to create tables jms_messages and jms_transaction ....but if I try to restart the server it gives:

              relation "jms_messages"already exists
              current transaction is aborted,command ignored until end of transaction block

              which is understandable though because of the

              in postgres-jdbc2-service.xml in deploy/jms.I have set it to false .no communication seems to happen thereafter.

              Please give some steps on how to go about this.

              I have made the following changes already:

              1) standardjbosscmp-jdbc.xml and standardjaws.xml


              <datasource-mapping>PostgreSQL 7.4.5</datasource-mapping>



              <type-mapping>PostgreSQL 7.4.5</type-mapping>

              . .


              <!-- sql to call when connection is created
              <new-connection-sql>some arbitrary sql</new-connection-sql>

              <!-- sql to call on an existing pooled connection when it is obtained from pool
              <check-valid-connection-sql>some arbitrary sql</check-valid-connection-sql>



              3) the following entry in login-config.xml

              <application-policy name = "PostgreSQLDbRealm">

              <login-module code = "org.jboss.resource.security.ConfiguredIdentityLoginModule"
              flag = "required">
              <module-option name = "principal">postgres</module-option>
              <module-option name = "userName">postgres</module-option>
              <module-option name = "password"></module-option>
              <module-option name = "managedConnectionFactoryName">jboss.jca:service=LocalTxCM,name=java:/jdbc/Acws</module-option>


              Please reply...