Sorry wrong reply :).I though it was for a previous mail

On Mon, Oct 17, 2011 at 2:38 PM, Dimitris Zenios
<dimitris.zen...@gmail.com> wrote:
> Thiago i am using tapestry-jpa.I haven’t tested tynamo-jpa.From what i
> can see at the source code of JpaModule.java there is a method
>
>
>    @Contribute(ValueEncoderSource.class)
>    public static void provideValueEncoders(final
> MappedConfiguration<Class, ValueEncoderFactory> configuration,
>
> @Symbol(JpaSymbols.PROVIDE_ENTITY_VALUE_ENCODERS)
>                                            final boolean
> provideEncoders, final EntityManagerSource entityManagerSource,
>                                            final EntityManagerManager
> entityManagerManager, final TypeCoercer typeCoercer,
>                                            final PropertyAccess
> propertyAccess, final LoggerSource loggerSource)
>    {
>
>        if (!provideEncoders)
>            return;
>
>        for (final PersistenceUnitInfo info :
> entityManagerSource.getPersistenceUnitInfos())
>        {
>            final EntityManagerFactory emf =
> entityManagerSource.getEntityManagerFactory(info.getPersistenceUnitName());
>
>            final Metamodel metamodel = emf.getMetamodel();
>
>            for (final EntityType<?> entity : metamodel.getEntities())
>            {
>                final Class<?> javaType = entity.getJavaType();
>
>                final ValueEncoderFactory factory = new ValueEncoderFactory()
>                {
>                    public ValueEncoder create(final Class type)
>                    {
>                        return new JpaValueEncoder(entity,
> entityManagerManager, info.getPersistenceUnitName(),
>                                propertyAccess, typeCoercer,
> loggerSource.getLogger(javaType));
>                    }
>                };
>
>                configuration.add(javaType, factory);
>            }
>        }
>    }
>
>
> This is the method that converts entities to string and strings to
> Entities.I am sure that this method gets called but after that its not
> working.And before anybody asks
> JpaSymbols.PROVIDE_ENTITY_VALUE_ENCODERS is set to true by default and
> i didn’t change it
>
> On Mon, Oct 17, 2011 at 2:32 PM, Thiago H. de Paula Figueiredo
> <thiag...@gmail.com> wrote:
>> On Sun, 16 Oct 2011 17:54:29 -0200, jesse <jessegr...@hotmail.com> wrote:
>>
>>> My app works great with tynamo JPA, tynamo resteasy, eclipselink (2.2.1),
>>> and Tapestry 5.2.6.  I had to do one small hack due to the fact that the
>>> tynamo code relies on Defense.  No big deal though, and it's all working.
>>>
>>> I've tried to switch to 5.3, and I believe I have everything set up
>>> correctly (obviously I've removed the tynamo jpa dependency from my pom).
>>
>> Check the tapestry-jpa documentation, as it's not based in tynamo-jpa and
>> they may have different behavior.
>>
>> --
>> Thiago H. de Paula Figueiredo
>> Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and
>> instructor
>> Owner, Ars Machina Tecnologia da Informação Ltda.
>> http://www.arsmachina.com.br
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>> For additional commands, e-mail: users-h...@tapestry.apache.org
>>
>>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to