[webbeans-dev] Specialized beans
by Gavin King
I've been discussing the following change with Pete:
Currently, the spec says that when a bean X is specialized by some
enabled bean Y, X is still considered enabled, and its producer
methods are also enabled, but they get called on Y instead of X.
However, the following is simpler to implement, specify, and probably
understand:
When a bean X is specialized by an enabled bean Y, X and all its
producer methods are considered disabled.
This definition lets us get rid of the whole notion of "most
specialized enabled bean".
I'm attaching a spec which incorporates the necessary changes, mainly
in 4.3 and 5.2.
WDYT?
--
Gavin King
gavin.king(a)gmail.com
http://in.relation.to/Bloggers/Gavin
http://hibernate.org
http://seamframework.org
15 years, 3 months
[webbeans-dev] SPI change: InjectionServices added
by Pete Muir
In trunk we now have per-BeanDeploymentArchive services, one of which
is InjectionServices, which will be called for every injection
performed by WB on contextual and and non-contextual instance
15 years, 3 months
[webbeans-dev] CDI Quartz Extension and SE Example
by Peter Royle
Hi,
I know you're all really busy right now with the spec updates, but
I've got a new extension for possible inclusion into WebBeans, plus a
new example app for SE which uses it.
== Quartz Extension ==
WebBeans-Quartz.zip
The extension is a Quartz extension. It basically fires events @Every
Second, @Every Minute and @Every Hour, which can be observed like so:
public void updateSomething(@Observes @Every Hour hour) { // blah }
On startup the extension first checks for the presence of observers
for each type of event and if there are no observers for a particular
type of event, no events will be scheduled.
I intend to extend it by:
1) introducing a way to define arbitrary schedules (in annotations or
in a properties file which is then referenced by name in an annotation
- which can then be made typesafe by subclassing the annotation). Eg:
package org.jboss.webbeans.extension.scheduler;
public @interface Scheduled {
String name();
}
-----------
public @interface AfterHours extends Scheduled{
String name() default "afterHours";
}
-----------
schedule.properties:
afterHours=0 1 * * * *
-----------
public void batchProcess(@Observes @AfterHours Schedule schedule)
{ ... }
2) Adding whatever is necessary to make this usable in EE environment.
Any pointers?
3) Any other suggestions?
== Memory Graph Example ==
MemoryGrapher.zip
This is another Swing based example, which renders a graph of the VM's
free memory, updating every second and calling garbage collection
every minute using the above extension. It's a nice concise example of
how to bootstrap and shutdown SE, how to observe events and how to use
the injectable logger. Plus everyone loves a pretty graph!
I know there is some obvious clean up work required, and maybe
removing the name Quartz (?) - which I'm happy to do prior to checking
in.
What do you think?
Pete.
15 years, 3 months
[webbeans-dev] TypeVariabe Event Type
by Gurkan Erdogdu
Hi;
In method, public void fireEvent(Object event, Annotation... qualifiers) in BeanManager; spec specifies that runtime event type can not be TypeVariable. But when I look at portable events, all of them contain type variable.
For Example;
ProcessAnnotatedType<X>
When fires this event, event.getClass.getTypeVariables always contain TypeVariable.
Is this true?
Thanks;
--Gurkan
15 years, 3 months
[webbeans-dev] Problems With Latest Trunk
by Roger Kitain
Hello Pete , all -
Just checked out a fresh trunk.
Upon running mvn clean install I get:
[INFO] Compiling 1 source file to
/Users/rogerk/webbeans/integration/webbeans-source/trunk/jboss-tck-runner/target/test-classes
[INFO] [surefire:test]
[INFO] Surefire report directory:
/Users/rogerk/webbeans/integration/webbeans-source/trunk/jboss-tck-runner/target/surefire-reports
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running TestSuite
[XmlMethodSelector]
CLASSNAME:org.jboss.testharness.impl.testng.DisableIntegrationTestsMethodSelector
[XmlMethodSelector] SETTING PRIORITY:0
[XmlMethodSelector]
CLASSNAME:org.jboss.testharness.impl.testng.ExcludeIncontainerUnderInvestigationMethodSelector
[XmlMethodSelector] SETTING PRIORITY:0
Tests run: 703, Failures: 1, Errors: 0, Skipped: 631, Time elapsed:
19.135 sec <<< FAILURE!
Results :
Failed tests:
beforeClass(org.jboss.jsr299.tck.tests.context.passivating.broken.managedBeanWithNonPassivatingDecorator.ManagedBeanWithNonPassivatingDecoratorTest)
Tests run: 703, Failures: 1, Errors: 0, Skipped: 631
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO]
------------------------------------------------------------------------
[INFO] There are test failures.
-roger
15 years, 3 months
[webbeans-dev] Switch to structured deployments
by Pete Muir
Hi all,
I have just committed the changes to the core to make it use the
deployment structure passed to it in bootstrap. There are still a
couple of hacks in there, which I will work out next. Please let me
know of any problems, and make sure you update to all modules with mvn
-U when next building!
Pete
15 years, 3 months