You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by wus <wu...@gmail.com> on 2016/11/25 12:41:06 UTC

Re: [TomEE 7.0.1] Does openejb-core-hibernate have the same usage as openejb-core-eclipselink in tomee-embedded-maven-plugin?

are there any workaround for the "chicken egg" issue?

i am using tomee plus 7.0.2 and openejb-core-hibernate.

Regards,

Shan



--
View this message in context: http://tomee-openejb.979440.n4.nabble.com/TomEE-7-0-1-Does-openejb-core-hibernate-have-the-same-usage-as-openejb-core-eclipselink-in-tomee-emb-tp4680402p4680636.html
Sent from the TomEE Users mailing list archive at Nabble.com.

Re: [TomEE 7.0.1] Does openejb-core-hibernate have the same usage as openejb-core-eclipselink in tomee-embedded-maven-plugin?

Posted by Romain Manni-Bucau <rm...@gmail.com>.
we don't read jboss datasource but we deploy an automatic datasource if
none is present. Think you got confused by that. Should be logged BTW
(Auto-adjusting...)


Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<https://blog-rmannibucau.rhcloud.com> | Old Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | JavaEE Factory
<https://javaeefactory-rmannibucau.rhcloud.com>

2016-11-28 15:50 GMT+01:00 wus <wu...@gmail.com>:

> thanks, it was the problem. after i added the resources.xml in project, it
> works fine now.
>
> BTW the error message did say that i should added the missing resource in
> my
> config.
>
> i thought, tomee works fine with coupon-ds.xml from "wildfly swarm", very
> strange :-)
>
>
>
> thx again and best regards,
>
> Shan
>
>
>
>
>
> --
> View this message in context: http://tomee-openejb.979440.
> n4.nabble.com/TomEE-7-0-1-Does-openejb-core-hibernate-
> have-the-same-usage-as-openejb-core-eclipselink-in-
> tomee-emb-tp4680402p4680650.html
> Sent from the TomEE Users mailing list archive at Nabble.com.
>

Re: [TomEE 7.0.1] Does openejb-core-hibernate have the same usage as openejb-core-eclipselink in tomee-embedded-maven-plugin?

Posted by wus <wu...@gmail.com>.
thanks, it was the problem. after i added the resources.xml in project, it
works fine now.

BTW the error message did say that i should added the missing resource in my
config. 

i thought, tomee works fine with coupon-ds.xml from "wildfly swarm", very
strange :-)



thx again and best regards,

Shan





--
View this message in context: http://tomee-openejb.979440.n4.nabble.com/TomEE-7-0-1-Does-openejb-core-hibernate-have-the-same-usage-as-openejb-core-eclipselink-in-tomee-emb-tp4680402p4680650.html
Sent from the TomEE Users mailing list archive at Nabble.com.

Re: [TomEE 7.0.1] Does openejb-core-hibernate have the same usage as openejb-core-eclipselink in tomee-embedded-maven-plugin?

Posted by Romain Manni-Bucau <rm...@gmail.com>.
this sample shows that it works well :)

isnt the issue that you just didnt define "java:jboss/datasources/CouponDS"
datasource (which BTW should rather be named datasources/CouponDS)?


Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<https://blog-rmannibucau.rhcloud.com> | Old Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | JavaEE Factory
<https://javaeefactory-rmannibucau.rhcloud.com>

2016-11-27 22:30 GMT+01:00 wus <wu...@gmail.com>:

> thanks for your reply.
>
> i have pushed my code in github(https://github.com/wus/jaxrs-jpa-tomee).
> it
> is a test redemption project with jaxrs, jpa in tomee. you can call to
> redemption(post) endpoint with the following curl cmd:
>
>  curl -i -H "content-type: application/json" -d '{"cardNr": "123454",
> "coupon": "test5"}' "http://localhost:8080/jaxrs-jpa/coupon/redemption"
>
>
> the changes has not been added into the datable. it looks like, no CDI
> Container managed transaction has been started.
>
> best regards,
>
> shan
>
>
>
>
> --
> View this message in context: http://tomee-openejb.979440.
> n4.nabble.com/TomEE-7-0-1-Does-openejb-core-hibernate-
> have-the-same-usage-as-openejb-core-eclipselink-in-
> tomee-emb-tp4680402p4680647.html
> Sent from the TomEE Users mailing list archive at Nabble.com.
>

Re: [TomEE 7.0.1] Does openejb-core-hibernate have the same usage as openejb-core-eclipselink in tomee-embedded-maven-plugin?

Posted by wus <wu...@gmail.com>.
thanks for your reply.

i have pushed my code in github(https://github.com/wus/jaxrs-jpa-tomee). it
is a test redemption project with jaxrs, jpa in tomee. you can call to
redemption(post) endpoint with the following curl cmd:

 curl -i -H "content-type: application/json" -d '{"cardNr": "123454",
"coupon": "test5"}' "http://localhost:8080/jaxrs-jpa/coupon/redemption"


the changes has not been added into the datable. it looks like, no CDI
Container managed transaction has been started.

best regards,

shan




--
View this message in context: http://tomee-openejb.979440.n4.nabble.com/TomEE-7-0-1-Does-openejb-core-hibernate-have-the-same-usage-as-openejb-core-eclipselink-in-tomee-emb-tp4680402p4680647.html
Sent from the TomEE Users mailing list archive at Nabble.com.

Re: [TomEE 7.0.1] Does openejb-core-hibernate have the same usage as openejb-core-eclipselink in tomee-embedded-maven-plugin?

Posted by Romain Manni-Bucau <rm...@gmail.com>.
2016-11-25 16:25 GMT+01:00 wus <wu...@gmail.com>:

> i have added <property name="tomee.jpa.factory.lazy" value="true"/> in
> persistence.xml.
> the error was away with 7.0.2. but it doesn't work with the cmt in cdi
> container. the changes have not be committed into DB.
>
>
>
can you share a project which shows that on github? We have some project
with hibernate and that solution working


>
> --
> View this message in context: http://tomee-openejb.979440.
> n4.nabble.com/TomEE-7-0-1-Does-openejb-core-hibernate-
> have-the-same-usage-as-openejb-core-eclipselink-in-
> tomee-emb-tp4680402p4680640.html
> Sent from the TomEE Users mailing list archive at Nabble.com.
>

Re: [TomEE 7.0.1] Does openejb-core-hibernate have the same usage as openejb-core-eclipselink in tomee-embedded-maven-plugin?

Posted by wus <wu...@gmail.com>.
i have added <property name="tomee.jpa.factory.lazy" value="true"/> in
persistence.xml.
the error was away with 7.0.2. but it doesn't work with the cmt in cdi
container. the changes have not be committed into DB.



--
View this message in context: http://tomee-openejb.979440.n4.nabble.com/TomEE-7-0-1-Does-openejb-core-hibernate-have-the-same-usage-as-openejb-core-eclipselink-in-tomee-emb-tp4680402p4680640.html
Sent from the TomEE Users mailing list archive at Nabble.com.

Re: [TomEE 7.0.1] Does openejb-core-hibernate have the same usage as openejb-core-eclipselink in tomee-embedded-maven-plugin?

Posted by wus <wu...@gmail.com>.
thanks for your quick reply.

i have just find out, the CMT for cdi doesn't work in 7.0.1. 

regards

Shan




--
View this message in context: http://tomee-openejb.979440.n4.nabble.com/TomEE-7-0-1-Does-openejb-core-hibernate-have-the-same-usage-as-openejb-core-eclipselink-in-tomee-emb-tp4680402p4680639.html
Sent from the TomEE Users mailing list archive at Nabble.com.

Re: [TomEE 7.0.1] Does openejb-core-hibernate have the same usage as openejb-core-eclipselink in tomee-embedded-maven-plugin?

Posted by Romain Manni-Bucau <rm...@gmail.com>.
7.0.1 doesnt support cdi with jpa so it works, in 7.0.1 and for hibernate
you can switch off cdi: tomee.jpa.cdi=false or tomee.jpa.factory.lazy=true to
initialize the factory lazily


Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<https://blog-rmannibucau.rhcloud.com> | Old Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | JavaEE Factory
<https://javaeefactory-rmannibucau.rhcloud.com>

2016-11-25 14:38 GMT+01:00 wus <wu...@gmail.com>:

> it works with version 7.0.1
>
>
>
> --
> View this message in context: http://tomee-openejb.979440.
> n4.nabble.com/TomEE-7-0-1-Does-openejb-core-hibernate-
> have-the-same-usage-as-openejb-core-eclipselink-in-
> tomee-emb-tp4680402p4680637.html
> Sent from the TomEE Users mailing list archive at Nabble.com.
>

Re: [TomEE 7.0.1] Does openejb-core-hibernate have the same usage as openejb-core-eclipselink in tomee-embedded-maven-plugin?

Posted by wus <wu...@gmail.com>.
it works with version 7.0.1



--
View this message in context: http://tomee-openejb.979440.n4.nabble.com/TomEE-7-0-1-Does-openejb-core-hibernate-have-the-same-usage-as-openejb-core-eclipselink-in-tomee-emb-tp4680402p4680637.html
Sent from the TomEE Users mailing list archive at Nabble.com.