<!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;">
    Could not enlist in transaction on entering meta-aware object! (Posgres + SQLite))
</h3>
<span style="margin-bottom: 10px;">
    reply from <a href="http://community.jboss.org/people/fidox666">Fidox 666</a> in <i>Datasource Configuration</i> - <a href="http://community.jboss.org/message/558644#558644">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">

<div class="jive-rendered-content"><p>I think the error was as follows:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>1) Data source type "<strong>local-tx-datasource</strong>" does not support multiple data sources (sqlite and postgresql concurrent transactions). The solution here is to change the type of data source from "<em><strong>local-tx-datasource</strong></em>" to "<em><strong>xa-datasource</strong></em>"</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>2) Also sqlite does not support "<em><strong>xa-datasource</strong></em>" type (specifically the problem with sqlite was that I could not find an sqlite implementation of the class "<em><p style="display: inline !important;"><strong>rg.postgresql.xa.PGXADataSource</strong><span style="font-style: normal;">", (*) maybe you can find one for mysql <span> :) </span> ), so I change the second data source database from sqlite to postgresql.</span></p></em></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>This is my "old" data source file:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><strong style="font-weight: bold;"><em style="font-style: italic;">&lt;datasources&gt;</em></strong></p><p style="padding-left: 30px;"><strong style="font-weight: bold;"><em style="font-style: italic;">&lt;!-- Postgresql --&gt;<br/></em></strong></p><p style="padding-left: 30px;"><strong style="font-weight: bold;"><em style="font-style: italic;">&lt;local-tx-datasource&gt;<br/></em></strong></p><p style="padding-left: 60px;"><strong style="font-weight: bold;"><em style="font-style: italic;">&lt;jndi-name&gt;Postgres1DS&lt;/jndi-name&gt;<br/></em></strong></p><p style="padding-left: 60px;"><strong style="font-weight: bold;"><em style="font-style: italic;">&lt;connection-url&gt;jdbc:postgresql://localhost:5432/db0&lt;/connection-url&gt;<br/></em></strong></p><p style="padding-left: 60px;"><strong style="font-weight: bold;"><em style="font-style: italic;">&lt;driver-class&gt;org.postgresql.Driver&lt;/driver-class&gt;<br/></em></strong></p><p style="padding-left: 60px;"><strong style="font-weight: bold;"><em style="font-style: italic;">&lt;user-name&gt;user1&lt;/user-name&gt;<br/></em></strong></p><p style="padding-left: 60px;"><strong style="font-weight: bold;"><em style="font-style: italic;">&lt;password&gt;u1pass&lt;/password&gt;</em></strong></p><p style="padding-left: 30px;"><strong style="font-weight: bold;"><em style="font-style: italic;">&lt;/local-tx-datasource&gt;<br/></em></strong></p><p style="padding-left: 30px;"><strong style="font-weight: bold;"><em style="font-style: italic;"><br/></em></strong></p><p style="padding-left: 30px;"><strong style="font-weight: bold;"><em style="font-style: italic;">&lt;!-- SQLite --&gt;<br/></em></strong></p><p style="padding-left: 30px;"><strong style="font-weight: bold;"><em style="font-style: italic;">&lt;local-tx-datasource&gt;</em></strong></p><p style="padding-left: 60px;"><strong style="font-weight: bold;"><em style="font-style: italic;">&lt;jndi-name&gt;Sqlite1DS&lt;/jndi-name&gt;<br/></em></strong></p><p style="padding-left: 60px;"><strong style="font-weight: bold;"><em style="font-style: italic;">&lt;connection-url&gt;</em></strong><strong style="font-weight: bold;"><em style="font-style: italic;">jdbc:sqlite:${jboss.server.data.dir}${/}db1.db</em></strong><strong style="font-weight: bold;"><em style="font-style: italic;">&lt;/connection-url&gt;</em></strong></p><p style="padding-left: 60px;"><strong style="font-weight: bold;"><em style="font-style: italic;">&lt;driver-class&gt;org.sqlite.JDBC&lt;/driver-class&gt;<br/></em></strong></p><p style="padding-left: 60px;"><strong style="font-weight: bold;"><em style="font-style: italic;">&lt;user-name&gt;user1&lt;/user-name&gt;<br/></em></strong></p><p style="padding-left: 60px;"><strong style="font-weight: bold;"><em style="font-style: italic;">&lt;password&gt;u1pass&lt;/password&gt;<br/></em></strong></p><p style="padding-left: 60px;"><strong style="font-weight: bold;"><em style="font-style: italic;">&lt;connection-property name="autoReconnect"&gt;true&lt;/connection-property&gt;<br/></em></strong></p><p style="padding-left: 30px;"><strong style="font-weight: bold;"><em style="font-style: italic;">&lt;/local-tx-datasource&gt;</em></strong></p><p><strong style="font-weight: bold;"><em style="font-style: italic;">&lt;/datasources&gt;</em></strong></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>And this is the "new one":</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><em style="font-style: italic;"><strong>&lt;datasources&gt;</strong></em></p><p><em style="font-style: italic;"><strong>&lt;!-- Postgresql --&gt;<br/></strong></em></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"><strong><em> </em></strong>&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"><strong><em> </em></strong>&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"><strong><em> </em></strong>&#160;</p><p><em><div id="_mcePaste"><strong>&#160;&#160; &lt;xa-datasource&gt;</strong></div><div><span style="font-style: normal; font-weight: normal; "><em><div style="display: inline !important; "><span style="font-style: normal; font-weight: normal; "><em><div id="_mcePaste" style="display: inline !important; padding-left: 30px; "><strong>&lt;jndi-name&gt;</strong><em style="font-style: italic;"><strong>Postgres1DS</strong></em><strong>&lt;/jndi-name&gt;</strong></div></em></span></div></em></span></div><div id="_mcePaste"> </div><div id="_mcePaste"><strong>&#160;&#160;&#160;&#160;&#160;&#160; &lt;xa-datasource-class&gt;org.postgresql.xa.PGXADataSource&lt;/xa-datasource-class&gt;</strong></div><div id="_mcePaste"><strong>&#160;&#160;&#160;&#160;&#160;&#160; &lt;xa-datasource-property name="ServerName"&gt;localhost&lt;/xa-datasource-property&gt;</strong></div><div id="_mcePaste"><strong>&#160;&#160;&#160;&#160;&#160;&#160; &lt;xa-datasource-property name="PortNumber"&gt;5432&lt;/xa-datasource-property&gt;</strong></div><div id="_mcePaste"> </div><div id="_mcePaste"><strong>&#160;&#160;&#160;&#160;&#160;&#160; &lt;xa-datasource-property name="DatabaseName"&gt;</strong><em style="font-style: italic;"><strong>db0</strong></em><strong>&lt;/xa-datasource-property&gt;</strong></div><div id="_mcePaste"><strong>&#160;&#160;&#160;&#160;&#160;&#160; &lt;xa-datasource-property name="User"&gt;user1&lt;/xa-datasource-property&gt;</strong></div><div id="_mcePaste"><strong>&#160;&#160;&#160;&#160;&#160;&#160; &lt;xa-datasource-property name="Password"&gt;u1pass&lt;/xa-datasource-property&gt;</strong></div><div id="_mcePaste"> </div><div id="_mcePaste"><strong>&#160;&#160;&#160;&#160;&#160;&#160; &lt;track-connection-by-tx&gt;&lt;/track-connection-by-tx&gt;</strong></div><div id="_mcePaste"><strong>&#160;&#160;&#160; &lt;/xa-datasource&gt;</strong></div><div> </div><strong><br/></strong></em></p><p><em><strong>&lt;!-- </strong><em style="font-style: italic;"><strong>Postgresql</strong></em><strong> --&gt;</strong></em></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"><strong><em> </em></strong>&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"><strong><em> </em></strong>&#160;</p><p><em><p><strong>&#160;&#160;&#160; &lt;xa-datasource&gt;<br/></strong></p><p><strong>&#160;&#160;&#160;&#160;&#160;&#160; &lt;jndi-name&gt;Postgres2DS&lt;/jndi-name&gt;<br/></strong></p><p><strong>&#160;&#160;&#160;&#160;&#160;&#160; &lt;xa-datasource-class&gt;org.postgresql.xa.PGXADataSource&lt;/xa-datasource-class&gt;<br/></strong></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"><span style="font-style: normal; font-weight: normal; "><strong><em> </em></strong></span>&#160;</p><em><p style="display: inline !important; "><strong>&#160;&#160;&#160;&#160;&#160;&#160; &lt;xa-datasource-property name="ServerName"&gt;localhost&lt;/xa-datasource-property&gt;<br/></strong></p></em><p><strong>&#160;&#160;&#160;&#160;&#160;&#160; &lt;xa-datasource-property name="PortNumber"&gt;5432&lt;/xa-datasource-property&gt;<br/></strong></p><p><strong>&#160;&#160;&#160;&#160;&#160;&#160; &lt;xa-datasource-property name="DatabaseName"&gt;db1&lt;/xa-datasource-property&gt;<br/></strong></p><p><strong>&#160;&#160;&#160;&#160;&#160;&#160; &lt;xa-datasource-property name="User"&gt;user1&lt;/xa-datasource-property&gt;<br/></strong></p><p><strong>&#160;&#160;&#160;&#160;&#160;&#160; &lt;xa-datasource-property name="Password"&gt;u1pass&lt;/xa-datasource-property&gt;<br/></strong></p><p><strong>&#160;&#160;&#160;&#160;&#160;&#160; &lt;track-connection-by-tx&gt;&lt;/track-connection-by-tx&gt;<br/></strong></p><p><strong> &lt;/xa-datasource&gt;<br/></strong></p><div> </div></em></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>So.. what I suggest you is to change the type of your data sources from "local-tx-datasource" to "xa-datasource", as I say (*).. you must to find a mysql implementation of the class "<em><p style="display: inline !important;"><strong>xa-datasource-class", </strong></p></em>and finally if you can not found this class, you should change the mysql database to postgresql.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>I hope I have been clear enough, if you find another point of view for this problem please let me know, sorry for my poor english.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><div class="almost_half_cell" id="gt-res-content"><div dir="ltr"><span class="short_text" id="result_box"><span>Best regards..</span></span></div><div> </div><div><span class="short_text"><span>Fido</span></span></div></div><div id="dict"> </div></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></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/558644#558644">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in Datasource Configuration at <a href="http://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>