I have also to declare always the resource for non jta datasource with jta
false ?
Whi into petsistece.xml ir is necessary to specify bot jta-datasource and
nojtA-datasource?

What it is the difference from the datasource pooled getting from normal
tomcat  ? I refer to datasource fir poolig connection thar into tomcat i
declare into context.xml and i refer it into web.xml into reference ??

Mauro.
 Il giorno 04/apr/2013 13.20, "smithh032772 [via OpenEJB]" <
[email protected]> ha scritto:

> On Thu, Apr 4, 2013 at 7:07 AM, Romain Manni-Bucau <[hidden 
> email]<http://user/SendEmail.jtp?type=node&node=4661985&i=0>>wrote:
>
>
> >
> > about the jta datasource define a datasource in tomee.xml with
> JtaManaged =
> > true and check you rpersistence.xml is of transaction-type = JTA
> >
> >
> For an example of what Romain is talking about above, see below (copied
> and
> pasted from an older mail thread, where this was discussed earlier.
>
> I am specifying my datasource(s) in tomee.xml, it references the
> jta-data-source name as defined inpersistence.xml. I would assume this is
> sufficient to specify as many persistence providers inpersistence.xml and
> as many resources in tomee.xml which reference jta-data-source name's
> defined in persistence.xml.
>
> So, my tomee.xml contains the following:
>
> <Resource id="jdbc/mcmsJta" type="javax.sql.DataSource">
>   JdbcDriver org.apache.derby.jdbc.EmbeddedDriver
>   JdbcUrl jdbc:derby:C:/javadb/databases/mcmsdev;create=true
>   UserName ...
>   Password ...
>   JtaManaged true
>   jmxEnabled true
>   LogSql false
>   InitialSize 10
>   MaxActive 100
>   MaxIdle 30
>   MaxWait 10000
>   minIdle 10
>   suspectTimeout 60
>   removeAbandoned true
>   removeAbandonedTimeout 180
>   timeBetweenEvictionRunsMillis 30000
>   jdbcInterceptors=StatementCache(max=128)
> </Resource>
>
>
> and persistence.xml contains the following:
>
>
> <?xml version="1.0" encoding="UTF-8"?>
> <persistence version="2.0"
>              xmlns="http://java.sun.com/xml/ns/persistence";
>              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>              xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
> http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd";>
>     <persistence-unit name="mcmsPU" transaction-type="JTA">
>
> <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
>         <jta-data-source>jdbc/mcmsJta</jta-data-source>
>         <non-jta-data-source>jdbc/mcmsNonJta</non-jta-data-source>
>         <exclude-unlisted-classes>false</exclude-unlisted-classes>
>         <properties>
>         <property name="eclipselink.target-database"
>                   value="org.eclipse.persistence
> .platform.database.DerbyPlatform"/>
>         <property name="eclipselink.jdbc.cache-statements" value="true" />
>         <property name="eclipselink.jdbc.cache-statements.size"
> value="100"
> />
>         <property name="eclipselink.logging.parameters" value="false" />
>         </properties>
>     </persistence-unit>
> </persistence>
>
>
> I'm sure you will find earlier topics discussed in this list, if you go to
> google and search for:
>
> tomee.xml  resource persistence.xml JTA openejb
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://openejb.979440.n4.nabble.com/web-application-not-work-with-db-mysql-and-derby-tp4661958p4661985.html
>  To unsubscribe from web application not work with db mysql and derby, click
> here<http://openejb.979440.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4661958&code=bWF1cm8yamF2YTIwMTFAZ21haWwuY29tfDQ2NjE5NTh8LTExMTcxODc2MjU=>
> .
> NAML<http://openejb.979440.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>




--
View this message in context: 
http://openejb.979440.n4.nabble.com/web-application-not-work-with-db-mysql-and-derby-tp4661958p4661986.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Reply via email to