8 Replies Latest reply on Jun 24, 2009 9:20 AM by Andy Taylor

    JBM2 jca adapter and connection factories

    Andy Taylor Master

      This is how the JCA Adapter worked before clebert added the functionality to override the transport connector.

      Each Resource Adapter defined in an ra.xml file creates a JBossConnectionFactory dependant on its configuration. Each MDB activation shares this connection factory and uses it to make its connections. with 1.4 this didn't matter i guess but in 2.0 its the connection factory (actually the underlying session factory) that takes care of such things as number of physical connections etc. This means that you could have many MDB's receiving messages over a small number of connections.

      Clebert added a change to allow the transport connector to be over ridden, if it isn't things operate the same as above. If it is overridden then a new connection factory is created for the MDB activation. currently if this happens and the MDB activation is removed the connection factory isn't closed which is also incorrect however i'm guessing the garbage collection will do this.

      If i add my change to allow the rest of the connection factory params to be over ridden then we would have to create a new connection factory every time any conf is overridden.

      so do we

      a) don't allow any overrides on the connection factory. The user would have to provide a new ra.xml file for each configuration. This is how 1.4 works and would mean removing cleberts changes, however would still be a problem with lots of MDB;s sharing a CF.

      b) share the same connection factory unless any params are over ridden, in this case create a new one per MDB.

      c) create a new Connection Factory per MDB activation.

      or maybe have a configuration flag to allow the user to choose between b & c.

      Note: this is for the inbound connector only