0 Replies Latest reply on Apr 15, 2002 6:44 AM by Vad

    JBoss3.0, JCA : handling exceptions while creating a managed

    Vad Newbie

      Hi,
      I've already posted this message, but it was in the wrong forum i think. So maybe here...

      I have a connector which connects to external CORBA servers.
      Here is the scenario :

      A client requests a first connection :
      my connectionFactory calls this :

      Object o = connectionManager.allocateConnection(managedConnectionFactory, connectionInfo) ;

      which blocks. (btw, the connectionManager is a NoTransConnectionManager).

      Why? because the connectionManager calls getObject() on ObjectPool which calls its private method createNewObject() because no connection were available.

      This calls PoolObjectFactory.createObject()
      The PoolObjectFactory is indeed a ManagedConnectionPoolFactory which returns null in case a ResourceException occured (and when my CORBA server is down what should I do if not throwing a ResourceException?)

      The ObjectPool then waits because the result is null...
      and my client is blocked whereas I'd like to tell it an exception has occured.

      So I think getObject() should be allowed to throw Exceptions... I will rewrite things in that direction for my own use.
      Please may you tell me if you have a work around, or if you think I should catch my exception another way, or any idea on the subject...

      Thanks in advance
      Vad