geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ed Hillmann" <ed.hillm...@gmail.com>
Subject Re: How to define a JCA connection pool / jndi address?
Date Fri, 21 Sep 2007 00:53:53 GMT
Ok, I'm still confused.  I have successfully deployed the following
RAR file.  The RAR file has the structure:

ehillman@wallaby:/svjes-src/svjes/svConnector/dist> jar tvf svConnector.rar
     0 Fri Sep 21 10:18:46 EST 2007 META-INF/
   106 Fri Sep 21 10:18:44 EST 2007 META-INF/MANIFEST.MF
  3875 Fri Sep 21 10:18:44 EST 2007 META-INF/ra.xml
 17602 Tue Sep 18 15:06:12 EST 2007 svConnector-api.jar
 78279 Fri Sep 21 10:16:56 EST 2007 svConnector-ra.jar

I've attached the geronimo plan that I used during the deployment of
the RAR file.

Now, I'm trying to deploy a EJB application, that contains a single
MDB which is supposed to handle incoming events from the JCA adapter.
It looks like this:

@MessageDriven(
    name="TreEventBean",
    messageListenerInterface=com.intecbilling.connector.interaction.TreEventListener.class,
    activationConfig={
        @ActivationConfigProperty(propertyName="ConnectionAddress",propertyValue="jca/SVConnector1"),
        @ActivationConfigProperty(propertyName="EventPatterns",propertyValue="myPattern")
    }
)
@Resource(
    name="jca/SVConnector1",
    mappedName="jca/SVConnector1",
    type=javax.resource.cci.ConnectionFactory.class
)
public class TreEventBean implements TreEventListener {

    /**
     * Method that will be called by the inbound Tre Event handler
     */
    public void handleEvent(String eventName, List paramList) throws
ResourceException {
        System.out.println("In MDB: " + eventName + " with params " +
paramList.toString());
    }
}

Yes, I'm expecting a JNDI address of a connectionPool of outbound
adapters.  I want to change that, but I haven't yet.  I'm just trying
to see if what I have will work.  Please note that the MDB implements
the interface TreEventListener, which resides in the
svConnector-api.jar file that is deployed both in the svConnector.rar
file and the EAR file containing the MDB.

ehillman@wallaby:/svjes-src/svjes/svConnector/svConnector-api/dist>
jar tvf svConnector-api.jar
     0 Tue Sep 18 15:06:12 EST 2007 META-INF/
   106 Tue Sep 18 15:06:10 EST 2007 META-INF/MANIFEST.MF
     0 Tue Sep 18 15:06:10 EST 2007 com/
     0 Tue Sep 18 15:06:10 EST 2007 com/intecbilling/
     0 Tue Sep 18 15:06:10 EST 2007 com/intecbilling/connector/
     0 Tue Sep 18 15:06:10 EST 2007 com/intecbilling/connector/interaction/
   843 Tue Sep 18 15:06:10 EST 2007
com/intecbilling/connector/interaction/AbstractSVInteractionSpec.class
  2002 Tue Sep 18 15:06:10 EST 2007
com/intecbilling/connector/interaction/InteractionType.class
  1530 Tue Sep 18 15:06:10 EST 2007
com/intecbilling/connector/interaction/RemoveTreEventListener.class
  1767 Tue Sep 18 15:06:10 EST 2007
com/intecbilling/connector/interaction/SVIndexedRecord.class
   244 Tue Sep 18 15:06:10 EST 2007
com/intecbilling/connector/interaction/SVInteractionSpec.class
  1827 Tue Sep 18 15:06:10 EST 2007
com/intecbilling/connector/interaction/SVMappedRecord.class
  1098 Tue Sep 18 15:06:10 EST 2007
com/intecbilling/connector/interaction/SVRecordFactory.class
  1527 Tue Sep 18 15:06:10 EST 2007
com/intecbilling/connector/interaction/SetTreEventListener.class
   275 Tue Sep 18 15:06:10 EST 2007
com/intecbilling/connector/interaction/TreEventListener.class
   966 Tue Sep 18 15:06:10 EST 2007
com/intecbilling/connector/interaction/TreEventSubscribe.class
   974 Tue Sep 18 15:06:10 EST 2007
com/intecbilling/connector/interaction/TreEventUnsubscribe.class
  1317 Tue Sep 18 15:06:10 EST 2007
com/intecbilling/connector/interaction/TreVariantCall.class

So, I've compiled my EAR file, and I'm using the following open-ejb.xml file

<openejb-jar
        xmlns="http://www.openejb.org/xml/ns/openejb-jar-2.1"
        xmlns:naming="http://geronimo.apache.org/xml/ns/naming-1.1"
        xmlns:security="http://geronimo.apache.org/xml/ns/security-1.1"
        xmlns:sys="http://geronimo.apache.org/xml/ns/deployment-1.2">
    <sys:environment>
        <sys:moduleId>
            <sys:groupId>com.intecbilling.connectorDemo.message</sys:groupId>
            <sys:artifactId>TreEventBean</sys:artifactId>
            <sys:version>1.1</sys:version>
            <sys:type>car</sys:type>
        </sys:moduleId>
        <sys:dependencies>
            <sys:dependency>
                <sys:groupId>com.intecbilling.singleview</sys:groupId>
                <sys:artifactId>svConnector</sys:artifactId>
                <sys:type>rar</sys:type>
            </sys:dependency>
        </sys:dependencies>
        <sys:hidden-classes/>
        <sys:non-overridable-classes/>
    </sys:environment>
    <enterprise-beans>
        <message-driven>
            <ejb-name>TreEventBean</ejb-name>
            <resource-adapter>
                <resource-link>svConnector</resource-link>
            </resource-adapter>
        </message-driven>
    </enterprise-beans>
</openejb-jar>

When I attempt to deploy, I get a lot of errors.  I'll attach the full
error messages in a file, but the top-most error is

    Configuration default/SVConnectorDemo/1190334424532/car failed to
    start due to the following reasons:

      The service
    J2EEApplication=default/SVConnectorDemo/1190334424532/car,j2eeType=EJBModule,name=SVConnectorDemo-ejb.jar
    did not start because Creating application failed:
    /u01/ct/acct/ehillman/geronimo-tomcat6-jee5-2.0.1/var/temp/geronimo-deploymentUtil45721.jar:
    Error building bean 'TreEventBean'.  Exception: class
    java.lang.IllegalStateException: Container does not exist:
    com.intecbilling.singleview/svConnector/1.0/rar.svConnector-com.intecbilling.connector.interaction.TreEventListener.
     Referenced by deployment: SVConnectorDemo-ejb.jar/TreEventBean:
    Container does not exist:
    com.intecbilling.singleview/svConnector/1.0/rar.svConnector-com.intecbilling.connector.interaction.TreEventListener.
     Referenced by deployment: SVConnectorDemo-ejb.jar/TreEventBean

So, it can't find the TreEventListener interface.  I'm not sure what
it is.  I've added some system.out calls to the adapter's
andpointActivation method, but nothing has shown up.  Something can't
find it, but I can't see what.  I've tried adding a Class-Path entry
to the EJB app's Manifest file, but that has not changed anything.

Note that the output is when I deploy it from the command line, using
the deployer.jar file.  If I deploy this from the admin console, I get
the same server log messages with errors, but the console tells me
that it's deployed.

So, to be quite honest, I don't know what's deployed or not.  I'm
pretty sure that what is deployed what work, despite what the admin
console is telling me.  I'm quite certain that I'm getting frustrated.
 The RAR module is deployed, but I have no way of telling if a
connection pool was successfully created.  I have no way of
independantly determining if the connection s work.  And I can't tell
why the MDB application can't find an interface which is deployed both
with the MDB application as well as the RAR module.  I assume I'm
doing something wrong, but the closest doco in the Wiki (JMS and MDB
example) shows a lot but assumes that I want to deploy the connector
with my application (which I don't).  And doesn't show what names are
to be used for references.  I think I've followed, but as it's not
working, I'm thinking that I'm misunderstanding.

*sigh* Ok, if anyone can help me, as usual, I'm all ears.

Ed

Mime
View raw message