[seam-dev] XML Configuration of producer fields
stuart at baileyroberts.com.au
Wed Aug 25 06:01:11 EDT 2010
On 24/08/2010, at 9:16 PM, Pete Muir wrote:
> Agreed, this would be very useful.
> The only (practical) issue I see is that Weld currently doesn't expect AnnotatedTtypes to be respected for EE-style injection (in some/all cases). I suspect that it should (nb. this is large a change in the container integration contract).
> On 24 Aug 2010, at 09:39, Stuart Douglas wrote:
>> I think that seam-xml needs to ability to programatically add resource (and other) producer fields. My proposed syntax is:
>> <s:PersistenceContext unitName="customer" />
>> which would be equivalent to:
>> EntityManager entityManager;
>> This will also support other types of producer fields, such as weld extension generic bean producer fields and primitives:
>> <my:ApplicationVersion />
> I think it should be:
> <ee:Produces />
> <ee:PersistenceContext unitName="customer" />
> What was the reason for introducing the special producerField keyword?
It was to distinguish these from normal bean declarations, however @Produces will never be applied directly to a bean class, so that should be enough.
More information about the seam-dev