1 2 Previous Next 18 Replies Latest reply on Aug 23, 2006 4:04 PM by system.out

    example JCA

    buzztroll

      I am looking into the JCA architecture. Does anyone have an example that creates a simple jca service, say local files?

        • 1. Re: example JCA
          michael_r

          Hello!
          Have a look at the JBoss Manual Chapter 7 (there is an example for a simple file system adapter)
          or
          http://www.javaworld.com/javaworld/jw-11-2001/jw-1121-jca.html
          or
          the sample adapters from SUN(tm).

          Greetings,
          Michael

          • 2. Re: example JCA
            davidjencks

            I recommend avoiding the javaworld article. IMO it is full of errors.

            A fairly complete adapter is the firebird jca-jdbc driver (sourceforge firebird project, cvs under client-java)

            • 3. Re: example JCA
              robbi

              I found two examples in the web:

              1.) http://www.javaworld.com/javaworld/jw-11-2001/jw-1121-jca.html
              I agree with David - this example seems to contain some errors.

              2.)http://www.fawcette.com/javapro/2002_02/magazine/features/tmodi/
              I was able to deploy this example on JBoss and for me it seems to be a easy to understand and complete JCA resource adapter example.

              See also my posting in:
              http://www.jboss.org/modules/bb/index.html?module=bb&op=viewtopic&t=forums/

              • 4. Re: example JCA
                fildiz57

                Robbi,
                Can you please post the example from;
                http://www.fawcette.com/javapro/2002_02/magazine/features/tmodi/
                with your modifications for JBoss deployment.
                It will be very helpful for me and others, I believe

                • 5. Re: example JCA
                  fildiz57

                  I have modified the example and deployed on JBoss. The code for the RA as well as a Test Hello Bean application is attached.

                  It runs on JBoss-3.0.4 version.

                  Unfortunately I could not manage to deploy this on JBoss-4.0.4alpha builds. If anyone can accomplish this, please let us know (or knows how).

                  • 6. Re: example JCA
                    lafr

                    For jboss-head (jboss-4.0.0alpha) the attribute "JndiName" must be an attribute for the ManagedConnection.
                    So move line 21 to line 6 in your jboss-service.xml.

                    I had the same problem with my ressource adapter.

                    • 7. Re: example JCA
                      alwyn

                      Hi David,

                      I have looked at the firebird adapter to investigate how it creates the services.xml file, but it doesn't seem to do anything but delete it from the deploy directory.

                      Is it possible to generate a services.xml file using xdoclet or do you always need to do it manually?

                      Regards,

                      • 8. Re: example JCA
                        davidjencks

                        I don't understand what you are saying about firebird.

                        I recommend using jboss 3.2 or 4 and using *-ds.xml files.

                        Both *-ds.xml and *-service.xml files must be created manually.

                        • 9. Re: example JCA
                          xiaoyi

                          Can you give me an xa transaction JCA adapter?
                          i want to connect jboss with websphere.
                          and i can't get http://www.jboss.org/modules/bb/index.html?module=bb&op=viewtopic&t=forums/
                          how to get it??
                          thanks!
                          i am in a hurry that i must complete it between 20 days!

                          • 10. Re: example JCA
                            wildwest59

                            Have attached a sample JCA app. Have tested it with
                            JBoss 3.2.0 w/ Tomcat 4.1.24 on Win2K using JDk 1.4

                            You would need to also have XDoclet installed.
                            Look @ bin/build.properties to set things up.

                            It's a non-transaction RA.

                            Let me know if you run into problems.

                            • 11. Re: example JCA
                              xiaoyi

                              oh!
                              thanks!
                              my jboss version is 4.00-alpha.
                              And i have downloaded the xdoclet.
                              but i don't know where is the property file of xdoclet that i must modify.example:ejb-version,jboss-version. and so on.
                              And what is the jca sample?
                              Will it conncect to a RDBS?
                              And how will i let it deal with a transaction ,and the transaction is a distributed transaction that bypass two jboss JVMS.
                              thanks your attention.

                              • 12. Re: example JCA
                                xiaoyi

                                i know .Dose only rename the build.property to ant.property?
                                And where dose the jca-sample's src directory put ?
                                Could you give me the whole example that is deployed on your jboss and tested successfully?
                                thanks!

                                • 13. Re: example JCA
                                  lguan

                                  I am trying the example in 3.2.1. I moved line 21 in jboss-service.xml to line 6. However I got the following exception, any ideas? - TIA

                                  17:52:55,890 INFO [ServiceConfigurator] Problem configuring service jboss.jca:s
                                  ervice=NoTxCM,name=propertiesfile
                                  org.jboss.deployment.DeploymentException: Exception setting attribute javax.mana
                                  gement.Attribute: name=ManagedConnectionFactoryName value=jboss.jca:service=NoTx
                                  PF,name=propertiesfile on mbean jboss.jca:service=NoTxCM,name=propertiesfile; -
                                  nested throwable: (javax.management.AttributeNotFoundException: Writable attribu
                                  te 'ManagedConnectionFactoryName' not found)

                                  • 14. Re: example JCA
                                    lguan

                                    I got it working - the ManagedConnectionFactoryName MBean should be moved inside the configuration of ManagedConnedtionPool. My jboss-service.xml is attached.

                                    1 2 Previous Next