5 Replies Latest reply on Apr 5, 2007 10:34 PM by Bruce Yuan

    need help! JCA sample!

    Bruce Yuan Newbie

      need help!
      i'm in a hurry to finish a thesis, and it need a JCA sample app.(no matter JCA1.0 OR 1.5, as simple as you can....)
      who can give me a sample app with sourcecode?

      thanks a lot!
      very hurry!

        • 1. Re: need help! JCA sample!
          Vicky Kak Master

          Download the jboss4guide.zip from here
          http://docs.jboss.org/jbossas/jboss4guide/r5/

          Look for the chapter 7 sample application , the details about the sample applicaiton are given in
          http://docs.jboss.org/jbossas/jboss4guide/r5/html/ch7.chapt.html

          • 2. Re: need help! JCA sample!
            Bruce Yuan Newbie

            thanks a lot.
            i've deploy the sample on my JBoss 4.0.5 AS.

            the output of the guide was successful shown

            run-example1:
             [copy] Copying 1 file to D:\jboss-4.0.5.GA\server\default\deploy
             [echo] Waiting for deploy...
             [java] Created Echo
             [java] Echo.echo('Hello') = Hello


            But when i went to step 3 (to call the EchoBean), the console shows

            20:58:07,952 INFO [EchoBean] echo, arg=Hello
            20:58:07,962 ERROR [EchoBean] Failed during JNDI access
            javax.naming.NamingException: Could not dereference object [Root exception is javax.naming.NameNotFoundException: NoTransFS not bound]
             at org.jnp.interfaces.NamingContext.resolveLink NamingContext.java:1067)
            
            ......44more
            



            is that alright? or something wrong?


            • 3. Re: need help! JCA sample!
              Vicky Kak Master

               

              is that alright? or something wrong?

              No this is not correct , looks like notxfs-ds.xml present in the jboss4guide\examples\src\main\org\jboss\chap7\ex1 does not get deployed in the Jboss server .
              Please explain the complete set of steps you have been performing.

              • 4. Re: need help! JCA sample!
                Bruce Yuan Newbie

                well......i just follow the guide
                1. ant-Dchap=chap7 build-chap

                Buildfile: build.xml
                
                validate:
                
                fail_if_not_valid:
                
                init:
                 [echo] Using jboss.dist=D:/jboss-4.0.5.GA
                
                compile:
                
                build-chap:
                
                build-all:
                
                prepare:
                
                chap7-ex1-rar:
                
                prepare:
                
                chap7-ex1-jar:
                
                BUILD SUCCESSFUL
                Total time: 2 seconds


                then the example directory has a sub-dir named "output" which has 3 files:chap7-ex1.jar,4kb, chap-ex1.rar,10kb, ra.jar,10kb


                2. ant -Dchap=chap7 config
                Buildfile: build.xml
                
                validate:
                
                fail_if_not_valid:
                
                init:
                 [echo] Using jboss.dist=D:/jboss-4.0.5.GA
                
                compile:
                
                config:
                
                config:
                 [copy] Copying 1 file to D:\jboss-4.0.5.GA\server\default\deploy
                 [copy] Copying 1 file to D:\jboss-4.0.5.GA\server\default\deploy
                
                BUILD SUCCESSFUL
                Total time: 2 seconds


                then the jboss\server\default\deploy dir has 2 more files:chap7-ex1.rar 10kb, notxfx-ds.xml 1kb


                3. ant -Dchap=chap7 -Dex=1 run-example
                Buildfile: build.xml
                
                validate:
                
                fail_if_not_valid:
                
                init:
                 [echo] Using jboss.dist=D:/jboss-4.0.5.GA
                
                compile:
                
                run-example:
                
                prepare:
                
                chap7-ex1-jar:
                
                run-example1:
                 [copy] Copying 1 file to D:\jboss-4.0.5.GA\server\default\deploy
                 [echo] Waiting for deploy...
                 [java] Created Echo
                 [java] Echo.echo('Hello') = Hello
                
                BUILD SUCCESSFUL
                Total time: 9 seconds


                the deploy dir has 1 more file :chap7-ex1.jar 4kb

                then console shows the error above...


                i don't kown why

                • 5. Re: need help! JCA sample!
                  Bruce Yuan Newbie

                  well.....................
                  i have tried several time, it errs continuously


                  but after a reset of my computer, it's ok!

                  10:27:13,001 INFO [EchoBean] echo, arg=Hello
                  10:27:13,011 INFO [EchoBean] echo, ra/DirContextFactory=org.jboss.chap7.ex1.ra.
                  DirContextFactoryImpl@e59895
                  10:27:13,011 INFO [EchoBean] echo, found dcf=org.jboss.chap7.ex1.ra.DirContextF
                  actoryImpl@e59895
                  10:27:13,031 INFO [EchoBean] echo, lookup dc=org.jboss.chap7.ex1.ra.FSDirContex
                  t@71d768


                  so strange....

                  however thanks a lot my Indian friend