Subject | Re: Datasources and JNDI |
---|---|
Author | Roman Rokytskyy |
Post date | 2004-07-12T21:17:50Z |
> Since JBoss doesn't reveal datasources to clients, I need to place aFAQ contains outdated info. Since RC3 FBWrappingDataSource class is
> datasource in JNDI myself. While the Jaybird FAQ mentions a
> FBDataSourceObjectFactory class, I can't find it in the rc3 full
> JAR.
also an object factory for itself. Same happens for
FBConnectionPoolDataSource.
> What I do is create a FBWrappingDataSource and set the database URL,You have to specify object factory in the JNDI properties (either as
> username, and password, call getDefaultReference(), and bind that to
> a name in JNDI. When I need a connection I lookup that reference,
> create a new FBWrappingDataSource, and call setReference().
>
> The problem is that I can't get a connection from this datasource,
> and when I examine its properties they are all null.
>
> What is the correct way to create a datasource and make it available
> through JNDI?
system property or initial context parameter). Then you can bind a
reference or created object. But object factory is essential.
Roman