Decorator question
by Mark Struberg
Hi folks!
I'm a bit unsure about the interpretation of the section 8 Decorators in the spec.
There is a sentence which really confuses me:
"The set of decorated types of a decorator includes all bean types of the managed bean which are Java interfaces..."
I always thought about 2 use cases:
1.)
@Decorator
public class MyDec1 implements AnInterface {
@Inject @Delegate AnInterface1 theRealThing;
...
}
which will decorate all beans which implement the AnInterface.
2.)
@Decorator
public class MyDec2 extends AnotherBeanClass {
@Inject @Delegate AnotherBeanClass theRealThing;
...
}
which will decorate all beans which are of Type (+subclasses) of AnotherBeanClass.
This thoughts are basically backed by a few other paragraphs in the spec and also by the TCK (org.jboss.jsr299.tck.tests.lookup.injectionpoint.CatDecorator).
But for 2) the AnotherBeanClass doesn't need to implement any Interface at all (at least from the practical point of view).
txs and LieGrue,
strub
__________________________________________________
Do You Yahoo!?
Sie sind Spam leid? Yahoo! Mail verfügt über einen herausragenden Schutz gegen Massenmails.
http://mail.yahoo.com
16 years, 3 months
Tests for issues
by Pete Muir
All,
If you pick up an issue, please don't forget to write a quick test for the issue! This makes sure you
a) actually fix the issue
b) we don't end up with regressions down the line
Pete
16 years, 3 months
Do interceptor methods need to declare an Exception to be thrown?
by Mark Struberg
Hi!
Somewhere in the back of my brain, I remember that
@AroundInvoke
public void dingsBums(InvocationContext ivc) throws Exception;
MUST declare the 'throws Exception', otherwise it's illegal.
Am I right, or is my brain tricking me?
If the Exception is mandatory, the TCK needs to be changed:
org.jboss.jsr299.tck.tests.context.passivating.KokkolaInterceptor
(and maybe others)
txs and LieGrue,
strub
__________________________________________________
Do You Yahoo!?
Sie sind Spam leid? Yahoo! Mail verfügt über einen herausragenden Schutz gegen Massenmails.
http://mail.yahoo.com
16 years, 3 months
maybe add an ExtensionLoaderService to weld-core?
by Matt Drees
I've been playing with weld-test, and it'd be neat if a test could specify
which Extensions it'd like to use (in an annotation or via dsl-ish config).
But it seems WeldBootstrap is directly using a DefaultServiceLoader to find
them.
So, could this be abstracted into an ExtensionLoaderService interface /
DefaultServiceExtensionLoaderService impl? Then tests could set up their
own ExtensionLoaderService.
-Matt
16 years, 3 months
TCK Interceptors Classes
by Gurkan Erdogdu
Hi;
Some interceptors classes in the TCK test suites implement @PreDestroy methods. AFAIK, interceptors specification says that methods with @PreDestroy in interceptor class must take InvocationContext parameter. But in TCK, those methods do not take InvocationContext parameter
For example:
org.jboss.jsr299.tck.tests.context.dependent.TransactionalInterceptor
@PreDestroy public void destroy()
{
destroyed = true;
}
Is it correct?
--Gurkan
16 years, 3 months
Java SE extension
by Gavin King
Great work on this, Peter, it's really nice.
I think we should let you specify an event type to raise:
java -Devent=my.Event
or, perhaps, an event qualifier to be applied to the ContainerInitialized event:
java -Dqualifier=my.Qualifier
that way, you have a mechanism for choosing between "main methods".
Alternatively, we could use something EL-ish to specify a method to call:
java -Daction=mybean.method
Hrm, perhaps that's the best option. Maybe my idea of using an event
wasn't so great after all.
WDYT?
--
Gavin King
gavin.king(a)gmail.com
http://in.relation.to/Bloggers/Gavin
http://hibernate.org
http://seamframework.org
16 years, 3 months
Weld module info
by Nicklas Karlsson
A minor detail but do you think it would be handy if Weld would
support some kind of module info metadata that could be displayed on
bootstrap? It could be handy to see which modules
are present and have been picked up correctly... Something in the line
of a <module-info>Weld-Excel 3.0.1</module> in beans.xml so that a
list of enabled modules and extensions could be listed
when the container boots. It could even be extended to cover possible
dependencies.
--
---
Nik
16 years, 3 months