10 Replies Latest reply on Jul 24, 2002 5:21 PM by Glen Cordrey

    Need JCA XML file

    patost Newbie

      Hi there,
      I have a JCA that has nothing to do with Database, and it does not support transaction (XA, or UserTransaction).
      I created the following XML file and deployed it. However the JNDI name does not show up in JNDIView and when I try to access it from my EJB, on the server side I get:
      15:59:48,265 ERROR [AbstractInstanceCache] Activation failure
      java.rmi.ServerException: Could not activate; nested exception is:
      java.io.FileNotFoundException: D:\jboss-3.0.0server\default\db\sessions
      \my_jca_ejb\1024527576483.ser (The system cannot find the file specified)
      java.io.FileNotFoundException: D:\jboss-3.0.0\server\default\db\sessions\my_jca_ejb\1024527576483.ser (The system cannot find the file specified)

      On the Client side I get:
      java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
      java.rmi.RemoteException: JCA Lookup; nested exception is:
      javax.naming.NameNotFoundException: myjca not bound
      java.rmi.RemoteException: JCA Lookup; nested exception is:
      javax.naming.NameNotFoundException: myjca not bound
      javax.naming.NameNotFoundException: myjca not bound

      Here is my XML file:
      <?xml version="1.0" encoding="UTF-8"?>

      <!-- ==================================================================== -->
      <!-- New ConnectionManager setup for My JCA-->
      <!-- ==================================================================== -->

      <!-- General attributes -->
      <depends optional-attribute-name="OldRarDeployment">jboss.jca:service=RARDeployment,name=My JCA

      Jboss deploys the JCA successfully, but it looks like I am missing something in the XML file. I have seen some references to firebird-service.xml, but that one is still related to Database and has so many entries. Is there any document that explains these items and their relation. My JCA works on WebLogic, J2EE reference implementation, JRun, etc. However, they have at least a decent documentation or tool that one can use to deploy the JCA. It is really hopeless with JBoss in that regrad.


        • 1. 3725680
          David Jencks Master

          Please start by making sure you are using jboss 3.0 final release or a later version from cvs (not the "nightly" snapshot, and write an xml configuration file based on those in docs/examples/jca (binary) or connector/src/etc/example-comfig (source/cvs)

          There is no more ConnectionFactoryLoader

          • 2. Re: Need JCA XML file
            patost Newbie

            I am using the latest version. Those XML samples that you mentioned (even firebird) have so many entries and there is no document that describes them. If you look at some other application servers, you see their XML file is very straightforward, they have either tools or document, so one can use them. You do not have any tool to help deploying a JCA, and the document is not even clear. And those I found are either outdated or do not talk about the entries in detail. Here is my ra.xml for weblogic:

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

            <!DOCTYPE connector PUBLIC '-//Sun Microsystems, Inc.//DTD Connector 1.0//EN' 'http://java.sun.com/dtd/connector_1_0.dtd'>

            <eis-type>DCOM Applications</eis-type>

            grant {
            permission java.lang.RuntimePermission "modifyThread";
            permission java.lang.RuntimePermission "modifyThreadGroup";
            permission java.security.AllPermission;

            And here is the XML specific to WebLogic:

            <?xml version="1.0"?>

            <!DOCTYPE weblogic-connection-factory-dd PUBLIC '-//BEA Systems, Inc.//DTD WebLogic 6.0.0 Connector//EN' 'http://www.bea.com/servers/wls600/dtd/weblogic600-ra.dtd'>



            Could you please point me to a document that explains the entries in your XML file, or the equivalent of the WebLogic XML file for JBoss.


            • 3. Re: Need JCA XML file
              Glen Cordrey Newbie

              Did you ever get a reply to this, or find any documentation on the deployment xml tags? I share your sentiments regarding the complexity of resource adapter deployment in JBoss and all of the sparsely-explained-if-that tags.

              • 4. Re: Need JCA XML file
                David Jencks Master

                Did you folks read the quickstart guide and follow the instructions in most of the examples to build and look at the jmx-api documentation?

                However, I agree that the current configuration system is too difficult. I just committed a highly simplified version for datasources to 3.1, and plan to write something similar for non-wrapped-jdbc-driver resource adapters.

                • 5. Re: Need JCA XML file
                  Glen Cordrey Newbie

                  Yes, I have read the quickstart guide and the examples.
                  Like the previous poster (patost) I have a resource adaptor that has nothing to do with jdbc. My adaptor is
                  very simple (e.g., it requires no transaction management),
                  yet all of the examples appear to be for more complex
                  adaptors, and so I am having difficulty determining what
                  aspects of the examples apply to my case. For example,
                  Chapt 10 of the quickstart guide states "For the example
                  here, you must include a realm in your login-conf.xml file
                  ...". But is that necessary for ALL adaptors, or only
                  because of special characteristics of "the example here"?

                  I've successfully, and easily, deployed this resource adaptor with Weblogic, so that is my standard of reference, and I forsee my JBoss deployment taking
                  considerably more hours and experimentation.

                  • 6. Re: Need JCA XML file
                    David Jencks Master

                    How about the jmx-api documentation? Unfortunately my efforts to get this into the binary distros seem to have failed, but it has more info than the quickstart guide.

                    Get the source, and in connector, run ./build.sh all, and look in connector/output/jmx-api with your browser.

                    I don't have a no-tx adapter to experiment with, but something like the attached might work. Perhaps someone would consider contributing a working configuration should they get one working.

                    • 7. Re: Need JCA XML file
                      Glen Cordrey Newbie

                      What do you mean by the jmx-api documentation? I just
                      downloaded and built jboss-3.0.1RC1-src via build/build.bat and built ok except for deprecation
                      warnings, and there is
                      no connector/output/jmx-api.

                      • 8. Re: Need JCA XML file
                        Glen Cordrey Newbie

                        Ok, I finally got it working. For reference purposes
                        a minimal service.xml file is attached. This file
                        is for a connector that does not support transactions
                        and uses the default security mechanism.

                        The items
                        to change are those that have 'my' in them.
                        From my testing so far, MyDS is just an arbitrary name.
                        myJndiName, on the otherhand, needs to be the same value
                        as that referenced by the res-ref-name tag in the
                        jboss-web.xml, if the connector is to be accessible to servlets (which is how I've tested this).

                        • 9. Re: Need JCA XML file
                          David Jencks Master

                          Thanks for the sample. When I built connector/build.sh all earlier today the jmx-api docs were generated. Did you use the "all" target?

                          • 10. Re: Need JCA XML file
                            Glen Cordrey Newbie

                            Apparently I didn't use 'all', because I just reran the build w/all and got the documents. Thanks for your help.