Re: Arquillian and Remote TomEE

2014-09-01 Thread Alex Soto
After some time of vacation, today is my first day, and I have upgraded to Apache TomEE 1.7.0 and I have tried the same example. Now the archive is deployed correctly to remote server but the test execution does not "inject" the EJB. In remote apache tomee I can see this log message: Sep 01, 2014

Re: Arquillian and Remote TomEE

2014-09-01 Thread Romain Manni-Bucau
@RunWith(Arquillian.class) public class TheTest { @Deployment public static JavaArchive deployment() { return ShrinkWrap.create(JavaArchive.class).addClass(HelloEJB.class); } @EJB private HelloEJB helloWorldEjb; @Test public void testHelloWorld() { System.out.println(""); System.out.println("");

Re: Arquillian and Remote TomEE

2014-09-01 Thread Alex Soto
Are you using embed adpater? In my case in embed adapter works as well but not in remote (when I say remote is a remote as Arquillian defines an already started TomEE instance in remote host). 2014-09-01 10:11 GMT+02:00 Romain Manni-Bucau : > @RunWith(Arquillian.class) > public class TheTest { >

Re: Arquillian and Remote TomEE

2014-09-01 Thread Romain Manni-Bucau
http://maven.apache.org/POM/4.0.0"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd";> 4.0.0 orgtest foo 1.0-SNAPSHOT org.apache.op

Re: Arquillian and Remote TomEE

2014-09-01 Thread Alex Soto
Well TomEE server is already running in remote host. My arquillian.xml conf http://www.w3.org/2001/XMLSchema-instance"; xmlns="http://jboss.org/schema/arquillian"; xsi:schemaLocation="http://jboss.org/schema/arquillian http://www.jboss.org/schema/arquillian/arquillian_1_0.xsd";>

Question on EJB and concurrency

2014-09-01 Thread Lars-Fredrik Smedberg
Hi I have some questions on EJBs and concurrency, I hope someone can shed some light on the following questions: 1. I have understood that the annotations @ConcurrencyManagement and @Lock only are applicable to Singelton EJBs and that the default values are container managed concurrency and WRITE

Re: Arquillian and Remote TomEE

2014-09-01 Thread Romain Manni-Bucau
in such cases we don't add our enricher to not modify the started instance I guess, so you surely need to add arquillian enrichers (but you can then do a bit less than us) Romain Manni-Bucau Twitter: @rmannibucau Blog: http://rmannibucau.wordpress.com/ LinkedIn: http://fr.linkedin.com/in/rmannib

Re: Arquillian and Remote TomEE

2014-09-01 Thread Alex Soto
when you say adding Arquillian enrichers you mean the arquillian dependency right? Ok thank you. But my question is what is the reason on why to do this when for example Glassfish and Wildlfy does not require it? 2014-09-01 10:32 GMT+02:00 Romain Manni-Bucau : > in such cases we don't add our e

When are persistent messages to a Topic removed?

2014-09-01 Thread bvprasad
Hi, I have a setup where persistent messages are posted to a Topic. On this topic I have multiple durable subscribers, each with a different message selector. When I am pushing messages to this topic, I am noticing that they are not being deleted after consumption. I tried pushing a hundred message

Re: Question on EJB and concurrency

2014-09-01 Thread Romain Manni-Bucau
Hi 1. true 2. @ConcurrencyManagement(BEAN -> lock free, @Lock(READ) reentrantLock.readLock().lock/unlock is called (performance wise difference is not that important in general) 3. it should. comparison is fair 4. @TransactionAttribute defines the transactional context you want, required will crea

Re: Arquillian and Remote TomEE

2014-09-01 Thread Romain Manni-Bucau
glassfish and wildfly needs enrichers as well. Maybe they provide them as dependency to their adapter (didnt check). We don't rely on them by default since we have a better enrichment system but for existing tomee we don't want to modify them so we don't add it Romain Manni-Bucau Twitter: @rmanni

Re: Arquillian and Remote TomEE

2014-09-01 Thread Alex Soto
Do you know from memory the jar where arquillian enrichers are provided? 2014-09-01 11:47 GMT+02:00 Romain Manni-Bucau : > glassfish and wildfly needs enrichers as well. Maybe they provide them > as dependency to their adapter (didnt check). We don't rely on them by > default since we have a bet

Re: Arquillian and Remote TomEE

2014-09-01 Thread Romain Manni-Bucau
our own ones or arquillian ones? arquillian: org.jboss.arquillian.testenricher/arquillian-testenricher-ejb our own is created dynamically Romain Manni-Bucau Twitter: @rmannibucau Blog: http://rmannibucau.wordpress.com/ LinkedIn: http://fr.linkedin.com/in/rmannibucau Github: https://github.com/r

Re: Question on EJB and concurrency

2014-09-01 Thread Lars-Fredrik Smedberg
@Romain Thanks for the answers... in question 4 I meant that if I annotate a bean with @TransactionAttribute will it still work as expected regardless of if the bean instance is accessed with multiple threads at the same time or not (in the case of singleton read lock or singleton bean concurrenc

Re: Arquillian and Remote TomEE

2014-09-01 Thread Alex Soto
I have added @Deployment public static JavaArchive deployment() { JavaArchive[] asFile = Maven.resolver().loadPomFromFile("pom.xml").resolve("org.jboss.arquillian.testenricher:arquillian-testenricher-ejb").withTransitivity().as(JavaArchive.class); JavaArchive javaArchive = ShrinkWrap.create(JavaAr

Re: Arquillian and Remote TomEE

2014-09-01 Thread Romain Manni-Bucau
Hmm I think it needs to be added as dependency but then keep in mind arquillian is buggy with not war packaging (works often with ear, almost never with jar) Romain Manni-Bucau Twitter: @rmannibucau Blog: http://rmannibucau.wordpress.com/ LinkedIn: http://fr.linkedin.com/in/rmannibucau Github: h

Re: Question on EJB and concurrency

2014-09-01 Thread Romain Manni-Bucau
transactions are mainly a thread local things so it is safe and has no link with concurrency. Romain Manni-Bucau Twitter: @rmannibucau Blog: http://rmannibucau.wordpress.com/ LinkedIn: http://fr.linkedin.com/in/rmannibucau Github: https://github.com/rmannibucau 2014-09-01 12:15 GMT+02:00 Lars-F

declare datasource int omodule ejb

2014-09-01 Thread mauro2java2011
Hi all. it is possible declare a datasource with resources.xml into META-INF/resoures.xml for get the entity and the persistence all inside a ejb.jar ??? It work ?? So i not have to declare the datasource int oweb application . Nexdt the web application call the ejb deployed int othe ejb.ja

Re: Question on EJB and concurrency

2014-09-01 Thread Lars-Fredrik Smedberg
@Romain thanks for all answers... On Mon, Sep 1, 2014 at 1:18 PM, Romain Manni-Bucau wrote: > transactions are mainly a thread local things so it is safe and has no > link with concurrency. > > > Romain Manni-Bucau > Twitter: @rmannibucau > Blog: http://rmannibucau.wordpress.com/ > LinkedIn: ht

Re: Arquillian and Remote TomEE

2014-09-01 Thread Alex Soto
With WebArchive does not work. It seems a bit complicated hehehehe but this mode I think it may be required soon by community because briefly you will be able to run tests using Arquillian against Docker by using remote adapter. With wildfly it works and now I am trying to use it with TomEE. 2014

Re: Arquillian and Remote TomEE

2014-09-01 Thread Romain Manni-Bucau
well if you add enricher and call you archive test as arquillian expects it works not sure about required thing since I think for integration tests it is good to have throwable away containers (our default behavior). Why would you rely on a custom setup of a container when you don't need it? Rom

Re: declare datasource int omodule ejb

2014-09-01 Thread Romain Manni-Bucau
you can in resources.xml but in the deployment you use, if that's a war then in WEB-INF, if it is just a jar then META-INF is fine Romain Manni-Bucau Twitter: @rmannibucau Blog: http://rmannibucau.wordpress.com/ LinkedIn: http://fr.linkedin.com/in/rmannibucau Github: https://github.com/rmannibuca

Re: Arquillian and Remote TomEE

2014-09-01 Thread Alex Soto
Not for integration but for functional tests, regression tests, deployment tests, .for this reason I would like to see if it works with TomEE. But I can't run it yet :( Of course it works using Maven but I would like to have it with Arquillian as well. 2014-09-01 15:37 GMT+02:00 Romain Manni-

Re: Arquillian and Remote TomEE

2014-09-01 Thread Romain Manni-Bucau
well that's out of arquillian scope then, just pure selenium tests Romain Manni-Bucau Twitter: @rmannibucau Blog: http://rmannibucau.wordpress.com/ LinkedIn: http://fr.linkedin.com/in/rmannibucau Github: https://github.com/rmannibucau 2014-09-01 15:40 GMT+02:00 Alex Soto : > Not for integration

Re: Arquillian and Remote TomEE

2014-09-01 Thread Alex Soto
Well but you can use Arquillian Drone to make your life easier and to only deploy the part under test (regression tests or security tests for example). Well this is something that Karl has been working on and also in my company is planned to be used, and for this reason I was researching if it was

Re: Arquillian and Remote TomEE

2014-09-01 Thread Romain Manni-Bucau
at work we use an uber jar with plain selenim (maven is forbidden in prod). That said if you setup arquillian correctly it works :) - that's not a tomee issue said otherwise Romain Manni-Bucau Twitter: @rmannibucau Blog: http://rmannibucau.wordpress.com/ LinkedIn: http://fr.linkedin.com/in/rmann

Re: Arquillian and Remote TomEE

2014-09-01 Thread Alex Soto
Yes sure, but I don't know why I cannot make it run. I send to Arquillian a WebArchive with enricher jars appended as well but enrichment doesn't occurs. 2014-09-01 15:46 GMT+02:00 Romain Manni-Bucau : > at work we use an uber jar with plain selenim (maven is forbidden in prod). > > That said i

Re: Alternatives and beans.xml

2014-09-01 Thread hwaastad
Hi, I'm sorry that I'm revitalizing this thread, but I' like to discuss a thing or two regarding (DS) and mocking. Scenario: Running IT tests using embedded and @classrules. testfile: @PropertyFile("test-lab.properties") public class MockIT { } In test-lab.properties I can define project stage,

Re: Arquillian and Remote TomEE

2014-09-01 Thread Romain Manni-Bucau
think it doesnt need to be in the jar since arquillian enricher extension does it: http://grepcode.com/file/repo1.maven.org/maven2/org.jboss.arquillian.testenricher/arquillian-testenricher-ejb/1.1.4.Final/org/jboss/arquillian/testenricher/ejb/client/EJBEnricherArchiveAppender.java#EJBEnricherArchi

Re: Questions on EJB, CDI and concurrency

2014-09-01 Thread Lars-Fredrik Smedberg
Hi Romain A follow up question. What will the difference between a @Singleton EJB and a @Statefull @ApplicationScoped EJB be? Is it only the fact that the latter will have a CDI-proxy in fron of the EJB-proxy but function wise they will work the same? Regards Lars-Fredrik On Tue, Aug 26, 2014 a

Re: Questions on EJB, CDI and concurrency

2014-09-01 Thread Romain Manni-Bucau
stateful appscoped = @singleton @lock(write) Romain Manni-Bucau Twitter: @rmannibucau Blog: http://rmannibucau.wordpress.com/ LinkedIn: http://fr.linkedin.com/in/rmannibucau Github: https://github.com/rmannibucau 2014-09-01 16:27 GMT+02:00 Lars-Fredrik Smedberg : > Hi Romain > > A follow up que

Re: Questions on EJB, CDI and concurrency

2014-09-01 Thread Lars-Fredrik Smedberg
So basically if I instead use @Singleton I have the possibility to use bean managed concurrency as well as @Lock(READ)... ? Regards Lars-Fredrik On Mon, Sep 1, 2014 at 4:31 PM, Romain Manni-Bucau wrote: > stateful appscoped = @singleton @lock(write) > > > Romain Manni-Bucau > Twitter: @rmannib

Re: Questions on EJB, CDI and concurrency

2014-09-01 Thread Romain Manni-Bucau
yep stateful scope is bound to client scope, having an appscoped stateful is quite weird from my point of view ;) Romain Manni-Bucau Twitter: @rmannibucau Blog: http://rmannibucau.wordpress.com/ LinkedIn: http://fr.linkedin.com/in/rmannibucau Github: https://github.com/rmannibucau 2014-09-01 1

Re: Questions on EJB, CDI and concurrency

2014-09-01 Thread Lars-Fredrik Smedberg
agree... seems weird On Mon, Sep 1, 2014 at 4:41 PM, Romain Manni-Bucau wrote: > yep > > stateful scope is bound to client scope, having an appscoped stateful > is quite weird from my point of view ;) > > > Romain Manni-Bucau > Twitter: @rmannibucau > Blog: http://rmannibucau.wordpress.com/ > L

BeanManager injection returns null

2014-09-01 Thread DonatasCiuksys
I'm randomly getting NullPointerExceptions in my production environment (stack trace below); most of the time the code is working, yet time-to-time I'm getting the NullPointerException. That is how ELResolverProducer.getELResolver(ELResolverProducer.java:53) looks like: It seems that producer m

Re: BeanManager injection returns null

2014-09-01 Thread Romain Manni-Bucau
Hi can you check the classloader you have when rewrite is called? Romain Manni-Bucau Twitter: @rmannibucau Blog: http://rmannibucau.wordpress.com/ LinkedIn: http://fr.linkedin.com/in/rmannibucau Github: https://github.com/rmannibucau 2014-09-01 18:33 GMT+02:00 DonatasCiuksys : > I'm randomly g

Re: declare datasource int omodule ejb

2014-09-01 Thread mauro2java2011
so if i deploy a EAR application with inside a module ejb jar and a module war for the view, so it is legal put resources.xml into META-INF of jar of ejb ? and so i not put resources.xml into WEB-INF of war? 2014-09-01 15:39 GMT+02:00 Romain Manni-Bucau [via TomEE & OpenEJB] < ml-node+s979440n46

Re: declare datasource int omodule ejb

2014-09-01 Thread Romain Manni-Bucau
Hmm good question, I have to admit I never tried but sounds reasonable, if not maybe META-INF or the ear Romain Manni-Bucau Twitter: @rmannibucau Blog: http://rmannibucau.wordpress.com/ LinkedIn: http://fr.linkedin.com/in/rmannibucau Github: https://github.com/rmannibucau 2014-09-01 18:38 GMT+0

Re: declare datasource int omodule ejb

2014-09-01 Thread mauro2java2011
i not know. If some have experience with this question let me know. 2014-09-01 18:50 GMT+02:00 Romain Manni-Bucau [via TomEE & OpenEJB] < ml-node+s979440n4671532...@n4.nabble.com>: > Hmm good question, I have to admit I never tried but sounds > reasonable, if not maybe META-INF or the ear > > >

Re: BeanManager injection returns null

2014-09-01 Thread DonatasCiuksys
I made a breakpoint, and during debug both this.getClass().getClassLoader() and Thread.currentThread().getContextClassLoader() return this (yet in this case beanManager was not null): org.apache.tomee.catalina.LazyStopWebappClassLoader context: /tar delegate: false repositories: /WEB-INF

Re: BeanManager injection returns null

2014-09-01 Thread Romain Manni-Bucau
are you able to try to reproduce it? can maybe be linked to context (jaxrs, jaxws...) Romain Manni-Bucau Twitter: @rmannibucau Blog: http://rmannibucau.wordpress.com/ LinkedIn: http://fr.linkedin.com/in/rmannibucau Github: https://github.com/rmannibucau 2014-09-01 19:00 GMT+02:00 DonatasCiuksys

Best way to set JVM arguments

2014-09-01 Thread Felipe Jaekel
Hi, On Tomcat 7 I used to set JVM arguments with the setenv.sh file. Is this the best approach for TomEE? Thanks

Re: Best way to set JVM arguments

2014-09-01 Thread Andy Gumbrecht
You can do the same for TomEE, you just need to touch a file and edit it. Andy. On 01/09/2014 22:26, Felipe Jaekel wrote: Hi, On Tomcat 7 I used to set JVM arguments with the setenv.sh file. Is this the best approach for TomEE? Thanks -- Andy Gumbrecht https://twitter.com/AndyGeeDe

Re: Best way to set JVM arguments

2014-09-01 Thread Andy Gumbrecht
See the comments in the catalina.sh for more info. Andy. On 01/09/2014 22:26, Felipe Jaekel wrote: Hi, On Tomcat 7 I used to set JVM arguments with the setenv.sh file. Is this the best approach for TomEE? Thanks -- Andy Gumbrecht https://twitter.com/AndyGeeDe http://www.tomitribe.c

Re: Best way to set JVM arguments

2014-09-01 Thread Romain Manni-Bucau
Hi For tomcat/boot system props yes, for others conf/system.properties is nice cause more readable and portable whatever you run on windows, unix, in an IDE or with maven plugin Le 1 sept. 2014 23:19, "Andy Gumbrecht" a écrit : > See the comments in the catalina.sh for more info. > > Andy. > > O