geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Blevins <david.blev...@visi.com>
Subject EJB 3.1 PFD2 is up for download
Date Wed, 11 Mar 2009 19:27:27 GMT
The JSR #318 Expert Group has put another Proposed Final Draft (PFD)  
up for download:

Enterprise JavaBeans 3.1

  http://jcp.org/aboutJava/communityprocess/pfd/jsr318/index.html

Note this is still a draft and no the final spec.

Have a look at chapter 22 and see if anything feels familiar.

Essentially this:

    Properties p = new Properties();
    p.put("java.naming.factory.initial",  
"org.apache.openejb.client.LocalInitialContextFactory");
    p.put("movieDatabase", "new://Resource?type=DataSource");
    p.put("movieDatabase.JdbcDriver", "org.hsqldb.jdbcDriver");
    p.put("movieDatabase.JdbcUrl", "jdbc:hsqldb:mem:moviedb");

    p.put("movieDatabaseUnmanaged", "new://Resource?type=DataSource");
    p.put("movieDatabaseUnmanaged.JdbcDriver", "org.hsqldb.jdbcDriver");
    p.put("movieDatabaseUnmanaged.JdbcUrl", "jdbc:hsqldb:mem:moviedb");
    p.put("movieDatabaseUnmanaged.JtaManaged", "false");

    Context context = new InitialContext(p);

    Movies movies = (Movies) context.lookup("MoviesLocal");

Becomes this:

    Properties p = new Properties();
    p.put("javax.ejb.embeddable.initial",  
"org.apache.openejb.client.LocalInitialContextFactory");
    p.put("movieDatabase", "new://Resource?type=DataSource");
    p.put("movieDatabase.JdbcDriver", "org.hsqldb.jdbcDriver");
    p.put("movieDatabase.JdbcUrl", "jdbc:hsqldb:mem:moviedb");

    p.put("movieDatabaseUnmanaged", "new://Resource?type=DataSource");
    p.put("movieDatabaseUnmanaged.JdbcDriver", "org.hsqldb.jdbcDriver");
    p.put("movieDatabaseUnmanaged.JdbcUrl", "jdbc:hsqldb:mem:moviedb");
    p.put("movieDatabaseUnmanaged.JtaManaged", "false");

    EJBContainer container = EJBContainer.createEJBContainer(p);

    Context context = container.getContext();

    Movies movies = (Movies) context.lookup("MoviesLocal");


-David


Mime
View raw message