2 Replies Latest reply on Apr 17, 2002 12:27 PM by Vad

    JBosss3.0RC1: questions about new config file for JCA..

    Vad Newbie

      Hi everybody,

      I'm trying to port my connectors (JMS and CORBA resource adapters) from beta to RC1...

      1°) when a mbean is declared inside a depends, is that mbean systematically instanciated or only if it is not yet registered? If I have 2 connectors using the same pool parameters, do I need to use different "XXXPool" in the line :
      ?

      2°) Should I register all that stuff under "jboss.jca" domain ?

      3°) what about the ManagedConnectionFactoryProperties attribute? do they override ra.xml properties? it seems that properties in ra.xml are not set, only those in the jboss-service.xml...


      4°) In beta, I implemented my own connectionManager, please see message
      http://main.jboss.org/thread.jsp?forum=46&thread=12965

      I put it in a Mycx.sar the same way the Minerva ConnectionManagerFactoryLoaders were declared in jbosscx.sar.

      Could you give some insight into what I will have to do now?


      Thanks in advance

      Vad




        • 1. Re: JBosss3.0RC1: questions about new config file for JCA..
          David Jencks Master

          1. the embedded mbeans are just like having the embedded mbean config elsewhere + an object name reference to it. The ConnectionManagers only work if they get unique RARDeployment and pool mbeans, so if you want to un-embed them make sure everything has unique ObjectNames. I prefer the embedded config because it makes it easier for me to create different ObjectNames. I have been using the naming convention recently of ....service=,name=<samethingforall3mbeans> which keeps things clearer for me anyway. Specifically, you need a separate pool for every ConnectionManager.

          2. Doesn't matter what you register it under, I like to keep all the jca related stuff in one place, but as long as the object names are unique and cross references accurate anything should work.

          3. The managedConnectionFactoryProperties are supposed to override ra.xml properties. Are you finding that default values from ra.xml are not being set even if you have no config-property section for that property? A section with no value will override the default. If this is not working please let me know.

          4. Can you try the new ConnectionManager framework and see if it has the problems that led you to modify the old one? If so, lets try to fix it in JBoss.

          • 2. Re: JBosss3.0RC1: questions about new config file for JCA..
            Vad Newbie

            Thanks David.

            > 3. The managedConnectionFactoryProperties are
            > supposed to override ra.xml properties. Are you
            > finding that default values from ra.xml are not being
            > set even if you have no config-property section for
            > that property? A section with no value will override
            > the default. If this is not working please let me
            > know.

            Well, the properties in ra.xml are set, but too late... My connector works OK if I set my property in jboss-service but fails if not, with an exception before the property in ra.xml is set :

            MyException
            at com.xxx.MyManagedConnectionFactory.createConnectionFactory(MyManagedConnectionFactory.java:47)
            at org.jboss.resource.connectionmanager.RARDeployment.startManagedConnectionFactory(RARDeployment.java:575)
            ...

            this is because I make some initialization when creating the CF depending on the properties set on the MCF.
            (btw, that would be nice if JCA had a callback mechanism to let know the resource adpter programmer when the connector is loaded, unloaded...).

            Anyway, I can put my properties in the jboss-service, it's even better.


            > 4. Can you try the new ConnectionManager framework
            > and see if it has the problems that led you to modify
            > the old one? If so, lets try to fix it in JBoss.

            I'll test that asap.

            Vad