Hi The Data module works mainly with dependent scope and a ThreadLocal. Anything ApplicationScoped around which could pull in the dependent beans?
Example projects we like always best when it comes to defect reports :-) The overhead is definitely expected. But I agree it would be interesting to get the split between CDI, PartialBean and Data. Cheers, Thomas On Sat, Mar 14, 2015 at 8:36 PM, hwaastad <[email protected]> wrote: > Hi, > I'm playing around with repositories and testing out multithreaded jpa > transactions. > I know discussions around em thread safety etc :-) > > Anyways, > My current setup Im using managedexecutorservice and running 4 parallell > jobs each store or merge an Set of entities. > No duplicates. > Runnable is using UserTransaction. > DS 1.3.0 > JTA and JTA em. > > If I'm only injecting em I never have issues. > Using deltaspike, I get (and not always, but usually at merge): > > java.util.concurrent.ExecutionException: > org.apache.deltaspike.data.api.QueryInvocationException: Failed calling > Repository: > > [Repository=org.waastad.productcatalog.repository.FlatProductRepository,entity=org.waastad.entity.FlatProduct,method=findBy,exception=class > org.apache.deltaspike.data.api.QueryInvocationException,message=Failed > calling Repository: > > [Repository=org.waastad.productcatalog.repository.FlatProductRepository,entity=org.waastad.entity.FlatProduct,method=findBy,exception=class > java.lang.NullPointerException,message=null > . > . > . > . > java.lang.NullPointerException,message=null > at > > org.apache.deltaspike.data.impl.builder.DelegateQueryBuilder.execute(DelegateQueryBuilder.java:66) > at > > org.apache.deltaspike.data.impl.builder.QueryBuilder.executeQuery(QueryBuilder.java:57) > at > > org.apache.deltaspike.data.impl.tx.TransactionalQueryRunner.executeNonTransactional(TransactionalQueryRunner.java:66) > at > > org.apache.deltaspike.data.impl.tx.TransactionalQueryRunner.executeQuery(TransactionalQueryRunner.java:61) > at > > org.apache.deltaspike.data.impl.handler.QueryHandler.invoke(QueryHandler.java:79) > > I can make you an example project if you're interested. > > I'm probably pushing jpa since im importing ~1.5 mill in batch jobs, but as > I was saying....I'am testing :-) > > BTW, > penalty using repositories are quite high compared to only using em (~50% > )...which probably is as expected, not? > > > br hw > > > > -- > View this message in context: > http://apache-deltaspike-incubator-discussions.2316169.n4.nabble.com/multithreaded-repository-issues-tp4660132.html > Sent from the Apache DeltaSpike Incubator Discussions mailing list archive > at Nabble.com. >
