5 Replies Latest reply on Mar 15, 2004 5:11 PM by nandkumar

    JDBC persistence

    rsh

      Hi,

      I am using JBoss 3.2 and would like to configure the JMS persistence manager to persist messages to an Oracle database.

      Can anyone offer up a clear description?

      Thanks,
      Rob

        • 1. Re: JDBC persistence

          Look in docs/examples/jms
          But you will probably find that creating the tables by hand gives you
          more control (see other recent posts).

          Regards,
          Adrian

          • 2. Re: JDBC persistence
            nandkumar

            Hi,

            I am in the process of using JBOSS 322 for JBOSSMQ need some info ASAP

            please let me know: steps

            - Settingup oracle for persistance with and other configurationfo
            - How to set the MDB pool info in configuration

            • 3. Re: JDBC persistence
              duslow

              Can't help with the Oracle integration, but I can with where to configure your MDB pools.

              There are two basic ways to accomplish this.

              If you wish to use the JBoss defaults and just tweak the settings, then go to the server//conf/standardjboss.xml file and look at both the proxy-binding-config named "message-driven-bean" and the container-configuration titled "Standard Message Driven Bean". Here you will find the settings for the pooling and various other settings as well.

              Keep in mind, these are static configurations that cannot be tweaked fully at run-time. The upcoming 3.2.4 release will expose some of these settings for run-time tweaking.

              You can also deploy new invoker-proxy-bindings and container-configurations along with your EJB's jboss.xml file. If you use XDoclet to generate jboss.xml for your EJB's you'll need to use the merge file functionality and put the invoker-proxy-bindings and container-configuration xml in a file named jboss-container.xml and store it in the merge directory you point your XDoclet JBoss sub-task at.

              Bundling these in the EJB jar allows you to change the settings and re-deploy without having to restart JBoss.

              • 4. Re: JDBC persistence
                nandkumar

                Hi duslow,

                Greate thanks, needs small clarification:

                following is the jboss-container.xml file i have created, would like to know
                what should be the value for should it be my MDB name or default name

                Note : I would like to use default proxy not custmized all I want is to set the new values for

                15
                1
                regards,
                nand

                <container-configurations>
                <invoker-proxy-binding>
                message-driven-bean
                <invoker-mbean>default</invoker-mbean>
                <proxy-factory>org.jboss.ejb.plugins.jms.JMSContainerInvoker</proxy-factory>
                <proxy-factory-config>
                DefaultJMSProvider
                StdJMSPool
                15
                1

                10

                queue/DLQ
                10
                0


                </proxy-factory-config>
                </invoker-proxy-binding>

                <container-configuration>
                <container-name>Standard Message Driven Bean</container-name>
                <call-logging>false</call-logging>
                <invoker-proxy-binding-name>message-driven-bean</invoker-proxy-binding-name>
                <container-interceptors>
                org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor
                org.jboss.ejb.plugins.LogInterceptor
                org.jboss.ejb.plugins.RunAsSecurityInterceptor
                <!-- CMT -->
                org.jboss.ejb.plugins.TxInterceptorCMT
                org.jboss.ejb.plugins.MetricsInterceptor
                org.jboss.ejb.plugins.MessageDrivenInstanceInterceptor
                <!-- BMT -->
                org.jboss.ejb.plugins.MessageDrivenInstanceInterceptor
                org.jboss.ejb.plugins.MessageDrivenTxInterceptorBMT
                org.jboss.ejb.plugins.MetricsInterceptor
                org.jboss.resource.connectionmanager.CachedConnectionInterceptor
                </container-interceptors>
                <instance-pool>org.jboss.ejb.plugins.MessageDrivenInstancePool</instance-pool>
                <instance-cache></instance-cache>
                <persistence-manager></persistence-manager>
                <container-pool-conf>
                100
                </container-pool-conf>
                </container-configurations>

                • 5. Re: JDBC persistence
                  nandkumar

                  Here are the steps that I followed to get it working :

                  1. Copy oracle-jdbc2-service.xml from JBOSS_HOME/docs/examples/jms to JBOSS_HOME/server/default/deploy/jms
                  2. Edit the DS name to your DS name, e.g. change from defaultDS to your jndi datasource name
                  3. Remove hsqldb-jdbc2-service.xml in the JBOSS_HOME/server/default/deploy/jms
                  4. Add the destination in the
                  jbossmq-destinations-service.xml in the JBOSS_HOME/server/default/deploy/jms e.g.
                  <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager