Configure the Oracle database connection pool in JBoss

Source: Internet
Author: User
Tags jboss server

Http://blog.csdn.net/lijackly_lingtu/archive/2007/06/12/1649429.aspx

 

In the past two days, the system has been transferred from WebLogic + Oracle to JBoss + sqlserver;

I was not familiar with JBoss and EJB at all before, so I only got a little bit.

The developed IDE is eclipse. The first step is to build a small EJB J2EE application, deploy it on the JBoss server, and then access it. First, understand what is going on. In this way, we can better understand the complex configuration and deployment relationships in the subsequent project systems.

Finally, I finalized the development environment: myeclipse + lomboz + jbosside to develop this EJB application.

Plug-in lomboz + jbosside in eclipse, which has been recorded in my previous blog logs;

The details to be recorded today are: Database Configuration of JBoss;

Oracle is used, so there must be a oracle-ds.xml in the default/deploy, this file can find a jboss-4.0.0 Template under the oracle-ds.xml/docs/examples/JCA, then you can write your own data;

For example:

<? XML version = "1.0" encoding = "UTF-8"?>

<Datasources>

<Local-TX-datasource>
<JNDI-Name> datasource </JNDI-Name>
<Connection-URL> JDBC: oracle: thin: @ 10.14.107: 1521: ora920 </connection-URL>
<Driver-class> oracle. JDBC. Driver. oracledriver </driver-class>
<User-Name> inpl </user-Name>
<Password> inpl </password>

<Exception-sorter-class-Name> org. JBoss. Resource. Adapter. JDBC. Vendor. oracleexceptionsorter </exception-sorter-class-Name>

<Metadata>
<Type-mapping> Oracle9i </type-mapping>
</Metadata>

<Min-pool-size> 50 </min-pool-size>
<Max-pool-size> 200 </max-pool-size>
<Blocking-timeout-millis> 5000 </blocking-timeout-millis>
<Idle-timeout-minutes> 2 </idle-timeout-minutes>

</Local-TX-datasource>

</Datasources>

Nothing else can be said. In fact, developing an EJB system is the same thing. As long as you develop it according to the EJB syntax, there are several configuration files and classes, and you have set jndi_name, this is done, and the rest is normal Web development!

 

This article from the csdn blog, reproduced please indicate the source: http://blog.csdn.net/lijackly_lingtu/archive/2007/06/12/1649429.aspx

 

 

--------------------------------------------------------------------------

The meanings of parameters are as follows:

I. minsize: the minimum number of connections maintained by the connection pool.

Ii. maxsize: the maximum number of connections maintained by the connection pool.

Iii. blockingtimeoutmillis: Maximum waiting time before an exception is thrown.

Iv. idletimeoutminutes: The maximum idle time before the connection is closed.

V. criteria: the values include bycontainerandapplication, bycontainer, byapplication, and bynothing.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.