3 Replies Latest reply on Mar 4, 2003 6:42 PM by exitsfunnel

    Trouble Binding ConnectionFactory

    exitsfunnel Newbie


      I've recently downloaded JBoss 3.06 and deployed a custom resource adapter. I've created a services file (attached) named admctr-service.xml and in it I've specified the JNDI name 'ADMCtrDS' for my connection factory. I know that the connection factory is being created because I see the diagnostics I've added to the constructor, but it's not bound to the JNDI namespace. When I try to do a lookup from a jsp I get the following error:

      HTTP ERROR: 500 ADMCtrDS not bound

      Could someone clue me in to what I'm doing wrong? Thanks in advance!


        • 1. Re: Trouble Binding ConnectionFactory
          exitsfunnel Newbie

          I realize that there was a problem with the file I attached so here's the contents in line. Thanks in advance for any help I get!

          <?xml version="1.0" encoding="UTF-8"?>

          <!-- ==================================================================== -->
          <!-- New ConnectionManager setup for ADM Connector -->
          <!-- ==================================================================== -->

          <!-- Include a login module configuration named HsqlDbRealm.
          Update your login-conf.xml, here is an example for a

          <application-policy name = "HsqlDbRealm">

          <login-module code = "org.jboss.resource.security.ConfiguredIdentityLoginModule" flag = "required">
          <module-option name = "principal">sa</module-option>
          <module-option name = "userName">sa</module-option>
          <module-option name = "password"></module-option>
          <module-option name = "managedConnectionFactoryName">jboss.jca:service=LocalTxCM,name=hsqldbDS</module-option>


          NOTE: the application-policy name attribute must match
          SecurityDomainJndiName, and the
          module-option name = "managedConnectionFactoryName"
          must match the object name of the ConnectionManager you are configuring here.
          <!--uncomment out this line if you are using the DB2DbRealm above

          <depends optional-attribute-name="ManagedConnectionFactoryName">
          <!--embedded mbean-->


          <config-property name="UserName" type="java.lang.String">sa</config-property>

          <!--Below here are advanced properties -->
          <depends optional-attribute-name="OldRarDeployment">jboss.jca:service=RARDeployment,name=Hyperion Analytic Data Model (ADM) Connector

          <depends optional-attribute-name="ManagedConnectionPool">
          <!--embedded mbean-->

          <!--criteria indicates if Subject (from security domain) or app supplied
          parameters (such as from getConnection(user, pw)) are used to distinguish
          connections in the pool. Choices are
          ByContainerAndApplication (use both),
          ByContainer (use Subject),
          ByApplication (use app supplied params only),
          ByNothing (all connections are equivalent, usually if adapter supports

          <depends optional-attribute-name="CachedConnectionManager">jboss.jca:service=CachedConnectionManager

          <depends optional-attribute-name="JaasSecurityManagerService">jboss.security:service=JaasSecurityManager


          <!--make the rar deploy! hack till better deployment-->

          <!-- Moved to end to test anonymous depends -->

          • 2. Re: Trouble Binding ConnectionFactory
            David Jencks Master

            Set the log level to debug and study your server.log output where the adapter is being deployed to discover what the problem is. If the answer isn't obvious, post enough stack trace to show what is going on, but little enough so someone might be willing to look at it.

            • 3. Re: Trouble Binding ConnectionFactory
              exitsfunnel Newbie

              Problem Solved. It turns out that the lookup in the JSP contained a subcontext (comp/env) which was a holdover from when it was deployed in a different Application Server. As an aside, let me just say what a pleasure it is to be working with an open source server. I popped in a few lines of debug code, rebuilt JBoss, and the generated debug code made the problem a snap to solve.