Re: [seam-dev] First cab off the rank!
by Stuart Douglas
There are only two, AnnotationCache and AnnotationInvocationHandler, I have attached them in a zip. I was not sure what package you want to put them in so I have left them as is.
AnnotationCache provides the public interface, and as the name suggests caches proxy instances so that a new one is not created each time.
Stuart
________________________________________
From: Pete Muir [pmuir(a)redhat.com]
Sent: Monday, 30 November 2009 11:34 PM
To: Stuart Douglas
Subject: Re: [seam-dev] First cab off the rank!
Stuart, can we merge this stuff into Weld extensions? Can you give me a pointer to which classes to merge, or better yet a patch?
On 30 Nov 2009, at 07:08, Stuart Douglas wrote:
> Forgot to CC to seam-dev again.
> ________________________________________
> From: Stuart Douglas
> Sent: Monday, 30 November 2009 6:06 PM
> To: Shane Bryzak
> Subject: RE: [seam-dev] First cab off the rank!
>
> No, it will support them, the special case stuff for the primitives is so you don't have to be that careful about your types. e.g. :
>
> public @interface SomeAnnotation
> {
> long value();
> }
>
> you can do
>
> map.put("value",10);
>
> rather than
>
> map.put("value",new Long(10));
>
> Feel free to steal it, most of was stoled from AnnotationLiteral anyway. I think it would be good to get stuff like this and Gavin's Reannotated* classes and put them in some kind of extension utils module.
>
> Stuart
>
>
> ________________________________________
> From: Shane Bryzak [sbryzak(a)redhat.com]
> Sent: Monday, 30 November 2009 5:58 PM
> To: Stuart Douglas
> Cc: Gavin King; seam-dev(a)lists.jboss.org
> Subject: Re: [seam-dev] First cab off the rank!
>
> Looks good Stuart, I might have to steal some of your code - it doesn't
> seem to support enum or class member values though, is that right?
>
> On 30/11/09 14:31, Stuart Douglas wrote:
>> I have done up a quick and dirty one using JDK proxies, that seems to work ok (all my XML config tests pass and most of the code was stolen from AnnotationLiteral).
>>
>> The class that creates the proxy:
>>
>> http://bazaar.launchpad.net/~stuart-baileyroberts/jbraze/trunk/annotate/h...
>>
>> The InvocationHandler:
>>
>> http://bazaar.launchpad.net/~stuart-baileyroberts/jbraze/trunk/annotate/h...
>>
>> To create an instance you go
>>
>> AnnotationCache.getAnnotation(MyAnnotation.class,memberValues);
>>
>> where memberValues is a<String,Object> map of the annotations member values.
>>
>> Stuart
>> ________________________________________
>> From: Gavin King [gavin.king(a)gmail.com]
>> Sent: Monday, 30 November 2009 2:53 PM
>> To: Stuart Douglas; Weld-Dev
>> Subject: Re: [seam-dev] First cab off the rank!
>>
>> On Sun, Nov 29, 2009 at 10:39 PM, Gavin King<gavin.king(a)gmail.com> wrote:
>>
>>> Yes, you're right. So you would need to implement the annotation @interface.
>>>
>>> On Sun, Nov 29, 2009 at 10:27 PM, Stuart Douglas
>>> <stuart(a)baileyroberts.com.au> wrote:
>>>
>>>> What about for @NonBinding members? Won't implementations need to perform their own equality check if there are non binding members?
>>>>
>>>> Stuart
>>>>
>>>> ________________________________________
>>>> From: Gavin King [gavin.king(a)gmail.com]
>>>> Sent: Monday, 30 November 2009 1:22 PM
>>>> To: Shane Bryzak
>>>> Cc: Stuart Douglas; seam-dev(a)lists.jboss.org
>>>> Subject: Re: [seam-dev] First cab off the rank!
>>>>
>>>> Yeah. Probably you could just stick the members in an array. You
>>>> probably don't need to actually implement the annotation interface.
>>>> You would only need to implement Annotation.
>>>>
>>>> Well, the spec does not say explicitly that this would work, but it
>>>> seems fairly safe.
>>>>
>>>> Sent from my iPhone
>>>>
>>>> On Nov 29, 2009, at 9:07 PM, Shane Bryzak<sbryzak(a)redhat.com> wrote:
>>>>
>>>>
>>>>> Good point - isn't this simply a case though of implementing the
>>>>> equals() and hashCode() methods and checking that the members are
>>>>> equal,
>>>>> i.e. the same way that AnnotationLiteral does it?
>>>>>
>>>>> On 30/11/09 06:36, Stuart Douglas wrote:
>>>>>
>>>>>> Does it still work when the annotation has members? That was why I
>>>>>> needed the javassist.
>>>>>>
>>>>>> Stuart
>>>>>>
>>>>>> ________________________________________
>>>>>> From: seam-dev-bounces(a)lists.jboss.org [seam-dev-
>>>>>> bounces(a)lists.jboss.org] On Behalf Of Shane Bryzak
>>>>>> [sbryzak(a)redhat.com]
>>>>>> Sent: Monday, 30 November 2009 5:34 AM
>>>>>> To: Gavin King
>>>>>> Cc: seam-dev(a)lists.jboss.org
>>>>>> Subject: Re: [seam-dev] First cab off the rank!
>>>>>>
>>>>>> Nope, just wrote my own impl of Annotation which I could then pass
>>>>>> into
>>>>>> BeanManager.getBeans().
>>>>>>
>>>>>> On 30/11/09 04:32, Gavin King wrote:
>>>>>>
>>>>>>
>>>>>>> You used a jdk dynamicproxy? Probably a better idea.
>>>>>>>
>>>>>>> Sent from my iPhone
>>>>>>>
>>>>>>> On Nov 29, 2009, at 1:01 PM, Shane Bryzak<sbryzak(a)redhat.com>
>>>>>>> wrote:
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>> Done, although I didn't need to use Javassist. ;)
>>>>>>>>
>>>>>>>> On 30/11/09 02:38, Gavin King wrote:
>>>>>>>>
>>>>>>>>
>>>>>>>>> Stuart has some code to do this using javassist.
>>>>>>>>>
>>>>>>>>> On Sun, Nov 29, 2009 at 2:00 AM, Shane Bryzak<sbryzak(a)redhat.com>
>>>>>>>>> wrote:
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>> Almost got this working, however I need to be able to
>>>>>>>>>> reflectively
>>>>>>>>>> create an
>>>>>>>>>> AnnotationLiteral, given a String containing the fully qualified
>>>>>>>>>> name of the
>>>>>>>>>> qualifier. Anyone done this before?
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>> _______________________________________________
>>>>>> seam-dev mailing list
>>>>>> seam-dev(a)lists.jboss.org
>>>>>> https://lists.jboss.org/mailman/listinfo/seam-dev
>>>>>>
>>>>>>
>>>>> _______________________________________________
>>>>> seam-dev mailing list
>>>>> seam-dev(a)lists.jboss.org
>>>>> https://lists.jboss.org/mailman/listinfo/seam-dev
>>>>>
>>>>
>>>
>>>
>>> --
>>> Gavin King
>>> gavin.king(a)gmail.com
>>> http://in.relation.to/Bloggers/Gavin
>>> http://hibernate.org
>>> http://seamframework.org
>>>
>>>
>>
>>
>> --
>> Gavin King
>> gavin.king(a)gmail.com
>> http://in.relation.to/Bloggers/Gavin
>> http://hibernate.org
>> http://seamframework.org
>>
>> _______________________________________________
>> seam-dev mailing list
>> seam-dev(a)lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/seam-dev
>>
>
>
> _______________________________________________
> seam-dev mailing list
> seam-dev(a)lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/seam-dev
15 years
First cab off the rank!
by Shane Bryzak
I'm pleased to say that Seam Remoting 3.0.0 is now compiling and works
with the ported hello world example in CDI. Not all features are there
yet (such as JMS and session bean support) however the basic stuff seems
to work ok. Some of the porting process was a little shaky, mostly due
to my CDI noobishness so if anyone would care to look over the code some
peer review would be appreciated - especially in places like
ExecutionHandler and my usage of CreationalContext.
Since bean names are now an optional thing, I was wondering whether I
should support remoting with non-named beans. I could probably do it by
just allowing a fully qualified class name, what do you guys think?
Also, if you want to check out the hello world example, it's now in the
remoting module itself under the remoting/examples directory. The
example build is quite primitive, you need to run mvn install and then
copy the war file manually into JBoss's deploy directory. I'll try to
improve this when I get a chance. The remoting docs will eventually end
up in the module also.
15 years
GIT
by Pete Muir
A quick item we discussed at the f2f meeting was whether to switch to
GIT for our SCM, rather than SVN.
This would give us a IMO a system well suited to our distribued dev
model, it would also make it much easier for others to sandbox PEs and
then contribute them back to us.
The proposal is to use Github to host.
The team members at devoxx were in favour, but what do others think?
Pete
--
Pete Muir
http://in.relation.to/Bloggers/Pete
15 years
Re: [seam-dev] First cab off the rank!
by Stuart Douglas
Forgot to CC to seam-dev again.
________________________________________
From: Stuart Douglas
Sent: Monday, 30 November 2009 6:06 PM
To: Shane Bryzak
Subject: RE: [seam-dev] First cab off the rank!
No, it will support them, the special case stuff for the primitives is so you don't have to be that careful about your types. e.g. :
public @interface SomeAnnotation
{
long value();
}
you can do
map.put("value",10);
rather than
map.put("value",new Long(10));
Feel free to steal it, most of was stoled from AnnotationLiteral anyway. I think it would be good to get stuff like this and Gavin's Reannotated* classes and put them in some kind of extension utils module.
Stuart
________________________________________
From: Shane Bryzak [sbryzak(a)redhat.com]
Sent: Monday, 30 November 2009 5:58 PM
To: Stuart Douglas
Cc: Gavin King; seam-dev(a)lists.jboss.org
Subject: Re: [seam-dev] First cab off the rank!
Looks good Stuart, I might have to steal some of your code - it doesn't
seem to support enum or class member values though, is that right?
On 30/11/09 14:31, Stuart Douglas wrote:
> I have done up a quick and dirty one using JDK proxies, that seems to work ok (all my XML config tests pass and most of the code was stolen from AnnotationLiteral).
>
> The class that creates the proxy:
>
> http://bazaar.launchpad.net/~stuart-baileyroberts/jbraze/trunk/annotate/h...
>
> The InvocationHandler:
>
> http://bazaar.launchpad.net/~stuart-baileyroberts/jbraze/trunk/annotate/h...
>
> To create an instance you go
>
> AnnotationCache.getAnnotation(MyAnnotation.class,memberValues);
>
> where memberValues is a<String,Object> map of the annotations member values.
>
> Stuart
> ________________________________________
> From: Gavin King [gavin.king(a)gmail.com]
> Sent: Monday, 30 November 2009 2:53 PM
> To: Stuart Douglas; Weld-Dev
> Subject: Re: [seam-dev] First cab off the rank!
>
> On Sun, Nov 29, 2009 at 10:39 PM, Gavin King<gavin.king(a)gmail.com> wrote:
>
>> Yes, you're right. So you would need to implement the annotation @interface.
>>
>> On Sun, Nov 29, 2009 at 10:27 PM, Stuart Douglas
>> <stuart(a)baileyroberts.com.au> wrote:
>>
>>> What about for @NonBinding members? Won't implementations need to perform their own equality check if there are non binding members?
>>>
>>> Stuart
>>>
>>> ________________________________________
>>> From: Gavin King [gavin.king(a)gmail.com]
>>> Sent: Monday, 30 November 2009 1:22 PM
>>> To: Shane Bryzak
>>> Cc: Stuart Douglas; seam-dev(a)lists.jboss.org
>>> Subject: Re: [seam-dev] First cab off the rank!
>>>
>>> Yeah. Probably you could just stick the members in an array. You
>>> probably don't need to actually implement the annotation interface.
>>> You would only need to implement Annotation.
>>>
>>> Well, the spec does not say explicitly that this would work, but it
>>> seems fairly safe.
>>>
>>> Sent from my iPhone
>>>
>>> On Nov 29, 2009, at 9:07 PM, Shane Bryzak<sbryzak(a)redhat.com> wrote:
>>>
>>>
>>>> Good point - isn't this simply a case though of implementing the
>>>> equals() and hashCode() methods and checking that the members are
>>>> equal,
>>>> i.e. the same way that AnnotationLiteral does it?
>>>>
>>>> On 30/11/09 06:36, Stuart Douglas wrote:
>>>>
>>>>> Does it still work when the annotation has members? That was why I
>>>>> needed the javassist.
>>>>>
>>>>> Stuart
>>>>>
>>>>> ________________________________________
>>>>> From: seam-dev-bounces(a)lists.jboss.org [seam-dev-
>>>>> bounces(a)lists.jboss.org] On Behalf Of Shane Bryzak
>>>>> [sbryzak(a)redhat.com]
>>>>> Sent: Monday, 30 November 2009 5:34 AM
>>>>> To: Gavin King
>>>>> Cc: seam-dev(a)lists.jboss.org
>>>>> Subject: Re: [seam-dev] First cab off the rank!
>>>>>
>>>>> Nope, just wrote my own impl of Annotation which I could then pass
>>>>> into
>>>>> BeanManager.getBeans().
>>>>>
>>>>> On 30/11/09 04:32, Gavin King wrote:
>>>>>
>>>>>
>>>>>> You used a jdk dynamicproxy? Probably a better idea.
>>>>>>
>>>>>> Sent from my iPhone
>>>>>>
>>>>>> On Nov 29, 2009, at 1:01 PM, Shane Bryzak<sbryzak(a)redhat.com>
>>>>>> wrote:
>>>>>>
>>>>>>
>>>>>>
>>>>>>> Done, although I didn't need to use Javassist. ;)
>>>>>>>
>>>>>>> On 30/11/09 02:38, Gavin King wrote:
>>>>>>>
>>>>>>>
>>>>>>>> Stuart has some code to do this using javassist.
>>>>>>>>
>>>>>>>> On Sun, Nov 29, 2009 at 2:00 AM, Shane Bryzak<sbryzak(a)redhat.com>
>>>>>>>> wrote:
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>> Almost got this working, however I need to be able to
>>>>>>>>> reflectively
>>>>>>>>> create an
>>>>>>>>> AnnotationLiteral, given a String containing the fully qualified
>>>>>>>>> name of the
>>>>>>>>> qualifier. Anyone done this before?
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>> _______________________________________________
>>>>> seam-dev mailing list
>>>>> seam-dev(a)lists.jboss.org
>>>>> https://lists.jboss.org/mailman/listinfo/seam-dev
>>>>>
>>>>>
>>>> _______________________________________________
>>>> seam-dev mailing list
>>>> seam-dev(a)lists.jboss.org
>>>> https://lists.jboss.org/mailman/listinfo/seam-dev
>>>>
>>>
>>
>>
>> --
>> Gavin King
>> gavin.king(a)gmail.com
>> http://in.relation.to/Bloggers/Gavin
>> http://hibernate.org
>> http://seamframework.org
>>
>>
>
>
> --
> Gavin King
> gavin.king(a)gmail.com
> http://in.relation.to/Bloggers/Gavin
> http://hibernate.org
> http://seamframework.org
>
> _______________________________________________
> seam-dev mailing list
> seam-dev(a)lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/seam-dev
>
15 years
Re: [seam-dev] First cab off the rank!
by Stuart Douglas
I have done up a quick and dirty one using JDK proxies, that seems to work ok (all my XML config tests pass and most of the code was stolen from AnnotationLiteral).
The class that creates the proxy:
http://bazaar.launchpad.net/~stuart-baileyroberts/jbraze/trunk/annotate/h...
The InvocationHandler:
http://bazaar.launchpad.net/~stuart-baileyroberts/jbraze/trunk/annotate/h...
To create an instance you go
AnnotationCache.getAnnotation(MyAnnotation.class,memberValues);
where memberValues is a <String,Object> map of the annotations member values.
Stuart
________________________________________
From: Gavin King [gavin.king(a)gmail.com]
Sent: Monday, 30 November 2009 2:53 PM
To: Stuart Douglas; Weld-Dev
Subject: Re: [seam-dev] First cab off the rank!
On Sun, Nov 29, 2009 at 10:39 PM, Gavin King <gavin.king(a)gmail.com> wrote:
> Yes, you're right. So you would need to implement the annotation @interface.
>
> On Sun, Nov 29, 2009 at 10:27 PM, Stuart Douglas
> <stuart(a)baileyroberts.com.au> wrote:
>> What about for @NonBinding members? Won't implementations need to perform their own equality check if there are non binding members?
>>
>> Stuart
>>
>> ________________________________________
>> From: Gavin King [gavin.king(a)gmail.com]
>> Sent: Monday, 30 November 2009 1:22 PM
>> To: Shane Bryzak
>> Cc: Stuart Douglas; seam-dev(a)lists.jboss.org
>> Subject: Re: [seam-dev] First cab off the rank!
>>
>> Yeah. Probably you could just stick the members in an array. You
>> probably don't need to actually implement the annotation interface.
>> You would only need to implement Annotation.
>>
>> Well, the spec does not say explicitly that this would work, but it
>> seems fairly safe.
>>
>> Sent from my iPhone
>>
>> On Nov 29, 2009, at 9:07 PM, Shane Bryzak <sbryzak(a)redhat.com> wrote:
>>
>>> Good point - isn't this simply a case though of implementing the
>>> equals() and hashCode() methods and checking that the members are
>>> equal,
>>> i.e. the same way that AnnotationLiteral does it?
>>>
>>> On 30/11/09 06:36, Stuart Douglas wrote:
>>>> Does it still work when the annotation has members? That was why I
>>>> needed the javassist.
>>>>
>>>> Stuart
>>>>
>>>> ________________________________________
>>>> From: seam-dev-bounces(a)lists.jboss.org [seam-dev-
>>>> bounces(a)lists.jboss.org] On Behalf Of Shane Bryzak
>>>> [sbryzak(a)redhat.com]
>>>> Sent: Monday, 30 November 2009 5:34 AM
>>>> To: Gavin King
>>>> Cc: seam-dev(a)lists.jboss.org
>>>> Subject: Re: [seam-dev] First cab off the rank!
>>>>
>>>> Nope, just wrote my own impl of Annotation which I could then pass
>>>> into
>>>> BeanManager.getBeans().
>>>>
>>>> On 30/11/09 04:32, Gavin King wrote:
>>>>
>>>>> You used a jdk dynamicproxy? Probably a better idea.
>>>>>
>>>>> Sent from my iPhone
>>>>>
>>>>> On Nov 29, 2009, at 1:01 PM, Shane Bryzak<sbryzak(a)redhat.com>
>>>>> wrote:
>>>>>
>>>>>
>>>>>> Done, although I didn't need to use Javassist. ;)
>>>>>>
>>>>>> On 30/11/09 02:38, Gavin King wrote:
>>>>>>
>>>>>>> Stuart has some code to do this using javassist.
>>>>>>>
>>>>>>> On Sun, Nov 29, 2009 at 2:00 AM, Shane Bryzak<sbryzak(a)redhat.com>
>>>>>>> wrote:
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>> Almost got this working, however I need to be able to
>>>>>>>> reflectively
>>>>>>>> create an
>>>>>>>> AnnotationLiteral, given a String containing the fully qualified
>>>>>>>> name of the
>>>>>>>> qualifier. Anyone done this before?
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>> _______________________________________________
>>>> seam-dev mailing list
>>>> seam-dev(a)lists.jboss.org
>>>> https://lists.jboss.org/mailman/listinfo/seam-dev
>>>>
>>>
>>> _______________________________________________
>>> seam-dev mailing list
>>> seam-dev(a)lists.jboss.org
>>> https://lists.jboss.org/mailman/listinfo/seam-dev
>>
>
>
>
> --
> Gavin King
> gavin.king(a)gmail.com
> http://in.relation.to/Bloggers/Gavin
> http://hibernate.org
> http://seamframework.org
>
--
Gavin King
gavin.king(a)gmail.com
http://in.relation.to/Bloggers/Gavin
http://hibernate.org
http://seamframework.org
15 years
Re: [seam-dev] First cab off the rank!
by Stuart Douglas
Sorry, I forgot to CC in seam-dev
________________________________________
From: Gavin King [gavin.king(a)gmail.com]
Sent: Monday, 30 November 2009 2:39 PM
To: Stuart Douglas
Subject: Re: [seam-dev] First cab off the rank!
Yes, you're right. So you would need to implement the annotation @interface.
On Sun, Nov 29, 2009 at 10:27 PM, Stuart Douglas
<stuart(a)baileyroberts.com.au> wrote:
> What about for @NonBinding members? Won't implementations need to perform their own equality check if there are non binding members?
>
> Stuart
>
> ________________________________________
> From: Gavin King [gavin.king(a)gmail.com]
> Sent: Monday, 30 November 2009 1:22 PM
> To: Shane Bryzak
> Cc: Stuart Douglas; seam-dev(a)lists.jboss.org
> Subject: Re: [seam-dev] First cab off the rank!
>
> Yeah. Probably you could just stick the members in an array. You
> probably don't need to actually implement the annotation interface.
> You would only need to implement Annotation.
>
> Well, the spec does not say explicitly that this would work, but it
> seems fairly safe.
>
> Sent from my iPhone
>
> On Nov 29, 2009, at 9:07 PM, Shane Bryzak <sbryzak(a)redhat.com> wrote:
>
>> Good point - isn't this simply a case though of implementing the
>> equals() and hashCode() methods and checking that the members are
>> equal,
>> i.e. the same way that AnnotationLiteral does it?
>>
>> On 30/11/09 06:36, Stuart Douglas wrote:
>>> Does it still work when the annotation has members? That was why I
>>> needed the javassist.
>>>
>>> Stuart
>>>
>>> ________________________________________
>>> From: seam-dev-bounces(a)lists.jboss.org [seam-dev-
>>> bounces(a)lists.jboss.org] On Behalf Of Shane Bryzak
>>> [sbryzak(a)redhat.com]
>>> Sent: Monday, 30 November 2009 5:34 AM
>>> To: Gavin King
>>> Cc: seam-dev(a)lists.jboss.org
>>> Subject: Re: [seam-dev] First cab off the rank!
>>>
>>> Nope, just wrote my own impl of Annotation which I could then pass
>>> into
>>> BeanManager.getBeans().
>>>
>>> On 30/11/09 04:32, Gavin King wrote:
>>>
>>>> You used a jdk dynamicproxy? Probably a better idea.
>>>>
>>>> Sent from my iPhone
>>>>
>>>> On Nov 29, 2009, at 1:01 PM, Shane Bryzak<sbryzak(a)redhat.com>
>>>> wrote:
>>>>
>>>>
>>>>> Done, although I didn't need to use Javassist. ;)
>>>>>
>>>>> On 30/11/09 02:38, Gavin King wrote:
>>>>>
>>>>>> Stuart has some code to do this using javassist.
>>>>>>
>>>>>> On Sun, Nov 29, 2009 at 2:00 AM, Shane Bryzak<sbryzak(a)redhat.com>
>>>>>> wrote:
>>>>>>
>>>>>>
>>>>>>
>>>>>>> Almost got this working, however I need to be able to
>>>>>>> reflectively
>>>>>>> create an
>>>>>>> AnnotationLiteral, given a String containing the fully qualified
>>>>>>> name of the
>>>>>>> qualifier. Anyone done this before?
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>> _______________________________________________
>>> seam-dev mailing list
>>> seam-dev(a)lists.jboss.org
>>> https://lists.jboss.org/mailman/listinfo/seam-dev
>>>
>>
>> _______________________________________________
>> seam-dev mailing list
>> seam-dev(a)lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/seam-dev
>
--
Gavin King
gavin.king(a)gmail.com
http://in.relation.to/Bloggers/Gavin
http://hibernate.org
http://seamframework.org
15 years
Overriding annotated types and the SPI
by Stuart Douglas
I have been working on my XML configuration extension and have been making good progress, however I have run into some behavior that I cannot explain.
At the moment in my XML file I can do this:
<test:OtherQualifier>
<Qualifier/>
</test:OtherQualifier>
<test:QualifiedBean2>
<test:OtherQualifier value1="BB" value2="2"/>
</test:QualifiedBean2>
<test:QualifierTestBean>
<test:bean2>
<test:OtherQualifier value1="BB" value2="2"/>
<Inject/>
</test:bean2>
</test:QualifierTestBean>
When my extension sees this it creates two AnnotatedTypes and a Qualifier and registers them in the BeforeBeanDiscovery event. This all works fine, QualifiedBean2 gets injected into QualifierTestBean and life is good.
However if QualifiedBean2 is deployed inside a Bean archive things suddenly go pear shaped, all of a sudden the container seems to forget about the qualifier on QualifiedBean2 and it stops working. Does anyone have any idea what could be causing this? It looks like the bean deployment process is overriding my user supplied type level metadata.
Thanks,
Stuart
15 years
Pages.xml and extensibility
by Stuart Douglas
When pages.xml gets moved to seam 3 would it be possible to allow it to be extended using xml namespaces, and provide some kind of API for allowing extensions access to this information?
I can think of a few different uses, from custom security implementations, to storing general page metadata. I also think that this would allow from configuration of beans on a per page basis, e.g:
<pages>
<page view-id="/*" >
<xns:beans>
<myapp:Foo>
<!-- foo's config -->
</myapp:Foo>
</xns:beans>
</page>
<page view-id="/admin/" >
<xns:beans>
<myapp:AdminFoo>
<!-- admin foo's config -->
</myapp:AdminFoo>
</xns:beans>
</page>
</pages>
I have a pretty good idea how to implement this, i would add a custom qualifier to each bean and then generate a producer method that picks the correct one. Does this sound like a good idea?
Stuart
15 years
Seam 3 examples release cycle
by Shane Bryzak
I can foresee a potential issue with the release cycle for examples,
especially if we go down the path that we discussed during the meeting
where we consolidate examples into more complex apps that demonstrate
multiple Seam features. For example, let's say that we release a
production version of Seam 3.0.0 that contains (among other things):
Seam Security 3.0.0
Seam examples 3.0.0
Now let's say I add some new feature into security and decide to do a
release of Seam Security 3.0.1. If I have accordingly updated the
security examples with the new feature, does that mean that I need to do
a simultaneous release of Seam examples 3.0.1? Also, what if other
sub-project leads have in the meantime added new features to their
modules and their examples are in an incomplete state? As you can see
this becomes a problem.
One possible solution is to remove the examples branch altogether and
include the examples within the related module instead. This prevents
us though from creating multi-feature examples, as they will be bound to
the sub-project lifecycle. One other option is to only release
examples during a major Seam release, however this is less desirable in
the case where we release a module with complex new features that really
need to be demonstrated.
IMHO out of these two options the first one seems the lesser of two
evils, however I'm wondering what you guys think.
15 years