I assume you meant AOP doesn't plan nice with AssistedInject? What do
you recommend I do until Guice 2.1? Should I avoid AssistedInject
altogether if I want to use @Transactional?
Thanks,
Gili
[EMAIL PROTECTED] wrote:
> AssistedInject doesn't play nice with AssistedInject. We're working on
> this.
> http://code.google.com/p/google-guice/issues/detail?id=131
>
> On Nov 27, 10:41 pm, Gili Tzabari <[EMAIL PROTECTED]> wrote:
>> [reposting bounced post]
>>
>> I just created totally new class. When I inject it using @Inject
>> transactions are handled perfectly. When I invoke it using
>> assistedinject they are not. The same method is being invoked in both
>> cases. The only thing changing is the constructor and annotations. There
>> is definitely some sort of problem mixing guice-assistedinject and
>> @Transactional.
>>
>> I'm unsure how to exercise the warp-persist "codemoney" example but
>> you should be able to reproduce this issue very easily on your end.
>>
>> Gili
>>
>> Dhanji R. Prasanna wrote:
>>> Ok This is not an AOP issue then, it is getting intercepted properly.
>>> I am not sure what the problem is then--are you calling this method
>>> from another transactional method?
>>> On Thu, Nov 27, 2008 at 9:15 PM, Gili Tzabari <[EMAIL PROTECTED]> wrote:
>>>> Here is my code sniplet:
>>>> public class VideoResource
>>>> {
>>>> @DELETE
>>>> @Transactional(rollbackOn = Exception.class)
>>>> public Response deleteVideo()
>>>> {
>>>> Video video = mediaManager.getVideoById(id);
>>>> // more code
>>>> }
>>>> }
>>>> VideoResource is injected using @AssistedInject. MediaManager is
>>>> injected using @Inject. When I trace into mediaManager.getVideoById() I
>>>> see JpaLocalTxnInterceptor.invoke() -> em.getTransaction().isActive()
>>>> returns false.
>>>> I am using guice-snapshot20081123.
>>>> Gili
>>>> Dhanji R. Prasanna wrote:
>>>>> Are you sure the @Transactional methods are not private?
>>>>> Im not sure, can you submit a test case, preferably extending one of
>>>>> warp-persist's tests?
>>>>> If AOP interception works on assisted inject'ed classes then
>>>>> warp-persist & @Transactional will work. Has anyone else seen a
>>>>> problem with AOP and assisted-inject?
>>>>> Dhanji.
>>>>> On Thu, Nov 27, 2008 at 8:53 PM, Gili <[EMAIL PROTECTED]> wrote:
>>>>>> Hi Dhanji,
>>>>>> I am seeing warp-persist silently ignoring method-level @Transactional
>>>>>> on classes created using @AssistedInejct. Can you please confirm this
>>>>>> and suggest a workaround?
>>>>>> Thank you,
>>>>>> Gili
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"google-guice" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/google-guice?hl=en
-~----------~----~----~----~------~----~------~--~---