<!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="http://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;">
    Re: mixing EJB2.1 with EJB3, datasource is down
</h3>
<span style="margin-bottom: 10px;">
    created by <a href="http://community.jboss.org/people/kobiianko">Kobi Ianko</a> in <i>EJB3</i> - <a href="http://community.jboss.org/message/575159#575159">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">

<div class="jive-rendered-content"><p>the DS file works fine if I use only the EJB2.1 project or use only the new EJB3 JAR in the deploy directory.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>ds file:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>&lt;?xml version="1.0" encoding="UTF-8"?&gt;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>&lt;!-- The Hypersonic embedded database JCA connection factory config<br/>$Id: sybase-ds.xml,v 1.2 2010/05/26 12:18:11 kianko Exp $ --&gt;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><br/>&lt;datasources&gt;<br/>&#160;&#160; &lt;local-tx-datasource&gt;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>&#160;&#160;&#160;&#160;&#160; &lt;!-- The jndi name of the DataSource, it is prefixed with java:/ --&gt;<br/>&#160;&#160;&#160;&#160;&#160; &lt;!-- Datasources are not available outside the virtual machine --&gt;<br/>&#160;&#160;&#160;&#160;&#160; &lt;jndi-name&gt;AllotDS&lt;/jndi-name&gt;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>&#160;&#160;&#160;&#160;&#160; &lt;!-- for tcp connection, allowing other processes to use the hsqldb<br/>&#160;&#160;&#160;&#160;&#160; database. This requires the org.jboss.jdbc.HypersonicDatabase mbean.<br/>&#160;&#160;&#160;&#160;&#160; &lt;connection-url&gt;jdbc:hsqldb:hsql://localhost:1701&lt;/connection-url&gt;<br/>--&gt;<br/>&#160;&#160;&#160;&#160;&#160; &lt;!-- for totally in-memory db, not saved when jboss stops. <br/>&#160;&#160;&#160;&#160;&#160; The org.jboss.jdbc.HypersonicDatabase mbean is unnecessary<br/>&#160;&#160;&#160;&#160;&#160; &lt;connection-url&gt;jdbc:hsqldb:.&lt;/connection-url&gt;<br/>--&gt;<br/>&#160;&#160;&#160;&#160;&#160; &lt;!-- for in-process db with file store, saved when jboss stops. The<br/>&#160;&#160;&#160;&#160;&#160; org.jboss.jdbc.HypersonicDatabase is unnecessary<br/>--&gt;<br/>&#160;&#160;&#160;&#160;&#160; &lt;connection-url&gt;jdbc:sybase:Tds:10.90.90.81:50078?ServiceName=kobi_cfg&amp;amp;autocommit=FALSE&amp;amp;&lt;/connection-url&gt;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>&#160;&#160;&#160;&#160;&#160; &lt;!-- The driver class --&gt;<br/>&#160;&#160;&#160;&#160;&#160; &lt;driver-class&gt;com.sybase.jdbc3.jdbc.SybDataSource&lt;/driver-class&gt;<br/>&#160;&#160;&#160;&#160;&#160; &lt;transaction-isolation&gt;TRANSACTION_READ_COMMITTED&lt;/transaction-isolation&gt;<br/>&#160;&#160;&#160;&#160;&#160; &lt;!-- The login and password --&gt;<br/>&#160;&#160;&#160;&#160;&#160; &lt;user-name&gt;user&lt;/user-name&gt;<br/>&#160;&#160;&#160;&#160;&#160; &lt;password&gt;pass&lt;/password&gt;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>&#160;&#160;&#160;&#160;&#160; &lt;!--example of how to specify class that determines if exception means connection should be destroyed--&gt;<br/>&#160;&#160;&#160;&#160;&#160; &lt;!--exception-sorter-class-name&gt;org.jboss.resource.adapter.jdbc.vendor.DummyExceptionSorter&lt;/exception-sorter-class-name--&gt;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>&#160;&#160;&#160;&#160;&#160; &lt;!-- this will be run before a managed connection is removed from the pool for use by a client--&gt;<br/>&#160;&#160;&#160;&#160;&#160; &lt;!--&lt;check-valid-connection-sql&gt;select * from something&lt;/check-valid-connection-sql&gt; --&gt;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>&#160;&#160;&#160;&#160;&#160; &lt;!-- The minimum connections in a pool/sub-pool. Pools are lazily constructed on first use --&gt;<br/>&#160;&#160;&#160;&#160;&#160; &lt;min-pool-size&gt;100&lt;/min-pool-size&gt;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>&#160;&#160;&#160;&#160;&#160; &lt;!-- The maximum connections in a pool/sub-pool --&gt;<br/>&#160;&#160;&#160;&#160;&#160; &lt;max-pool-size&gt;200&lt;/max-pool-size&gt;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>&#160;&#160;&#160;&#160;&#160; &lt;!-- The time before an unused connection is destroyed --&gt;<br/>&#160;&#160;&#160;&#160;&#160; &lt;!-- NOTE: This is the check period. It will be destroyed somewhere between 1x and 2x this timeout after last use --&gt;<br/>&#160;&#160;&#160;&#160;&#160; &lt;!-- TEMPORARY FIX! - Disable idle connection removal, HSQLDB has a problem with not reaping threads on closed connections --&gt;<br/>&#160;&#160;&#160;&#160;&#160; &lt;idle-timeout-minutes&gt;5&lt;/idle-timeout-minutes&gt;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>&#160;&#160;&#160;&#160;&#160; &lt;!-- sql to call when connection is created --&gt;<br/>&#160;&#160;&#160;&#160;&#160; &lt;new-connection-sql&gt;SELECT 1&lt;/new-connection-sql&gt;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><br/>&#160;&#160;&#160;&#160;&#160; &lt;!-- sql to call on an existing pooled connection when it is obtained from pool <br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;check-valid-connection-sql&gt;some arbitrary sql&lt;/check-valid-connection-sql&gt;<br/>&#160;&#160;&#160;&#160;&#160; --&gt;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>&#160;&#160;&#160;&#160;&#160; &lt;!-- example of how to specify a class that determines a connection is valid before it is handed out from the pool<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;valid-connection-checker-class-name&gt;org.jboss.resource.adapter.jdbc.vendor.DummyValidConnectionChecker&lt;/valid-connection-checker-class-name&gt;<br/>&#160;&#160;&#160;&#160;&#160; --&gt;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>&#160;&#160;&#160;&#160;&#160; &lt;!-- Whether to check all statements are closed when the connection is returned to the pool,<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; this is a debugging feature that should be turned off in production --&gt;<br/>&#160;&#160;&#160;&#160;&#160; &lt;track-statements&gt;true&lt;/track-statements&gt;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>&#160;&#160;&#160;&#160;&#160; &lt;!-- Use the getConnection(user, pw) for logins<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;application-managed-security/&gt;<br/>&#160;&#160;&#160;&#160;&#160; --&gt;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>&#160;&#160;&#160;&#160;&#160; &lt;!-- Use the security domain defined in conf/login-config.xml --&gt;<br/>&#160;&#160;&#160;&#160;&#160; &lt;!--security-domain&gt;HsqlDbRealm&lt;/security-domain--&gt;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>&#160;&#160;&#160;&#160;&#160; &lt;!-- Use the security domain defined in conf/login-config.xml or the<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; getConnection(user, pw) for logins. The security domain takes precedence.<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;security-domain-and-application&gt;HsqlDbRealm&lt;/security-domain-and-application&gt;<br/>&#160;&#160;&#160;&#160;&#160; --&gt;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>&#160;&#160;&#160;&#160;&#160; &lt;!-- Add this depends tag if you are using the tcp connection url<br/>&#160;&#160;&#160;&#160;&#160; &lt;depends&gt;jboss:service=Hypersonic&lt;/depends&gt;<br/> --&gt;<br/>&#160;&#160; &lt;/local-tx-datasource&gt;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>&#160;&#160; &lt;!-- This mbean should be used only when using tcp connections. Uncomment<br/>&#160;&#160; when the tcp based connection-url is used. --&gt;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>&lt;/datasources&gt;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>10x, Kobi</p></div>

<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
    <p style="margin: 0;">Reply to this message by <a href="http://community.jboss.org/message/575159#575159">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in EJB3 at <a href="http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2029">Community</a></p>
</div></td>
                        </tr>
                    </tbody>
                </table>


                </td>
            </tr>
        </tbody>
    </table>

</div>

</body>
</html>