Re: Wicket and JEE6

2010-07-31 Thread Erik Brakkee
It appears that I ran into an existing Glassfish V3 issue. The same issue occurs with passivation of regular EJBs that have an entitymanager injected. See https://glassfish.dev.java.net/issues/show_bug.cgi?id=11356

Re: Wicket and JEE6

2010-07-30 Thread Erik Brakkee
I have found an elegant solution to the serialization problem. Basically, in the ComponentInstantiationListener that perform injection, I am also attaching a new InjectionBehavior. The injection behavior has a private transient boolean field indicating whether injections are up to date. Upon

Re: Wicket and JEE6

2010-07-29 Thread Erik Brakkee
I have done a lot of experimentation at the moment and I am using CDI dependency injection now for a simple wicket project. It is based on the code at utils.wamblee.org (wicket/inject). The issue I am running into is the following. I am creating a detachable entity object which is simply a

Re: Wicket and JEE6

2010-07-29 Thread Erik Brakkee
On Thu, Jul 29, 2010 at 9:54 PM, Erik Brakkee erik.brak...@gmail.comwrote: Is there also a callback in wicket to listen for component serialization and deserialization? Googling for this it also seems possible to use an aspectj pointcut to do injection at deserialization.

Re: Wicket and JEE6

2010-07-29 Thread James Carman
The problem with using the AspectJ-injected references occurs when you pass your reference to another class (such as a model, for instance). That class may not be instrumented via AspectJ to handle the serialization/deserialization properly for that reference. So, it will fail. On Thu, Jul 29,

Re: Wicket and JEE6

2010-07-29 Thread Erik Brakkee
On Thu, Jul 29, 2010 at 10:18 PM, James Carman ja...@carmanconsulting.comwrote: The problem with using the AspectJ-injected references occurs when you pass your reference to another class (such as a model, for instance). That class may not be instrumented via AspectJ to handle the

Re: Wicket and JEE6

2010-04-12 Thread Erik Brakkee
On Mon, Apr 12, 2010 at 12:12 AM, James Carman jcar...@carmanconsulting.com wrote: I would imagine that most implementations would cache their injectors (it's part of the BeanT) I was triggered by the remark in the WeldCOmponentInstantiationListener which says 'TODO Cache the NonContextual'

Re: Wicket and JEE6

2010-04-11 Thread Erik Brakkee
Just have a look at https://wamblee.org/svn/public/wicket-cdi The main thing I did was to make the injection and caching stuff completely independent of wicket and I made some arrangements to still allow unit tests where you can inject different things from the defaults. In particular, I think

Re: Wicket and JEE6

2010-04-11 Thread James Carman
I would imagine that most implementations would cache their injectors (it's part of the BeanT) On Sun, Apr 11, 2010 at 4:30 PM, Erik Brakkee erik.brak...@gmail.com wrote: Just have a look at https://wamblee.org/svn/public/wicket-cdi The main thing I did was to make the injection and caching

Re: Wicket and JEE6

2010-04-10 Thread Erik Brakkee
On Mon, Apr 5, 2010 at 11:58 PM, James Carman jcar...@carmanconsulting.comwrote: What I'll do is set it up in wicketstuff. That way others can contribute/maintain it too. I've got permission already, so I can put it up there sometime this evening. Do you have a location already for the

Re: Wicket and JEE6

2010-04-10 Thread James Carman
My implementation is available at: http://svn.carmanconsulting.com/public/wicket-cdi/trunk/ The CdiPlugin class has an inject() method that can be used to inject anything, also. On Sat, Apr 10, 2010 at 5:11 PM, Erik Brakkee erik.brak...@gmail.com wrote: On Mon, Apr 5, 2010 at 11:58 PM, James

Re: Wicket and JEE6

2010-04-05 Thread Erik Brakkee
On Wed, Mar 31, 2010 at 5:05 AM, Iskandar Salim locrianm...@gmail.comwrote: Olivier Bourgeois-2 wrote: ... everything is simple unmanaged POJOs except for your classes extending WebPage which are managed Not to be picky but a minor correction :) everything is simple unmanaged

Re: Wicket and JEE6

2010-04-05 Thread Erik Brakkee
I wonder what the use would be for the request, session, and conversation scopes in wicket since these are already managed expiicitly in wicket. At least, I wouldn't see a great need for such scopemanagement by the container. It would be nice however if CDI could be used to inject EJBs,

Re: Wicket and JEE6

2010-04-05 Thread James Carman
Did you not look at what I put together? I've already got all the injection stuff (and conversations) working and I've got example applications illustrating it. On Mon, Apr 5, 2010 at 3:47 PM, Erik Brakkee erik.brak...@gmail.com wrote: I wonder what the use would be for the request, session,

Re: Wicket and JEE6

2010-04-05 Thread Erik Brakkee
On Mon, Apr 5, 2010 at 9:54 PM, James Carman jcar...@carmanconsulting.comwrote: Did you not look at what I put together? I've already got all the injection stuff (and conversations) working and I've got example applications illustrating it. I tried to look at it but couldn't access the

Re: Wicket and JEE6

2010-04-05 Thread James Carman
It's apparently down again. That's what I get for hosting my server at my in-law's house. Cheaper isn't necessarily better. If you want, I can email you the code. On Mon, Apr 5, 2010 at 4:32 PM, Erik Brakkee erik.brak...@gmail.com wrote: On Mon, Apr 5, 2010 at 9:54 PM, James Carman

Re: Wicket and JEE6

2010-04-05 Thread Erik Brakkee
On Mon, Apr 5, 2010 at 10:37 PM, James Carman jcar...@carmanconsulting.comwrote: It's apparently down again. That's what I get for hosting my server at my in-law's house. Cheaper isn't necessarily better. If you want, I can email you the code. You can mail the code to me. If it's not too

Re: Wicket and JEE6

2010-04-05 Thread James Carman
On Mon, Apr 5, 2010 at 5:27 PM, Erik Brakkee erik.brak...@gmail.com wrote: I think in general, the code should become part of a wicket-cdi project just like wicket-spring and wicket-guice already are. I think the wicket community is probably a better place to maintain this then the weld

Re: Wicket and JEE6

2010-03-31 Thread James Carman
Ok, I think I've got the conversation stuff working properly. My current example is a version of the numberguess game which makes the Game bean a @ConversationScoped object. It's not a good example of a conversation per se, but I'd like to beef up the example application to show off more of what

Re: Wicket and JEE6

2010-03-30 Thread Olivier Bourgeois
I do also think that it's because Wicket is not a managed framework : everything is simple unmanaged POJOs except for your classes extending WebPage which are managed. I've juste had a quick look at JSF 2.0 and never worked with it - but I worked with Wicket - so I did not expected Wicket JEE6

Re: Wicket and JEE6

2010-03-30 Thread Cemal Bayramoglu
Olivier, I got Jame's stuff [1] up and running (thanks James) with just a few small changes to the POMs - maybe he has stuff already in his local Maven repo that is no longer on the main public repos) working with little effort. If you'd like to make (and maintain ;-) an archetype out of those

Re: Wicket and JEE6

2010-03-30 Thread James Carman
Cemal, Please feel free to send me a patch if anything looks crazy. I have had a heck of a time getting all this stuff working. It's a delicate balance (like herding cats)! :) The OWB folks have checked in my patch to fix one of the issues, but we're still hammering out another. Thanks,

Re: Wicket and JEE6

2010-03-30 Thread Cemal Bayramoglu
James, See the patch below; please double-check but it should be still valid if you haven't updated your POMs since Sunday AM your time. Regards - Cemal jWeekend OO Java Technologies, Wicket Consulting, Development, Training http://jWeekend.com == PATCH STARTS BELOW

Re: Wicket and JEE6

2010-03-30 Thread James Carman
I was using M4 of OWB, but I had to patch it. Are you sure it works for you? I was getting a NPE. On Tue, Mar 30, 2010 at 7:22 AM, Cemal Bayramoglu jweekend_for...@cabouge.com wrote: James, See the patch below; please double-check but it should be still valid if you haven't updated your

Re: Wicket and JEE6

2010-03-30 Thread Cemal Bayramoglu
James, I'm pretty sure mvn test ran successfully on all your projects once I patched the POMs. I ran some (maybe not all) of the demo apps too. Send me your patches if you like too (they must not have been deployed yet on Sunday) and I may be able to take another look this evening or tomorrow PM.

Re: Wicket and JEE6

2010-03-30 Thread James Carman
I think everything I've done is checked in currently. I'll take a look at your patches later and see how things shake out. One thing I noticed was that my beans weren't being picked up from my local project if I didn't include a src/main/resources/META-INF/beans.xml file in there. I guess the

Re: Wicket and JEE6

2010-03-30 Thread Olivier Bourgeois
2010/3/30 Cemal Bayramoglu jweekend_for...@cabouge.com Olivier, I got Jame's stuff [1] up and running (thanks James) with just a few small changes to the POMs - maybe he has stuff already in his local Maven repo that is no longer on the main public repos) working with little effort. If

Re: Wicket and JEE6

2010-03-30 Thread James Carman
On Tue, Mar 30, 2010 at 10:21 AM, Olivier Bourgeois olivier.bourgeois@gmail.com wrote: James,  you need an empty beans.xml file to let Weld know what to scan, this is explained much further in this blog entry : http://relation.to/Bloggers/WhyIsBeansxmlRequiredInCDI Yeah, I guess I

Re: Wicket and JEE6

2010-03-30 Thread Iskandar Salim
Olivier Bourgeois-2 wrote: ... everything is simple unmanaged POJOs except for your classes extending WebPage which are managed Not to be picky but a minor correction :) everything is simple unmanaged POJOs except for your classes extending [Component] which are managed --

RE: Wicket and JEE6

2010-03-29 Thread Iskandar Salim
Ericksen, Mark W (IS) wrote: java.lang.NoSuchMethodError: org.jboss.weld.Container.services()Lorg/jboss/weld/bootstrap/api/Service Registry; You need to update your weld-integration.jar (and maybe weld-osgi.jar) files in ${glassfish_install_dir}/glassfish/modules Get

Re: Wicket and JEE6

2010-03-29 Thread Olivier Bourgeois
Hi, Wicket has very good support in Weld, but to make it work I had to update the weld-integration.jar, otherwise the sample Numberguess application is looking for an unexisting method in the 1.0.0 Weld API : this is your problem. If you don't want to do it by hand like suggested by Iskandar,

RE: Wicket and JEE6

2010-03-29 Thread Ericksen, Mark W (IS)
to be the case just yet. If I'm wrong be sure to let me know! -Mark -Original Message- From: Olivier Bourgeois [mailto:olivier.bourgeois@gmail.com] Sent: Monday, March 29, 2010 2:45 AM To: users@wicket.apache.org Subject: Re: Wicket and JEE6 Hi, Wicket has very good support in Weld

Re: Wicket and JEE6

2010-03-29 Thread James Carman
to be the case just yet. If I'm wrong be sure to let me know! -Mark -Original Message- From: Olivier Bourgeois [mailto:olivier.bourgeois@gmail.com] Sent: Monday, March 29, 2010 2:45 AM To: users@wicket.apache.org Subject: Re: Wicket and JEE6 Hi, Wicket has very good

Re: Wicket and JEE6

2010-03-27 Thread James Carman
a patch. Anyone? :) -Mark -Original Message- From: Josh Chappelle [mailto:jchappe...@4redi.com] Sent: Friday, March 26, 2010 2:59 PM To: users@wicket.apache.org Subject: RE: Wicket and JEE6 Mark, Try taking a look at the addComponentInstantiationListener method

Re: Wicket and JEE6

2010-03-26 Thread James Carman
Weld has wicket support built-in I believe. On Fri, Mar 26, 2010 at 12:52 PM, Ericksen, Mark W (IS) mark.erick...@ngc.com wrote: Hi, I'm building a new java project using all JEE6 technologies. That means I'm using JPA, CDI, and JSF2 for example. Each layer came together great with

RE: Wicket and JEE6

2010-03-26 Thread Ericksen, Mark W (IS)
@wicket.apache.org Subject: Re: Wicket and JEE6 Weld has wicket support built-in I believe. On Fri, Mar 26, 2010 at 12:52 PM, Ericksen, Mark W (IS) mark.erick...@ngc.com wrote: Hi, I'm building a new java project using all JEE6 technologies. That means I'm using JPA, CDI, and JSF2

Re: Wicket and JEE6

2010-03-26 Thread James Carman
additional help is greatly appreciated! -Mark -Original Message- From: James Carman [mailto:jcar...@carmanconsulting.com] Sent: Friday, March 26, 2010 10:52 AM To: users@wicket.apache.org Subject: Re: Wicket and JEE6 Weld has wicket support built-in I believe. On Fri, Mar 26, 2010 at 12

RE: Wicket and JEE6

2010-03-26 Thread Ericksen, Mark W (IS)
() { return (null != util) ? util.getEntity() : No Util Class; } } -Original Message- From: James Carman [mailto:jcar...@carmanconsulting.com] Sent: Friday, March 26, 2010 11:36 AM To: users@wicket.apache.org Subject: Re: Wicket and JEE6 I started a JSR-299 integration project a while

RE: Wicket and JEE6

2010-03-26 Thread Josh Chappelle
Mark, Try taking a look at the addComponentInstantiationListener method on the Application class. It takes one parameter of type IComponentInstantiationListener and that interface has one method which is onInstantiation(Component component). Every time a component gets instantiated it will be

RE: Wicket and JEE6

2010-03-26 Thread Ericksen, Mark W (IS)
if it's something in the latest version of Wicket that caused this to break and could do a patch. Anyone? :) -Mark -Original Message- From: Josh Chappelle [mailto:jchappe...@4redi.com] Sent: Friday, March 26, 2010 2:59 PM To: users@wicket.apache.org Subject: RE: Wicket and JEE6 Mark

Re: Wicket and JEE6

2010-03-26 Thread James Carman
a patch. Anyone? :) -Mark -Original Message- From: Josh Chappelle [mailto:jchappe...@4redi.com] Sent: Friday, March 26, 2010 2:59 PM To: users@wicket.apache.org Subject: RE: Wicket and JEE6 Mark, Try taking a look at the addComponentInstantiationListener method