0 Replies Latest reply on Jan 1, 2007 12:09 PM by Will Woodman

    how to start!

    Will Woodman Newbie

      I've been having a play with hibernate entity manager, and annotations in standalone mode,

      I then thought i'd make the next step the embedded ejb3 server - but still without a full AS. (take things small step at a time).

      I got the ejb3 RC9 and RC9.1 zips and unzipped them into a jboss root folder.

      I then included all the jars in the /lib and ejb3.deployer foolders into the eclipse class path

      I then tried to but i cant figure out what next. I tried to copy some sample programme from the hibernate persistence chapter 2 thats on the web.

      public class NeilsApp2 {
       import org.jboss.ejb3.embedded.EJB3StandaloneBootstrap;
       import javax.naming.InitialContext;
       public class HelloWorld {
       public static void main(String[] args) throws Exception {
      // Boot the JBoss Microcontainer with EJB3 settings, automatically
      // loads ejb3-interceptors-aop.xml and embedded-jboss-beans.xml
      // Deploy custom stateless beans (datasource, mostly)
      // Deploy all EJBs found on classpath (slow, scans all)
      // EJB3StandaloneBootstrap.scanClasspath();
      // Deploy all EJBs found on classpath (fast, scans build directory)
      // This is a relative location, matching the substring end of one
      // of java.class.path locations. Print out the value of
      // System.getProperty("java.class.path") to see all paths.
      // Create InitialContext from jndi.properties
       Listing 2.16 ?Hello World? main application code, calling EJBs
       Starting a Java Persistence project 85
       InitialContext initialContext = new InitialContext();
      // Look up the stateless MessageHandler EJB
       MessageHandler msgHandler = (MessageHandler) initialContext
      // Call the stateless EJB
      // Shut down EJB container

      this as cut and pasted. Eclipse says it cant find resolution for the imports. In particular i cant find any jar file with an org.jboss.ejb3.embedded package in it.

      I dont understand what else i'm missing.

      I downloaded the jboss5 beta - however if i try and use jboss IDE to create a server it only sees version4. I pointed it at the jboss5 server anyhow in default and all modes. HOwever if i try and create an ejb3 project in eclipse - it says the server doesnt have the required ejb3 jars. so i've gone no further down this route at present.

      Any how i wanted the embbedded version outside of an AS first. So what am i supposed to do to get the ejb3 embedded version up and running.

      The chapter2 words imply their is an embedded-jboss-beans.xml file but i cant find that in the rc9.1 extract. Do you have to have the full AS as well as the ejb3 files?

      Any help?