[webbeans-dev] Web Beans Bootstrap
by Pete Muir
I just added Bootstrap, which exposes
public void registerBeans(Class<?>...classes);
the method will register any classes passed as enterprise or simple
web beans as needed, and also add all producer methods.
AbstractTest creates a new Bootstrap which you can use in tests.
Next up is making an implementation of the WebBeanDiscovery SPI for
JBoss5.
16 years, 1 month
[webbeans-dev] Test failures?
by Gavin King
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running TestSuite
log4j:WARN No appenders could be found for logger
(org.jboss.webbeans.bean.AbstractBean).
log4j:WARN Please initialize the log4j system properly.
Tests run: 200, Failures: 5, Errors: 0, Skipped: 0, Time elapsed:
1.825 sec <<< FAILURE!
Results :
Failed tests:
testBeforeCompletion(org.jboss.webbeans.test.DeferredEventNotificationTest)
testObserve(org.jboss.webbeans.test.EventTest)
testDestroy(org.jboss.webbeans.test.NormalContextTest)
testMutipleIncompatibleScopeStereotypes(org.jboss.webbeans.test.ScopeTypeTest)
testAnnotationDefinedSpecializingEnterpriseBeanNotDirectlyExtendingAnnotationDefinedEnterpriseBeanFails(org.jboss.webbeans.test.ejb.model.EnterpriseBeanSpecializationTest)
Tests run: 200, Failures: 5, Errors: 0, Skipped: 0
--
Gavin King
gavin.king(a)gmail.com
http://in.relation.to/Bloggers/Gavin
http://hibernate.org
http://seamframework.org
16 years, 1 month
[webbeans-dev] Impl/Model merger etc
by Nicklas Karlsson
Hi,
I like the merging of the model into the bean, one less hierarchy to
keep in mind when implementing. I'm not quite sure I get the
XmlSimpleBean, though.
Looking at e.g. AbstractClassBean.initInitializerMethods(), it is
split into two parts based on the isDefinedInXml(). Couldn't the
initInitializerMethods() itself had been abstract and implemented in
different ways in the subclasses?
Another (unrelated) thing that came to mind is the implementation of
the Web Bean itself. Is it operating against the client proxy or is
the client proxy merged as an interceptor in the overall Web Bean? How
similar is the implementation going to be to the Seam
Component/interceptor stack/invocation context stuff?
PS. Did the spec announcement ever run on InfoQ?
---
Nik
16 years, 1 month
[webbeans-dev] Re: Remove methods
by Gavin King
Eeek, that's a bug in the spec. Thanks!
It should read:
"If an enterprise Web Bean defined using annotations does not
explicitly declare a Web Bean remove method using @Destructor, and
exactly one remove method that accepts no parameters exists, then that remove
method is the Web Bean remove method. Otherwise, if no remove method
that accepts no parameters exists, or more than one remove method
that accepts no parameters exists, the enterprise Web Bean has no Web
Bean remove method."
Damn copy/paste!
On Wed, Nov 12, 2008 at 1:56 AM, Nicklas Karlsson <nickarls(a)gmail.com> wrote:
> Hi
>
> Section "3.3.5.1. Declaring a Web Bean remove method using annotations." says
>
> "If an enterprise Web Bean defined using annotations does not
> explicitly declare a Web Bean remove method using @Destructor, and a
> remove method that accepts no parameters exists, then that remove
> method is the Web Bean remove method. Otherwise, if no remove method
> that accepts no parameters exists, the enterprise Web Bean has no Web
> Bean remove method."
>
> What should be done if there are multiple remove methods that accept
> no parameters? Throw a DefinitionException?
>
> ---
> Nik
>
--
Gavin King
gavin.king(a)gmail.com
http://in.relation.to/Bloggers/Gavin
http://hibernate.org
http://seamframework.org
16 years, 1 month
[webbeans-dev] "Energizing the community"
by Gavin King
So I've been trying to figure out what's the best way to get people
interested in learning more about Web Beans, and I'm thinking we
should aim to get a decent example application up and running for the
alpha release. In fact, I'm inclined to think that should be the new
definition of the alpha release: enough functionality to run a decent
web app. Which I guess probably means shuffling some stuff in the
plan.
So the new critical path to the alpha is:
* Web Bean discovery & initialization event
* Java EE integration
* session context
* JSF integration (or should it be a Wicket demo instead?)
* basic support for enterprise Web Beans
* Web Bean remove methods
Anything else which isn't done by the time we release the alpha can
wait til the next release (alpha2?).
Pete, WDYT? And how long do you think it takes to get that list of stuff done?
Of course, the app would be much cooler if it had events in it. David,
what is the true current status of work on the event bus?
--
Gavin King
gavin.king(a)gmail.com
http://in.relation.to/Bloggers/Gavin
http://hibernate.org
http://seamframework.org
16 years, 1 month
[webbeans-dev] Re: suggestion for Web Beans regarding @Named
by Gavin King
Yeah, I hate it, but it probably does make sense.
Send the proposal to the web beans group, I suppose.
On Fri, Nov 7, 2008 at 12:05 AM, Dan Allen <dan.j.allen(a)gmail.com> wrote:
> Gavin,
>
> I have a suggestion for Web Beans regarding the convention used by the
> @Named annotation. The nice part about this annotation is that it
> doesn't require the use of a string value to create a name that maps
> to the class name. In ~80% of cases, that is what people would do
> anyway. However, for framework builders, I can see them wanting to
> create fully-qualified names like in Seam to avoid naming conflicts.
> Would it be reasonable to propose adding an attribute to the @Named
> annotation that indicates the Java package should be prepended to the
> calculated name?
>
> @Named(qualified = true)
>
> That would avoid people slipping into the non-type safe pattern of:
>
> @Named("org.jboss.seam.core.expressions")
>
> -Dan
>
> --
> Dan Allen
> Software consultant | Author of Seam in Action
>
> http://mojavelinux.com
> http://mojavelinux.com/seaminaction
>
> NOTE: While I make a strong effort to keep up with my email on a daily
> basis, personal or other work matters can sometimes keep me away
> from my email. If you contact me, but don't hear back for more than a week,
> it is very likely that I am excessively backlogged or the message was
> caught in the spam filters. Please don't hesitate to resend a message if
> you feel that it did not reach my attention.
>
--
Gavin King
gavin.king(a)gmail.com
http://in.relation.to/Bloggers/Gavin
http://hibernate.org
http://seamframework.org
16 years, 1 month
[webbeans-dev] Re: Web Beans Context.get and scopes
by Gavin King
On Fri, Nov 7, 2008 at 1:23 AM, Nicklas Karlsson <nickarls(a)gmail.com> wrote:
> Hi,
>
> Currently it appears to be possible to get a reference to a context
> from manager and call get with a bean of any scopetype and create=true
> and end up with the instance in that scope. Is this the desired behaviour?
Hmmm. Interesting point. I suppose we should add to the spec that Context
should throw an exception if the scope of the given bean does not match.
> Bean instances created manually from Context.get also has no client
> proxy since it is applied at manager level but I understood from Pete
> that this should be the case(?)
Yes, that's correct. Context is not supposed to be called directly by the
application anyway.
> ---
> Nik
>
--
Gavin King
gavin.king(a)gmail.com
http://in.relation.to/Bloggers/Gavin
http://hibernate.org
http://seamframework.org
16 years, 1 month