myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Kaltepoth <christ...@kaltepoth.de>
Subject MyFaces CODI and Weld 1.0.1
Date Wed, 09 Mar 2011 12:31:02 GMT
Hey all,

we are currently developing an application based on Weld 1.0.1 and
MyFaces CODI. Unfortunately we have some strange problems regarding
CODI's @Transactional not always being applied correctly. It seems to
be completely ignored in some situations.

I've reproduced this problem with Matthias' Modern-EE-JSF2.0 example
application. I did just two modifications:

1. Weld doesn't support to inject the EntityManager via
@PersistenceContext. So I created a class named EntityManagerProducer
to create request scoped EntityManager instances. Then I replaced
@PersistenceContext in the DAO with @Inject. This works fine with
OpenWebBeans.

2. Then I removed OpenWebBeans and added Weld 1.0.1 to the
dependencies. After that @Transactional immediately stopped working.
It seems like the TransactionalInterceptor doesn't get invoked at all.
No transactions are started and changes to the database aren't
persisted any more.

You can get the example application here:

https://github.com/chkal/modern-ee-app20

Here are the modifications I made to the application:

https://github.com/chkal/modern-ee-app20/commits/master

Does anyone have an idea what is causing this? I'm not really sure if
it is a CODI or a Weld issue.

Thanks

Christian


-- 
Christian Kaltepoth
Blog: http://chkal.blogspot.com/
Twitter: http://twitter.com/chkal

Mime
View raw message