aries-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Timothy Ward <>
Subject RE: Blueprint, factory method and JPA
Date Fri, 17 Sep 2010 08:32:37 GMT

Hi Bengt,

This is actually a case that isn't covered by the existing JPA blueprint integration. The
 and  elements are effectively specialized property  elements. As such your example is effectively:

<bean id="businessUnitServiceImpl" class="se.digia.sts.refdata.impl.BusinessUnitServiceImpl"
    <property name="entityManager" ref="magic_internal_JPA_bean_name"/>
This obviously is garbage from a blueprint point of view. To progress your application development
the only option currently is to expose a setter method on the "businessUnitServiceImpl" bean.

If this isn't possible for some reason, then please raise a JIRA enhancement against the Aries
JPA container, and I'll look at adding this support. I would like to check though, why is
it necessary to pass the context to the factory method? Managed persistence context objects
do not need to be shared between beans as the context propagates with the active transaction.



> Date: Fri, 17 Sep 2010 08:42:01 +0200
> Subject: Blueprint, factory method and JPA
> From:
> To:
> I'm trying to use a factory method with Aries Blueprint. I need to pass
> a JPA entity manager as an argument to the factory method. I'm trying
> the following:
>> class="se.digia.sts.refdata.impl.BusinessUnitServiceImpl"
> factory-method="create">
> However, Aries seems to object against this syntax. How can I
> accomplish this? All the samples I've seen where "jpa:context..." is
> involved always use setter injection, never in combination with the
> "" tag.
> I'm using version 0.2-incubating of Aries.
> /Bengt
View raw message