Weld functional tests
by Karel Piwko
Hi all,
there is QA proposal of integrating functional tests into Maven
lifecycle for building weld/seam-examples:
1/ Add an profile "ftest" into pom.xml of weld-examples-parent.
This profile contains all the necessary build executions
(starting container/deploying/running Selenium/
collecting results/undeploying/stopping container),
so this can be shared by examples.
2/ In a example, add the same "ftest" profile with dependency on
ftest-example artifact. This dependency is interval based, so
there is no need to release the example when its ftest changes.
Then add the testsuite for container into src/test/ directory of
example.
3/ Running maven with ftest profile will execute functional tests during
integration-test phase
So, all ftests are maven artifacts, downloaded from repository when
needed, normal build is untouched. We implemented this proposal for
Weld jsf/numberguess example and things are working fine.
There are currently two problems :
a/ Although weld-examples-parent contains ftest profile, this cannot be
used to recursively test all modules, because there is no way how
selectively activate this profile only for modules where this
is applicable (will be working in Maven 3). This shouldn't be the
problem, because in the end examples will be mainly parts of
weld|seam-modules, so this couldn't be used as well.
b/ User is required to pass reference to ftest.properties file with
-Dftest.properties, but this file is not a part of example
distribution. We can add this file or its skeleton to each example,
but it doesn't seem right.
And one open question:
Where will these ftest-examples packages live in SVN repository? I
placed them for the moment into examples/tests, but there might be a
better place.
Any comments on this?
Karel
15 years, 1 month
new JSF website
by Arbi Sookazian
I just looked at all the pages in this new JSF site:
http://www.javaserverfaces.org. It's very informative and serves as a
decent first-stop resource for JSF 2.0, I liked it (other than it needs a
touch-up/re-skin aesthetically).
1) It is apparently missing a list of enhancements/bug fixes from JSF 1.2 to
JSF 2.0. I recommend that to be added.
2) What tech stack did you use to develop that website? JSF and .........?
It would be nice if it eventually showcased JSF 2.0, RF 4.0, JPA 2.0, EJB
3.1, etc.
15 years, 1 month
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, 2 months
ReannotatedType
by Stuart Douglas
I just has a look at the ReannotatedType classes in weld-extensions with a view towards using them in my XML extension and I realised that they are not really suitable for use when you are creating an new AnnotatedType rather than changing an existing one. If no one has any better ideas I will submit a path with a new set of beans for creating a new annotated type (the alternative would be to change the existing ones to do both, which I don't think is a good idea).
Stuart
15 years, 2 months
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, 2 months
Perf4J integration
by Nicklas Karlsson
I know Daniel looked at this at some point for Seam 2 but I don't
recall any deliverables so I assume the case is still open ;-)
Do you think it would be handy to have Perf4J
(http://perf4j.codehaus.org/) integrated into Seam 3? It has some
annotation/AOP based configuration
but Weld interceptor bindings would be a good fit here. And with JSF
event -> CDI event propagation, the phases could probably also be
timed nicely.
You could then dump the stats into an Excel sheet or use the graphing
servlet provided by Perf4J for output...
---
Nik
15 years, 2 months