How to inject a mock into a tapestry service?

2011-09-04 Thread Ernesto Arroyo
This should be easy, but I can't figure how to do this. I have a service that has a dependency to a DAO, that I manage using injection: @Inject private IOrganizationDAO orgDao; As far as i know, tapestry uses the construction mechanism to injection, so I have not a setter, tapestry does this th

Re: How to inject a mock into a tapestry service?

2011-09-05 Thread Ernesto Arroyo
Thanks, Yes it should be easy in "plain Java) but,... As far as I do not provide a constructor, Java will provide a default one for me. Because the default constructor will not create the dependency because is a private variable of the class I suposse Tapestry is doing an enhancement in the class

Re: How to inject a mock into a tapestry service?

2011-09-05 Thread Ernesto Arroyo
In case someone else is in this same problem, thanks to Igor for the solution: PD: the test is still without content, only the scheleton, but it works! I have a lot of work now, I do not manage very well with mocks :o) package .biz; import static org.easymock.EasyMock.createMock; import

Error in T5.3 & openJDK = java.lang.reflect.GenericSignatureFormatError

2011-09-22 Thread Ernesto Arroyo
Anyone with this same issue? This error happens in a Tapestry 5.3 app, deployed in a Tomcat 6 with OpenJDK OpenJDK Runtime Environment (IcedTea6 1.9.8) (rhel-1.22.1.9.8.el5_6-x86_64) OpenJDK 64-Bit Server VM (build 19.0-b09, mixed mode) *When we use Sun Java the error is resolved!* Java(TM) SE Ru

Re: Error in T5.3 & openJDK = java.lang.reflect.GenericSignatureFormatError

2011-09-26 Thread Ernesto Arroyo
we use 5.3.0 in the pom.xml for all tapestry artifacts -- View this message in context: http://tapestry.1045711.n5.nabble.com/Error-in-T5-3-openJDK-java-lang-reflect-GenericSignatureFormatError-tp4829879p4842699.html Sent from the Tapestry - User mailing list archive at Nabble.com. -

Re: Error in T5.3 & openJDK = java.lang.reflect.GenericSignatureFormatError

2011-09-27 Thread Ernesto Arroyo
in fact we should use sun jdk, not openjdk, but we will find some time to test this and let you know the results Ernesto Arroyo ... enviado desde mi iPad El 26/09/2011, a las 22:07, Howard Lewis Ship escribió: > That's a pretty old alpha version; I'd use "5.3-beta-10"

Some Tapestry infection questions

2011-08-02 Thread ERNESTO ARROYO RON
I am on holidays, and trying to use some Tapestry awesome features, as the inyection. But I do not understand some issues, and cannot find the answer in the wiki or somewhere, to the info is not enough clear for me, sorry. This is very simple. In the Java part of a page I want to inject the DAO