Discussions

EJB programming & troubleshooting: Newbie Help in Deploying EJB

  1. Newbie Help in Deploying EJB (2 messages)

    I am trying to wrap a core set of classes into EJB's. The problem I've run into is that my core set is available to me as a JAR file and i've no clue as to how to deploy it in a ejb container.

    For instance lets assume that I've a MDB. The MDB's implementation and resource requirements are available to me in two jars Core.jar and CoreResources.jar. How can I deploy this in a app server, such that the MDB can actually find the resources and the classes.

    Help is appreciated. By the way I am using JRun for this simple test.
  2. My guess is that you can put your jar file (containing the core classes) in any directory on the server and change the classpath of the server to include this jar. I don't think the jar file containing the core classes and the ejb jar need to be one single jar...
  3. Ok the way this works is based on some looking around is in the MANIFEST.MF for the EJB you can add an entry for Class-Path and follow is by the list of Jars and Zip's you need in the classpath for the EJB. Works pretty well ( ofcourse it was designed to work that way). However the kicker the classpath as i read had to be in one line in the file. If you use ANT's property file task it will not allow you to have more than 72 Characters in one line and hence it breaks it up. I had to manually create the MANIFEST.MF file and check it into our SCM and use it at the time of packaging the EJB.