Subject Re: [IB-Java] firebirdsql and JBoss 2.4.4 setup
Author David Jencks
On 2002.02.01 17:04:52 -0500 murphyp1 wrote:
> I am working on getting JBoss 2.4.4. to work with Firebird 1.0RC2
> databases. I have built the following in jboss.jcml:
>
> <mbean code="org.jboss.jdbc.XADataSourceLoader"
> name="DefaultDomain:service=XADataSource,name=D6501Security">
> <attribute name="PoolName">D6501Security</attribute>
> <attribute
> name="DataSourceClass">org.jboss.pool.jdbc.xa.wrapper.XADataSourceImpl
> </attribute>
> <attribute
> name="URL">jdbc:firebirdsql:localhost/3050:/home2/d6501/d6501.gdb</att
> ribute>
> <attribute name="JDBCUser">sysdba</attribute>
> <attribute name="Password">masterkey</attribute>
> <attribute name="MinSize">0</attribute>
> <attribute name="MaxSize">10</attribute>
> <attribute name="IdleTimeout">1800000</attribute>
> <attribute name="IdleTimeoutEnabled">false</attribute>
> <attribute name="LoggingEnabled">false</attribute>
> <attribute name="MaxIdleTimeoutPercent">1.0</attribute>
> <attribute name="InvalidateOnError">false</attribute>
> <attribute name="TimestampUsed">false</attribute>
> <attribute name="Blocking">true</attribute>
> <attribute name="GCInterval">120000</attribute>
> <attribute name="GCMinIdleTime">1200000</attribute>
> </mbean>
>
>
> The JBoss server says that it comes up OK. My question is if I
> should be using a firebirdsql DataSource instead of the jboss wrapper
> and if the firebirdsql driver does connection pooling on it's own?
>
>
>

In a managed environment, you don't want a driver or connector doing
pooling on its own. The firebirdsql driver is designed primarily to be
used within a jca framework such a jboss provides. Here's a configuration
that I used on a "2.3" jboss some time ago, that uses the jboss jca
support. It is apt to be slightly more efficient than using the
XADataSourceLoader, and provides xa transaction support.


<mbean code="org.jboss.resource.ConnectionFactoryLoader"
name="JCA:service=ConnectionFactoryLoader,name=FirebirdsqlDS">
<attribute name="FactoryName">DefaultDS</attribute>
<attribute name="RARDeployerName">JCA:service=RARDeployer</attribute>
<attribute name="ResourceAdapterName">
Firebird Database Connector
</attribute>
<attribute name="Properties">
Database=localhost/3050:/usr/local/firebird/dev/client-java/db/fbmctest.gdb
</attribute>

<attribute name="ConnectionManagerFactoryName">
MinervaXACMFactory
</attribute>
<attribute name="ConnectionManagerProperties">
# Pool type - uncomment to force, otherwise it is the default
#PoolConfiguration=per-factory

# Connection pooling properties - see
# org.jboss.pool.PoolParameters
MinSize=0
MaxSize=10
Blocking=true
GCEnabled=false
IdleTimeoutEnabled=false
InvalidateOnError=false
TrackLastUsed=false
GCIntervalMillis=120000
GCMinIdleMillis=1200000
IdleTimeoutMillis=1800000
MaxIdleTimeoutPercent=1.0
</attribute>

<attribute name="PrincipalMappingClass">
org.jboss.resource.security.ManyToOnePrincipalMapping
</attribute>
<attribute name="PrincipalMappingProperties">
userName=sysdba
password=masterkey
</attribute>
</mbean>

I think I once had a jboss 2.4 version, but seem to have lost it. I don't
think there are significant differences. There's a jboss 3.0 config file
in cvs, find it from the online manual.

I'd be interested in knowing how this works out for you, and any problems
that arise. If you want cmp auto-table-creation, you may have to specify
your pk columns to be not null explicitly with a <nullable>false</nullable>
tag in jaws.xml.

david jencks

>
>
> To unsubscribe from this group, send an email to:
> IB-Java-unsubscribe@egroups.com
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>
>
>