Hi Joseph;
Thanks for starting to try OWB :)
Answers for your questions;
1) You can use OWB specific xml configuration using <WebBeans> or specification
level xml with <beans>. The default configuration uses specification level xml
configuration. You can change this configuration via putting
*openwebbeans.properties file* into your classpath
*META-INF/openwebbeans/openwebbeans.properties*. Default properties file is
loaded from *src/main/resources/META-INF/openwebbeans-default.properties* in
the source package.
Using default configuration, you are able to define decorators like this
<beans>
<decorators>
<class>org.apache.webbeans.test.xml.strict.DummyDecorator</class>
</decorators>
</beans>
You can also look at test cases for samples in
src/test/java/unittests/xml/strict package.
2) Yeah, this seems a bug. Patch is always welcome :)
Please could create a jira ticket and attach your patch :)
Thanks a lot;
--Gurkan
________________________________
From: Joseph Bergmark <[email protected]>
To: [email protected]
Sent: Wed, October 14, 2009 11:08:33 PM
Subject: Hi and a couple questions
Just wanted to send a quick e-mail to say Hi and ask a couple of questions.
I've had a chance to really spend some time reading over the specification
and playing around with OWB and write some small applications trying to get
my feet wet.
In the process, I've run into a couple small questions:
1) In trying to play around with decorators I had some trouble getting them
enabled by defining them in the beans.xml. The specification provides a
snippet of a beans.xml in section 8.2 that seems to indicate that the
<decorators> element should be inside a <beans> element. However, I needed
this element to be directly underneath the top level <WebBeans> element for
them to be enabled. Looking at WebBeansXMLConfigurator this seems to be
correct. I was not able to find a schema or dtd for the beans.xml to double
check that that snippet in section 8.2 was not just a simplification.
2) In order to get my injection points working in my test application, I had
to add the @Default qualifier. Section 3.10 seems to indicate that this
isn't required. Would this be something that I could open a JIRA issue for
and provide a patch?
Sincerley,
Joe Bergmark