10 Replies Latest reply on Mar 26, 2006 11:34 AM by sony3002

    How to use Tomcat 5.5.12 as web client and JBoss 4.0.3 EJB a

    sony3002

      Hello all

      i am a novice in Ejb and now i have to work on Jboss ,
      so when i looked in the docs and also considering my needs i came up with
      a couple of doubts. first i will write down here what i have understood.

      Tomcat is HTTP server and JBoss is application server.
      Jboss use tomcat as its http server


      if this is correct then what i want is

      i don't need the http server of Jboss.
      i want to disable or stop it or don't want use jboss's http service

      i want to use stand alone tomcat5.5.12 from apache for me, to be used as client

      in a simple way
      i want to connect from tomcat on port 8080 at computer A
      and tomcat on port 8080 at computer B
      to
      Jboss on port 9090 that is installed on Computer C


      what should i do for this ???
      please provide your valuable comments

      thanking all

      Sony George
      sony3002@yahoo.com

        • 1. Re: How to use Tomcat 5.5.12 as web client and JBoss 4.0.3 E
          alesj

          Looks like you don't have a clue about it.

          That's all what EJB's are all about.

          For what to do if you don't need TC in JBossAS? Simply remove TC.sar directory/file from deploy.

          • 2. Re: How to use Tomcat 5.5.12 as web client and JBoss 4.0.3 E
            sony3002

            hello
            thank you for your reply

            i did as per your instruction and http of jboss didn't work
            :) i am happy
            no the next problem

            how to connect from another tomcat on another mech. to jboss ??? using EJB ??
            please some info

            when i try to search google "jboss + tomcat" +EJB then i am getting info
            of integrated tomcat in Jboss

            please help

            thanks

            Sony George

            • 3. Re: How to use Tomcat 5.5.12 as web client and JBoss 4.0.3 E
              alesj

              1. JBoss application server guide
              2. EJB specification (2.1 or not yet final 3.0 (jsr220))

              • 4. Re: How to use Tomcat 5.5.12 as web client and JBoss 4.0.3 E
                sony3002

                hello

                thank you for your reply

                i got JBoss application server guide
                from
                http://docs.jboss.org/jbossas/jboss4guide/r4/html/

                anf going through it.

                can you give , any example or link to example application
                that connect from tomcat to jboss ????
                so that i can start my work as early....

                :)

                sony

                • 5. Re: How to use Tomcat 5.5.12 as web client and JBoss 4.0.3 E
                  alesj

                  >> that connect from tomcat to jboss ????

                  That's a simple JNDI lookup to remote app server.

                  • 6. Re: How to use Tomcat 5.5.12 as web client and JBoss 4.0.3 E
                    sony3002

                     

                    "alesj" wrote:
                    >> that connect from tomcat to jboss ????

                    That's a simple JNDI lookup to remote app server.



                    how to look up remote app server ????

                    i dont know how to connect (:
                    please help

                    Soony



                    • 7. Re: How to use Tomcat 5.5.12 as web client and JBoss 4.0.3 E
                      j2ee_junkie

                      sony,

                      You really should read some documentation on Java's Enterprise Edition API usage, not just how to solve this one issue. I suggest starting at http://java.sun.com/j2ee/1.4/docs/tutorial/doc/index.html. Specifically to answer your last question, look at chapter 24 (Creating the application client.)

                      cgriffith

                      • 8. Re: How to use Tomcat 5.5.12 as web client and JBoss 4.0.3 E
                        alesj

                        What are you now: sony or soony.
                        Start with simpler apps.
                        Don't do remote stuff until you don't even master simple local stuff.
                        Be a Swing man or a Servlet dude for a year.
                        Or as we both told you, read, read and read.
                        Don't ask such stupid / general questions.

                        • 9. Re: How to use Tomcat 5.5.12 as web client and JBoss 4.0.3 E
                          sony3002

                          Thank you for the reply

                          i am now reading J2EE Tutorial
                          has not reached till chapter 24 , but now
                          understanding the way to proceed

                          thank you for the help :)

                          Sony George

                          • 10. Re: How to use Tomcat 5.5.12 as web client and JBoss 4.0.3 E
                            sony3002

                            hello alesj and j2ee_junkie

                            according to the great help provided by both of you,
                            i did manage almost 90% of my problems
                            i connected from stand alone tomcat to Jboss on port 1099 and i listed all the objects bind by jboss

                            then i downloaded netbeans 5.5 J2EE preview and created a sample ejb module in it using Jboss as the J2EE server
                            when i deployed it i got the following error in jboss

                            21:19:34,046 ERROR [MainDeployer] Could not create deployment:
                            file:/D:/jboss-4.0.3SP1/server/default/deploy/EJBModule.jar
                            org.jboss.deployment.DeploymentException:
                            ejb-jar.xml must either obey the right xml schema or define a valid DOCTYPE!

                            when i looked in to the ejb-jar.xml i found that it had only schema def. here is the file

                            <?xml version="1.0" encoding="UTF-8"?>
                            <ejb-jar version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd">
                            </ejb-jar>



                            when i created ejbmodule in EJB 2.1 format using netbeans 5.0 it wrote the ejb-jar.xml for me
                            so i copied that to my ejb-jar.xml and created the
                            new ejb-jar.xml file as follows

                            <?xml version="1.0" encoding="UTF-8"?>
                            <ejb-jar version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd">
                             <display-name>EJBModule</display-name>
                             <enterprise-beans>
                             <session>
                             <display-name>UserLoginBeanSB</display-name>
                             <ejb-name>UserLoginBean</ejb-name>
                             <remote>com.mycompany.myproject.ejb.login.UserLoginRemote</remote>
                             <ejb-class>com.mycompany.myproject.ejb.login.UserLoginBean</ejb-class>
                             <session-type>Stateless</session-type>
                             <transaction-type>Container</transaction-type>
                             </session>
                             </enterprise-beans>
                             <assembly-descriptor>
                             <container-transaction>
                             <method>
                             <ejb-name>UserLoginBean</ejb-name>
                             <method-name>*</method-name>
                             </method>
                             <trans-attribute>Required</trans-attribute>
                             </container-transaction>
                             </assembly-descriptor>
                             </ejb-jar>
                            
                            


                            then also it showed the same error
                            where will i get the doc to create ejb-jar.xml
                            in EJB3 schema ????

                            thank you

                            Sony