-
1. Re: Extend wicket instrumentation to handle JSR 330
cpopetz Feb 12, 2010 12:46 AM (in response to kariem)The Weld releases (JSR-299 reference implementation, upon which Seam 3 will be based) has support for contextual injection of jsr-299 components into wicket components, as well as support for the jsr-299 conversation context in Wicket. This is done without instrumentation, as weld uses proxies at injection points.
-Clint
-
2. Re: Extend wicket instrumentation to handle JSR 330
kariem Feb 12, 2010 1:06 AM (in response to kariem)Thank you for the reply, Clint. As you are also in the list of authors of the JavassistInstrumentor used in the current seam-wicket version to support the integration of Wicket 1.3.x, I appreciate your recommendation very much.
I know that Seam 3 will be based on CDI and that Weld 1.0 already supports Wicket and JSR 330.
What I don't know is whether it is a good idea to submit a patch to support Wicket 1.4 in Seam 2.2 and extend the instrumentation in a way that handles @Inject similar to @In, or wait for Seam 3 to be released.
Currently I am using a build based on the 2.2 branch which works for me. Do you think I should be submitting a patch or wait for Seam 3? Any other options?
Thank you,
Kariem -
3. Re: Extend wicket instrumentation to handle JSR 330
cpopetz Feb 12, 2010 1:15 AM (in response to kariem)Submitting a patch to support wicket 1.4 is fine, though it looks like a one line fix. As far as supporting @Inject in the 2.2 branch, that's not possible because the semantics of @Inject are so different from @In, and just making the former act like the latter in seam 2.2 really only saves you a find-and-replace, at a cost of much confusion to users.
-
4. Re: Extend wicket instrumentation to handle JSR 330
kariem Feb 12, 2010 2:41 PM (in response to kariem)First of all, thank you for the reply. Unfortunately, I believe my questions have not been answered. I do not want to repeat myself, but I will try to elaborate.
The main question is, should we try to provide patches for Seam 2.2 or wait for Seam 3 to be released, or use a stable Seam 3 build? Very important for this is the timeline for Seam 3 and when we can expect a stable version.
The details below
Submitting a patch to support wicket 1.4 is fine, though it looks like a one line fix.This is true, the changes are not very difficult: I changed three lines in SeamWebApplication. However, I think this patch cannot be put into Seam 2.2, as it changes the library dependency from Wicket 1.3 to Wicket 1.4 which show API incompatibilities. Hence, the explicit question of putting this change in, which could break quite a few applications in 2.2.1 or 2.2.2 that do not expect dependency changes. From what I understand, this should go in 2.3. But as I am not that familiar, I posted this question here.
As far as supporting @Inject in the 2.2 branch, that's not possible because the semantics of @Inject are so different from @In, and just making the former act like the latter in seam 2.2 really only saves you a find-and-replace, at a cost of much confusion to users.For my use case, it is only necessary to implement the field-level type-based semantics of @Inject. I would not try to make @Inject act like @In, because I have different requirements. The lookup would go through the Seam context, but also use a Spring application context.
The current wicket code base being migrated (see the opening sentence of the first post) code uses @SpringBean which has similar semantics to what @In should do. This is the only area where find and replace would be reasonable and for our use case this would be a huge benefit. As @SpringBean is one of the recommended ways and to what I have seen a popular way of using Spring together with Wicket, I think this integration could benefit some Wicket/Spring users wanting to migrate to Seam.
Thank you
Kariem -
5. Re: Extend wicket instrumentation to handle JSR 330
cpopetz Feb 12, 2010 3:43 PM (in response to kariem)I would accept a patch to make the 2.2 branch use wicket 1.4. Although your use case for wanting to use @Inject in Seam 2.X is understandable, it's certainly not something that is general enough to be applied to a Seam 2.x release. My suggestion would be for you to develop with a local build of 2.x until Seam3 is available, or to move to Weld if you don't already have dependencies on Seam. I can't speak to the releae schedule of Seam3, though those inside RedHat might be able to do so.
-
6. Re: Extend wicket instrumentation to handle JSR 330
kariem Feb 12, 2010 4:24 PM (in response to kariem)Great response, Clint. Thank you very much for the recommendation. I will certainly follow it.
I will add the patch to JBSEAM-3421 as soon as I have verified it with my test application.
If we could receive some input from Redhat on the release schedule, I could make a decision on additional contributions from the project I am currently working on.
As you said (and I agree), my use case is not really applicable for Seam 2.x, but the first plan was to extend JavassistInstrumentor and the Maven Mojo to support custom WicketComponent/WicketHandler class names. This would allow for generic extensions to the injection mechanism. I can certainly put some effort into this and provide a working example.
Thank you very much, I will put an update here soon
Kariem -
7. Re: Extend wicket instrumentation to handle JSR 330
kariem Feb 15, 2010 5:40 PM (in response to kariem)I have just added the previously mentioned patch to JBSEAM-3421. This has been tested in my setup, where I could not find any errors related to this change.
I have also added a feature request to open the instrumentation mechanisms currently provided in the seam-wicket integration: JBSEAM-4545. Corresponding patches for the seam-wicket integration and the maven instrumentation mojo are attached.
-
8. Re: Extend wicket instrumentation to handle JSR 330
kariem Jul 30, 2010 4:23 PM (in response to kariem)I have provided the discussed patches a few months ago. Do you have any hints on how we should continue? Will they be accepted for any upcoming 2.2?
I have also seen that weld-wicket will be moved to seam-wicket and JSR-299 support should be a part of that (SEAMWICKET-5). I would really like to use Seam with a current version of wicket. Is there any way I could contribute to the current efforts? Any open tasks nobody wants to do?