3 Replies Latest reply on Feb 29, 2004 9:22 AM by pilhuhn

    Best practice on DS-independent deployment?

    csp

      In the standardjbosscmp-jdbc.xml file I have changed the folowing: The out commented lines are the original source with the hypersonic database. As u can see i have changed the attributes to MSSQLDS and MS SQLSERVER2000

      ************************************************************************************************
      <jbosscmp-jdbc>

      <!--
      java:/DefaultDS
      -->
      java:/MSSQLDS
      <!--
      <datasource-mapping>Hypersonic SQL</datasource-mapping>
      -->
      <datasource-mapping>MS SQLSERVER2000</datasource-mapping>

      ************************************************************************************************

      Then finally I have my mssql-ds.xml file:

      ************************************************************************************************


      <local-tx-datasource>
      <jndi-name>MSSQLDS</jndi-name>
      <connection-url>jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=GHEM3;SelectMethod=Cursor</connection-url>
      <driver-class>com.microsoft.jdbc.sqlserver.SQLServerDriver</driver-class>
      <user-name>sa</user-name>
      strange
      <!-- 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>
      -->
      </local-tx-datasource>



      ************************************************************************************************

      I have not done ANY other changes. The bug i get is view as followed:
      I have no idea, what the MBeanException is. I know that a bean has a mitch match, but i don't know witch one.

      What does I miss????

      Where is the method:'checkIncompleteDeployments()'??

      ************************************************************************************************

      13:34:55,221 INFO [MainDeployer] Deployed package: file:/C:/jboss-3.2.3/server/
      default/deploy/management/web-console.war
      13:34:55,221 ERROR [URLDeploymentScanner] MBeanException: Exception in MBean ope
      ration 'checkIncompleteDeployments()'
      Cause: Incomplete Deployment listing:
      Packages waiting for a deployer:

      Incompletely deployed packages:

      MBeans waiting for classes:

      MBeans waiting for other MBeans:
      [ObjectName: jboss.mq:service=InvocationLayer,type=HTTP
      state: CONFIGURED
      I Depend On: jboss.mq:service=Invoker
      jboss.web:service=WebServer

      Depends On Me: , ObjectName: jboss.mq:service=DestinationManager
      state: CONFIGURED
      I Depend On: jboss.mq:service=MessageCache
      jboss.mq:service=PersistenceManager
      jboss.mq:service=StateManager

      Depends On Me: jboss.mq.destination:service=Topic,name=testTopic
      jboss.mq.destination:service=Topic,name=securedTopic
      jboss.mq.destination:service=Topic,name=testDurableTopic
      jboss.mq.destination:service=Queue,name=testQueue
      jboss.mq.destination:service=Queue,name=A
      jboss.mq.destination:service=Queue,name=B
      jboss.mq.destination:service=Queue,name=C
      jboss.mq.destination:service=Queue,name=D
      jboss.mq.destination:service=Queue,name=ex
      jboss.mq:service=SecurityManager
      jboss.mq.destination:service=Queue,name=DLQ
      , ObjectName: jboss.mq:service=PersistenceManager
      state: CONFIGURED
      I Depend On: jboss.jca:service=LocalTxCM,name=DefaultDS

      Depends On Me: jboss.mq:service=DestinationManager
      , ObjectName: jboss.mq.destination:service=Topic,name=testTopic
      state: CONFIGURED
      I Depend On: jboss.mq:service=DestinationManager
      jboss.mq:service=SecurityManager


      ************************************************************************************************

        • 1. Re: Best practice on DS-independent deployment?
          pilhuhn

          There is a naming alias Mbean, that you can use to alias a DS. I.e. your application specifies fooDS and the Mbean aliases it to realDS. There is no such mechanism for the DS-mapping so far. There are two feature requests open regarding this.

          • 2. Re: Best practice on DS-independent deployment?
            csp

            Sorry if I'm not following you on the alias MBean. Mind giving more details on which MBean are you referring to?

            I found that I can remove the two elements

            <datasource>
            and
            <datasource-mapping>
            from jbosscmp-jdbc.xml and it will take the DefaultDS.

            According to the dtd, these two are optional.

            Thanks

            csp


            • 3. Re: Best practice on DS-independent deployment?
              pilhuhn

              Yes, that is correct wrt datasource and mapping elements. If you know, that you will have only ond datasource, it really is the best to just use the defaults.

              The NamingAlias MBean provides you sort of "soft link" functionality.
              Use an MBean org.jboss.naming.NamingAlias

               <mbean code="org.jboss.naming.NamingAlias"
               name="objectname-of-this-mbean">
               <attribute name="FromName">jndi-name</attribute>
               <attribute name="ToName">jndi-name</attribute>
               </mbean>