[prev in list] [next in list] [prev in thread] [next in thread]
List: jboss-user
Subject: [jboss-user] [Datasource Configuration] - Use c3p0 with JBOSS AS 7.1.1
From: Álvaro_López_López <do-not-reply () jboss ! com>
Date: 2013-06-28 8:51:53
Message-ID: 2-825446-3-147320-1372409510374.jivesbs.jivemailuser () https://community ! jboss ! org
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
Álvaro López López [https://community.jboss.org/people/allopez] created the \
discussion
"Use c3p0 with JBOSS AS 7.1.1"
To view the discussion, visit: https://community.jboss.org/message/825446#825446
--------------------------------------------------------------
Hello everyone,
I read in c3p0 s manual: http://www.mchange.com/projects/c3p0/#jboss-specific \
http://www.mchange.com/projects/c3p0/#jboss-specific that it is possible to use \
c3p0 library inside JBOSS as an MBean. Once configured correctly, I would like to \
reference the new C3P0PooledDataSource in my Java WAR through its JNDI name. As I am \
using Spring it would be something similar to:
[src/webapp/WEB-INF/applicationContext.xml]
*<jee:jndi-lookup id="dataSource" jndi-name="java:PooledDS" />*
However, I don t know how to configure this library properly. I tried to place \
*c3p0-0.9.2.1.jar* and *c3p0-service.xml* in the folders commented in the manual but \
I had no luck :( . So:
* *Is it possible to use c3p0 connection pool inside JBOSS AS 7.1.1? How should I \
configure it?*
I started to "play" with c3p0 because of its large number of configuration \
properties, but I don t know if c3p0 is better than embedded JBOSS pooling \
capabilities.
* *Does c3p0 library deserve to be used instead of JBOSS embedded connection pool \
(i.e. configuring the datasource with the admin console/web) ?*
I am currently developing a project which uses a MySql database.
I appreciate any comments to these matters.*
*
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/825446#825446]
Start a new discussion in Datasource Configuration at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2077]
[Attachment #5 (text/html)]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link="#355491" alink="#4262a1" vlink="#355491" style="background: #e2e2e2; \
margin: 0; padding: 20px;">
<div>
<table cellpadding="0" bgcolor="#FFFFFF" border="0" cellspacing="0" style="border: \
1px solid #dadada; margin-bottom: 30px; width: 100%; -moz-border-radius: 6px; \
-webkit-border-radius: 6px;"> <tbody>
<tr>
<td>
<table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" \
style="border: solid 2px #ccc; background: #dadada; width: 100%; -moz-border-radius: \
6px; -webkit-border-radius: 6px;"> <tbody>
<tr>
<td bgcolor="#000000" valign="middle" height="58px" style="border-bottom: 1px \
solid #ccc; padding: 20px; -moz-border-radius-topleft: 3px; \
-moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 5px; \
-webkit-border-top-left-radius: 5px;">
<h1 style="color: #333333; font: bold 22px Arial, Helvetica, sans-serif; \
margin: 0; display: block !important;">
<!-- To have a header image/logo replace the name below with your img tag \
-->
<!-- Email clients will render the images when the message is read so any \
image -->
<!-- must be made available on a public server, so that all recipients can \
load the image. -->
<a href="https://community.jboss.org/index.jspa" style="text-decoration: \
none; color: #E1E1E1">JBoss Community</a></h1> </td>
</tr>
<tr>
<td bgcolor="#FFFFFF" style="font: normal 12px Arial, Helvetica, sans-serif; \
color:#333333; padding: 20px; -moz-border-radius-bottomleft: 4px; \
-moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 5px; \
-webkit-border-bottom-left-radius: 5px;"><h3 style="margin: 10px 0 5px; font-size: \
17px; font-weight: normal;"> Use c3p0 with JBOSS AS 7.1.1
</h3>
<span style="margin-bottom: 10px;">
created by <a href="https://community.jboss.org/people/allopez">Álvaro López \
López</a> in <i>Datasource Configuration</i> - <a \
href="https://community.jboss.org/message/825446#825446">View the full discussion</a> \
</span> <hr style="margin: 20px 0; border: none; background-color: #dadada; height: \
1px;">
<div class="jive-rendered-content"><p>Hello everyone,</p><p style="min-height: 8pt; \
height: 8pt; padding: 0px;"> </p><p>I read in c3p0´s manual: <a \
class="jive-link-external-small" \
href="http://www.mchange.com/projects/c3p0/#jboss-specific" \
rel="nofollow">http://www.mchange.com/projects/c3p0/#jboss-specific</a><span \
style="font-size: 10pt;">  that it is possible to use c3p0 library inside JBOSS \
as an MBean.</span></p><p>Once configured correctly, I would like to reference the \
new <span style="color: #000000; font-family: monospace; font-size: 11px; \
background-color: #ccccff;">C3P0PooledDataSource</span> in my Java WAR through its \
JNDI name. As I am using Spring</p><p>it would be something similar to:</p><p \
style="min-height: 8pt; height: 8pt; padding: \
0px;"> </p><p>[src/webapp/WEB-INF/applicationContext.xml]</p><p \
style="min-height: 8pt; height: 8pt; padding: \
0px;"> </p><p><strong><jee:jndi-lookup id="dataSource" \
jndi-name="java:PooledDS" /></strong></p><p style="min-height: 8pt; height: 8pt; \
padding: 0px;"> </p><p>However, I don´t know how to configure this library \
properly. I tried to place <strong>c3p0-0.9.2.1.jar</strong> and \
<strong>c3p0-service.xml</strong> in the folders commented in the manual</p><p>but I \
had no luck <span> :( </span>. So:</p><p style="min-height: 8pt; height: 8pt; \
padding: 0px;"> </p><ul><li><strong>Is it possible to use c3p0 connection pool \
inside JBOSS AS 7.1.1? How should I configure it?</strong></li></ul><p \
style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>I started to "play" \
with c3p0 because of its<span style="text-decoration: underline;"> large number of \
configuration properties</span>, but I don´t know if c3p0 is better than \
embedded JBOSS pooling capabilities.</p><p style="min-height: 8pt; height: 8pt; \
padding: 0px;"> </p><ul><li><strong>Does c3p0 library deserve to be used instead \
of JBOSS embedded connection pool (i.e. configuring the datasource with the admin \
console/web) ?</strong></li></ul><p>        I am \
currently developing a project which uses a <span style="text-decoration: \
underline;">MySql database</span>.</p><p style="min-height: 8pt; height: 8pt; \
padding: 0px;"> </p><p>I appreciate any comments to these \
matters.<strong><br/></strong></p></div>
<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
<p style="margin: 0;">Reply to this message by <a \
href="https://community.jboss.org/message/825446#825446">going to Community</a></p> \
<p style="margin: 0;">Start a new discussion in Datasource Configuration at <a \
href="https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2077">Community</a></p>
</div></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>
_______________________________________________
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic