5 Replies Latest reply on Oct 9, 2004 4:35 PM by mlapolla

    EJB client jar files

    doofus

      Hey,

      Just a quick question. What is the best way to generate Client (implementation/stub) jar files for use with client applications?

      I suppose I am asking a couple of things here:

      Is this method of deployment actually the best way in relation to JBoss?I didn't want to include the actual deployment ejb jar with the client or the classes
      Is there a non platform/tool specific way (eg: xdoclet) that will work with jboss?

      I'm using eclipse as my editor but have used Sun ONE previously (not with JBoss though) and it provided a simple right click feature for creating client jars.

        • 1. Re: EJB client jar files
          drew2002

          Hello all,
          I have the same problem, I know that with weblogic you get a tool for generating the client JAR, does anyone know of a tool to do the same thing for jboss?

          Thanks,
          Drew2002.

          • 2. Re: EJB client jar files
            doofus

            Following up on this:

            Using JBoss-IDE you can generate a simple client jar containing the required/EJB interfaces but this jar does not contain any stub/skeleton classes.

            It seems that even with this jar available you still need to setup security in order to obtain an initialcontext. You can do this using a policy file but .. geeze!

            Well, heres some more questions:

            - Is EJB the wrong choice for application's that require BOTH client and web capabilities? JBoss specific or not.

            - If yes, then what IS the best technique?

            - Am I missing the point completely? It's highly likely ..

            -luke

            • 3. Re: EJB client jar files
              darranl

              but this jar does not contain any stub/skeleton - They are not required.

              Put jbossall-client.jar on the classpath of the client and the jar file that contains the home and remote interfaces of the beans that the client needs to access.

              It seems that even with this jar available you still need to setup security in order to obtain an initialcontext - I have never had to set up anything to do with security to get a client to use a bean remotely, what exactly are you doing?

              but .. geeze! - How did you find the getting started guide to follow through?

              • 4. Re: EJB client jar files
                doofus

                Hey,

                I am not sure what you mean by your last question, sorry, but as far as getting started guides go the JBoss-IDE is a pretty good one.

                I managed to solve the problem. I still am not 100% sure why I was getting the security issues but I am guessing it was a classpath issue (my bad).

                I am sorry if this was all a pretty straightforward issue but I have not really found any substantial documentation on the issue of client-EJB communication where the client and EJB are in separate "projects".

                So to recap, the solution is:

                - generate client jar (containing interfaces only) - jboss-ide is great for this
                - generate and deploy the ejb to jboss
                - add jbossall-client.jar and [app]client.jar to your client's classpath

                It seems so idiodically simple now, but I was tearing my hair out earlier this week over it.

                -luke

                • 5. Re: EJB client jar files
                  mlapolla

                  JBoss 4.0 embedded Tomcat and Tomcat 4 and 5.

                  So, If I understand this correctly, I need to generate the client.jar and use the jbossall-client.jar with my client and I'm OK. And my client should be running with JBoss. (I used to run Tomcat with a connector. Now, I assume I can just use JBoss with embedded Tomcat on my client tier. ?)

                  So, I generate myclient.jar with the JBoss-IDE. How do I do that with the IntelliJ IDE? I'm assuming I'd need the JBoss plugin. How is that coming?

                  Could someone point me to good documentation for the JBoss-IDE? I've seen some stuff but specifically generating client jars would be nice.

                  So, am I correct in thinking that if I use IntelliJ, I stilll need the JBoss-IDE, to generate the client interfaces? Is there a command line? Could someone point me to the appropriate WIKI or Forum answer?

                  Thanks.

                  M.