geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Blevins <david.blev...@visi.com>
Subject Re: EJB 3.1 PFD2 is up for download
Date Wed, 11 Mar 2009 20:27:43 GMT

On Mar 11, 2009, at 1:09 PM, David Jencks wrote:

>
> On Mar 11, 2009, at 12:27 PM, David Blevins wrote:
>
>> 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");
>
> How do you get from a driver to a datasource?

Just using commons-dbcp.  Better said (which I think is the real  
question) the properties starting with 'javax.ejb' are standard  
properties, the rest are vendor specific.

-David



Mime
View raw message