Hi,
furthermore you really should map then your DBPool to a resource in
jboss.xml:
    <resource-managers>
        <resource-manager res-class="org.jboss.ejb.deployment.JDBCResource">
            <res-name>jdbc/whateverresourcename</res-name>
            <res-jndi-name>java:/usersDB</res-jndi-name>
        </resource-manager>
    </resource-managers>
now you can do a lookup to:
java:comp/env/jdbc/whateverresourcename
hth,
Burkhard

----- Original Message -----
From: "Peter T. Abplanalp" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, June 27, 2002 7:39 AM
Subject: Re: [JBoss-user] How to specify database name in jboss.jcml file


> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On Thu, Jun 27, 2002 at 11:19:07AM +0530, Tejeshwar wrote:
> > Hi
>
> hi.
>
> > I had configured MS SQLServer 2000 as the SQlServerpool in jboss.jcml
> > file. I am using jboss-2.4.4 and the driver is microsoft sql server
> > driver. How can sepecify a specific database name in jboss.jcml file.
>
> if i understand your questions correctly you need to do 2 things.  1)
> you need to tell jboss to load your jdbc driver.  you do this by
> adding your driver to the JDBC section of the jcml file.  below is an
> example using the mm.mysql driver:
>
> <mbean code="org.jboss.jdbc.JdbcProvider"
>        name="DefaultDomain:service=JdbcProvider">
>   <attribute name="Drivers">org.gjt.mm.mysql.Driver,org.hsqldb.jdbcDriver
>         </attribute>
> </mbean>
>
> the next thing you need to do is create a datasource. below is an
> example (notice where you need to add your user and password info and
> also you will need to change the url to match you driver):
>
> <mbean code="org.jboss.jdbc.XADataSourceLoader"
>        name="DefaultDomain:service=XADataSource,name=usersDB">
>   <attribute name="PoolName">usersDS</attribute>
>   <attribute
name="DataSourceClass">org.jboss.pool.jdbc.xa.wrapper.XADataSourceImpl</attr
ibute>
>   <attribute name="Properties"></attribute>
>   <attribute name="URL">jdbc:mysql://localhost/users</attribute>
>   <attribute name="JDBCUser">ADD YOUR USER NAME HERE</attribute>
>   <attribute name="Password">ADD YOUR PASSWORD HERE</attribute>
>   <attribute name="GCMinIdleTime">1200000</attribute>
>   <attribute name="MaxSize">10</attribute>
>   <attribute name="GCEnabled">false</attribute>
>   <attribute name="InvalidateOnError">false</attribute>
>   <attribute name="TimestampUsed">false</attribute>
>   <attribute name="Blocking">true</attribute>
>   <attribute name="GCInterval">120000</attribute>
>   <attribute name="IdleTimeout">1800000</attribute>
>   <attribute name="IdleTimeoutEnabled">false</attribute>
>   <attribute name="LoggingEnabled">true</attribute>
>   <attribute name="MaxIdleTimeoutPercent">1.0</attribute>
>   <attribute name="MinSize">0</attribute>
> </mbean>
>
> - --
> Peter Abplanalp
>
> Email:   [EMAIL PROTECTED]
> PGP:     pgp.mit.edu
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.0.7 (GNU/Linux)
>
> iD8DBQE9GweSggA8sH0iRXQRAk9gAJ9fbOGwLqLd5P/CyIEWEodZHnBXsgCfQPD+
> yUGghOvsydfA/Vy/Gdrgtuo=
> =MBz8
> -----END PGP SIGNATURE-----
>
>
> -------------------------------------------------------
> Sponsored by:
> ThinkGeek at http://www.ThinkGeek.com/
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-user
>



-------------------------------------------------------
Sponsored by:
ThinkGeek at http://www.ThinkGeek.com/
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to