I have two repository interfaces that extends from GraphRepository. In
my service layer method, I save data using both repositories. When the
second save fails, the data saved by the first repository gets
persisted in my embedded db.
I am using spring data neo4j 2.0.1 release, neo4j 1.6, and spring
3.1.0.release.
I tried to annotate my method with @Transactional,
@Neo4jTransactional, but neither worked properly. What could be the
problem? Is there documentation that I can follow step-by-step to
setup transaction control with spring-data-neo4j?
> I have two repository interfaces that extends from GraphRepository. In
> my service layer method, I save data using both repositories. When the
> second save fails, the data saved by the first repository gets
> persisted in my embedded db.
> I am using spring data neo4j 2.0.1 release, neo4j 1.6, and spring
> 3.1.0.release.
> I tried to annotate my method with @Transactional,
> @Neo4jTransactional, but neither worked properly. What could be the
> problem? Is there documentation that I can follow step-by-step to
> setup transaction control with spring-data-neo4j?
On Thu, Apr 5, 2012 at 10:00 PM, Newbie <xia.inter...@gmail.com> wrote: > I have two repository interfaces that extends from GraphRepository. In > my service layer method, I save data using both repositories. When the > second save fails, the data saved by the first repository gets > persisted in my embedded db.
> I am using spring data neo4j 2.0.1 release, neo4j 1.6, and spring > 3.1.0.release.
> I tried to annotate my method with @Transactional, > @Neo4jTransactional, but neither worked properly. What could be the > problem? Is there documentation that I can follow step-by-step to > setup transaction control with spring-data-neo4j?
> Do I have to revert to use native api to persist data?
> On Apr 5, 4:00 pm, Newbie <xia.inter...@gmail.com> wrote: >> I have two repository interfaces that extends from GraphRepository. In >> my service layer method, I save data using both repositories. When the >> second save fails, the data saved by the first repository gets >> persisted in my embedded db.
>> I am using spring data neo4j 2.0.1 release, neo4j 1.6, and spring >> 3.1.0.release.
>> I tried to annotate my method with @Transactional, >> @Neo4jTransactional, but neither worked properly. What could be the >> problem? Is there documentation that I can follow step-by-step to >> setup transaction control with spring-data-neo4j?
I'm attaching my question to this thread because it seems so similar.
Using Neo4j 1.8.1 embedded graph database, SDN 2.1.0 in jetty container.
applicationContext.xml has:
<!-- Activates various annotations to be detected in bean classes --> <context:annotation-config />
<!-- enable the configuration of transactional behavior based on annotations --> <tx:annotation-driven />
I have a class ObjectiveComponent that does its own auto-wire of ObjectiveReposistory class, which seems to be working fine for us.
I added @Transactional to the update() method, which does a repository.save() but then does a lot of other stuff, and I want to roll back all of it if anything else fails withing that update() method.
To test this, I throw a RuntimeException at the bottom of my method after the repository.save() but before the end of the method, but the repository.save() still commits and does not roll back.
What am I doing wrong?
I also do not find the @Neo4jTransactional annotation anywhere.
On Sunday, April 8, 2012 1:09:16 PM UTC-4, Michael Hunger wrote:
> What does your spring config look like?
> Does your service also have an @Transactional? I assume you want to have a > tx that spsns both repo calls?
> Sent from mobile device
> Am 08.04.2012 um 14:44 schrieb Newbie <xia.in...@gmail.com <javascript:>>:
> > Anyone has any insight?
> > Do I have to revert to use native api to persist data?
> > On Apr 5, 4:00 pm, Newbie <xia.inter...@gmail.com> wrote: > >> I have two repository interfaces that extends from GraphRepository. In > >> my service layer method, I save data using both repositories. When the > >> second save fails, the data saved by the first repository gets > >> persisted in my embedded db.
> >> I am using spring data neo4j 2.0.1 release, neo4j 1.6, and spring > >> 3.1.0.release.
> >> I tried to annotate my method with @Transactional, > >> @Neo4jTransactional, but neither worked properly. What could be the > >> problem? Is there documentation that I can follow step-by-step to > >> setup transaction control with spring-data-neo4j?
> I'm attaching my question to this thread because it seems so similar.
> Using Neo4j 1.8.1 embedded graph database, SDN 2.1.0 in jetty container.
> applicationContext.xml has:
> <!-- Activates various annotations to be detected in bean classes -->
> <context:annotation-config />
> <!-- enable the configuration of transactional behavior based on annotations -->
> <tx:annotation-driven />
> I have a class ObjectiveComponent that does its own auto-wire of ObjectiveReposistory class, which seems to be working fine for us.
> I added @Transactional to the update() method, which does a repository.save() but then does a lot of other stuff, and I want to roll back all of it if anything else fails withing that update() method.
> To test this, I throw a RuntimeException at the bottom of my method after the repository.save() but before the end of the method, but the repository.save() still commits and does not roll back.
> What am I doing wrong?
> I also do not find the @Neo4jTransactional annotation anywhere.
> Thanks,
> --N
> On Sunday, April 8, 2012 1:09:16 PM UTC-4, Michael Hunger wrote:
>> What does your spring config look like?
>> Does your service also have an @Transactional? I assume you want to have a tx that spsns both repo calls?
>> Sent from mobile device
>> Am 08.04.2012 um 14:44 schrieb Newbie <xia.in...@gmail.com>:
>> > Anyone has any insight?
>> > Do I have to revert to use native api to persist data?
>> > On Apr 5, 4:00 pm, Newbie <xia.inter...@gmail.com> wrote:
>> >> I have two repository interfaces that extends from GraphRepository. In
>> >> my service layer method, I save data using both repositories. When the
>> >> second save fails, the data saved by the first repository gets
>> >> persisted in my embedded db.
>> >> I am using spring data neo4j 2.0.1 release, neo4j 1.6, and spring
>> >> 3.1.0.release.
>> >> I tried to annotate my method with @Transactional,
>> >> @Neo4jTransactional, but neither worked properly. What could be the
>> >> problem? Is there documentation that I can follow step-by-step to
>> >> setup transaction control with spring-data-neo4j?
>> >> Thanks,
> -- > You received this message because you are subscribed to the Google Groups "Neo4j" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to neo4j+unsubscribe@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
We are using RESTlet with jetty and Spring to handle the REST requests, which get sent into a helper class that is annotated @Component (I also tried @Service). I also tried @Transactional on the ObjectiveRepository class per some notes I found elsewhere. None of that works, no new transaction is created when the method fires.
I have so far been able to work around it by coding my own TX management in every method, very ugly but at least I can get it to work.
So there is no way to use the @Transactional to wrap a method on a jetty server and have clean code?
On Wednesday, March 20, 2013 1:52:21 AM UTC-4, Michael Hunger wrote:
> The rest api only has a tx per request.
> So @Transactional doesn't really work with server.
> The rest-binding just uses a null-tx
> Michael
> Sent from mobile device
> Am 20.03.2013 um 04:11 schrieb Neil Russell <neil.e....@gmail.com<javascript:> > >:
> Hi,
> I'm attaching my question to this thread because it seems so similar.
> Using Neo4j 1.8.1 embedded graph database, SDN 2.1.0 in jetty container.
> applicationContext.xml has:
> <!-- Activates various annotations to be detected in bean classes --> > <context:annotation-config />
> <!-- enable the configuration of transactional behavior based on > annotations --> > <tx:annotation-driven />
> I have a class ObjectiveComponent that does its own auto-wire of > ObjectiveReposistory class, which seems to be working fine for us.
> I added @Transactional to the update() method, which does a > repository.save() but then does a lot of other stuff, and I want to roll > back all of it if anything else fails withing that update() method.
> To test this, I throw a RuntimeException at the bottom of my method after > the repository.save() but before the end of the method, but the > repository.save() still commits and does not roll back.
> What am I doing wrong?
> I also do not find the @Neo4jTransactional annotation anywhere.
> Thanks,
> --N
> On Sunday, April 8, 2012 1:09:16 PM UTC-4, Michael Hunger wrote:
>> What does your spring config look like?
>> Does your service also have an @Transactional? I assume you want to have >> a tx that spsns both repo calls?
>> Sent from mobile device
>> Am 08.04.2012 um 14:44 schrieb Newbie <xia.in...@gmail.com>:
>> > Anyone has any insight?
>> > Do I have to revert to use native api to persist data?
>> > On Apr 5, 4:00 pm, Newbie <xia.inter...@gmail.com> wrote: >> >> I have two repository interfaces that extends from GraphRepository. In >> >> my service layer method, I save data using both repositories. When the >> >> second save fails, the data saved by the first repository gets >> >> persisted in my embedded db.
>> >> I am using spring data neo4j 2.0.1 release, neo4j 1.6, and spring >> >> 3.1.0.release.
>> >> I tried to annotate my method with @Transactional, >> >> @Neo4jTransactional, but neither worked properly. What could be the >> >> problem? Is there documentation that I can follow step-by-step to >> >> setup transaction control with spring-data-neo4j?
>> >> Thanks,
>> -- > You received this message because you are subscribed to the Google Groups > "Neo4j" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to neo4j+un...@googlegroups.com <javascript:>. > For more options, visit https://groups.google.com/groups/opt_out.
On Wednesday, March 20, 2013 1:45:34 PM UTC-4, Neil Russell wrote:
> Hi,
> We are using RESTlet with jetty and Spring to handle the REST requests, > which get sent into a helper class > that is annotated @Component (I also tried @Service). I also tried > @Transactional on the ObjectiveRepository class per some notes I found > elsewhere. > None of that works, no new transaction is created when the method fires.
> I have so far been able to work around it by coding my own TX management > in every method, very ugly but at least I can get it to work.
> So there is no way to use the @Transactional to wrap a method on a jetty > server and have clean code?
> --N
> On Wednesday, March 20, 2013 1:52:21 AM UTC-4, Michael Hunger wrote:
>> The rest api only has a tx per request.
>> So @Transactional doesn't really work with server.
>> The rest-binding just uses a null-tx
>> Michael
>> Sent from mobile device
>> Am 20.03.2013 um 04:11 schrieb Neil Russell <neil.e....@gmail.com>:
>> Hi,
>> I'm attaching my question to this thread because it seems so similar.
>> Using Neo4j 1.8.1 embedded graph database, SDN 2.1.0 in jetty container.
>> applicationContext.xml has:
>> <!-- Activates various annotations to be detected in bean classes --> >> <context:annotation-config />
>> <!-- enable the configuration of transactional behavior based on >> annotations --> >> <tx:annotation-driven />
>> I have a class ObjectiveComponent that does its own auto-wire of >> ObjectiveReposistory class, which seems to be working fine for us.
>> I added @Transactional to the update() method, which does a >> repository.save() but then does a lot of other stuff, and I want to roll >> back all of it if anything else fails withing that update() method.
>> To test this, I throw a RuntimeException at the bottom of my method after >> the repository.save() but before the end of the method, but the >> repository.save() still commits and does not roll back.
>> What am I doing wrong?
>> I also do not find the @Neo4jTransactional annotation anywhere.
>> Thanks,
>> --N
>> On Sunday, April 8, 2012 1:09:16 PM UTC-4, Michael Hunger wrote:
>>> What does your spring config look like?
>>> Does your service also have an @Transactional? I assume you want to have >>> a tx that spsns both repo calls?
>>> Sent from mobile device
>>> Am 08.04.2012 um 14:44 schrieb Newbie <xia.in...@gmail.com>:
>>> > Anyone has any insight?
>>> > Do I have to revert to use native api to persist data?
>>> > On Apr 5, 4:00 pm, Newbie <xia.inter...@gmail.com> wrote: >>> >> I have two repository interfaces that extends from GraphRepository. In >>> >> my service layer method, I save data using both repositories. When the >>> >> second save fails, the data saved by the first repository gets >>> >> persisted in my embedded db.
>>> >> I am using spring data neo4j 2.0.1 release, neo4j 1.6, and spring >>> >> 3.1.0.release.
>>> >> I tried to annotate my method with @Transactional, >>> >> @Neo4jTransactional, but neither worked properly. What could be the >>> >> problem? Is there documentation that I can follow step-by-step to >>> >> setup transaction control with spring-data-neo4j?
>>> >> Thanks,
>>> -- >> You received this message because you are subscribed to the Google Groups >> "Neo4j" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to neo4j+un...@googlegroups.com. >> For more options, visit https://groups.google.com/groups/opt_out.
Currently real transactions are only available if you use SDN against an embedded database in a application or application server or write a server extension for Neo4j which gives you also access to an embedded graph database.
Remote transaction support will come with the binary cypher driver in 2.1 or so.
Cheers
Michael
Am 20.03.2013 um 18:45 schrieb Neil Russell <neil.e.russ...@gmail.com>:
> We are using RESTlet with jetty and Spring to handle the REST requests, which get sent into a helper class
> that is annotated @Component (I also tried @Service). I also tried @Transactional on the ObjectiveRepository class per some notes I found elsewhere.
> None of that works, no new transaction is created when the method fires.
> I have so far been able to work around it by coding my own TX management in every method, very ugly but at least I can get it to work.
> So there is no way to use the @Transactional to wrap a method on a jetty server and have clean code?
> --N
> On Wednesday, March 20, 2013 1:52:21 AM UTC-4, Michael Hunger wrote:
> The rest api only has a tx per request.
> So @Transactional doesn't really work with server.
> The rest-binding just uses a null-tx
> Michael
> Sent from mobile device
> Am 20.03.2013 um 04:11 schrieb Neil Russell <neil.e....@gmail.com>:
>> Hi,
>> I'm attaching my question to this thread because it seems so similar.
>> Using Neo4j 1.8.1 embedded graph database, SDN 2.1.0 in jetty container.
>> applicationContext.xml has:
>> <!-- Activates various annotations to be detected in bean classes -->
>> <context:annotation-config />
>> <!-- enable the configuration of transactional behavior based on annotations -->
>> <tx:annotation-driven />
>> I have a class ObjectiveComponent that does its own auto-wire of ObjectiveReposistory class, which seems to be working fine for us.
>> I added @Transactional to the update() method, which does a repository.save() but then does a lot of other stuff, and I want to roll back all of it if anything else fails withing that update() method.
>> To test this, I throw a RuntimeException at the bottom of my method after the repository.save() but before the end of the method, but the repository.save() still commits and does not roll back.
>> What am I doing wrong?
>> I also do not find the @Neo4jTransactional annotation anywhere.
>> Thanks,
>> --N
>> On Sunday, April 8, 2012 1:09:16 PM UTC-4, Michael Hunger wrote:
>> What does your spring config look like?
>> Does your service also have an @Transactional? I assume you want to have a tx that spsns both repo calls?
>> Sent from mobile device
>> Am 08.04.2012 um 14:44 schrieb Newbie <xia.in...@gmail.com>:
>> > Anyone has any insight?
>> > Do I have to revert to use native api to persist data?
>> > On Apr 5, 4:00 pm, Newbie <xia.inter...@gmail.com> wrote:
>> >> I have two repository interfaces that extends from GraphRepository. In
>> >> my service layer method, I save data using both repositories. When the
>> >> second save fails, the data saved by the first repository gets
>> >> persisted in my embedded db.
>> >> I am using spring data neo4j 2.0.1 release, neo4j 1.6, and spring
>> >> 3.1.0.release.
>> >> I tried to annotate my method with @Transactional,
>> >> @Neo4jTransactional, but neither worked properly. What could be the
>> >> problem? Is there documentation that I can follow step-by-step to
>> >> setup transaction control with spring-data-neo4j?
>> >> Thanks,
>> -- >> You received this message because you are subscribed to the Google Groups "Neo4j" group.
>> To unsubscribe from this group and stop receiving emails from it, send an email to neo4j+un...@googlegroups.com.
>> For more options, visit https://groups.google.com/groups/opt_out.
> -- > You received this message because you are subscribed to the Google Groups "Neo4j" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to neo4j+unsubscribe@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
> On Wednesday, March 20, 2013 1:45:34 PM UTC-4, Neil Russell wrote:
> Hi,
> We are using RESTlet with jetty and Spring to handle the REST requests, which get sent into a helper class
> that is annotated @Component (I also tried @Service). I also tried @Transactional on the ObjectiveRepository class per some notes I found elsewhere.
> None of that works, no new transaction is created when the method fires.
> I have so far been able to work around it by coding my own TX management in every method, very ugly but at least I can get it to work.
> So there is no way to use the @Transactional to wrap a method on a jetty server and have clean code?
> --N
> On Wednesday, March 20, 2013 1:52:21 AM UTC-4, Michael Hunger wrote:
> The rest api only has a tx per request.
> So @Transactional doesn't really work with server.
> The rest-binding just uses a null-tx
> Michael
> Sent from mobile device
> Am 20.03.2013 um 04:11 schrieb Neil Russell <neil.e....@gmail.com>:
>> Hi,
>> I'm attaching my question to this thread because it seems so similar.
>> Using Neo4j 1.8.1 embedded graph database, SDN 2.1.0 in jetty container.
>> applicationContext.xml has:
>> <!-- Activates various annotations to be detected in bean classes -->
>> <context:annotation-config />
>> <!-- enable the configuration of transactional behavior based on annotations -->
>> <tx:annotation-driven />
>> I have a class ObjectiveComponent that does its own auto-wire of ObjectiveReposistory class, which seems to be working fine for us.
>> I added @Transactional to the update() method, which does a repository.save() but then does a lot of other stuff, and I want to roll back all of it if anything else fails withing that update() method.
>> To test this, I throw a RuntimeException at the bottom of my method after the repository.save() but before the end of the method, but the repository.save() still commits and does not roll back.
>> What am I doing wrong?
>> I also do not find the @Neo4jTransactional annotation anywhere.
>> Thanks,
>> --N
>> On Sunday, April 8, 2012 1:09:16 PM UTC-4, Michael Hunger wrote:
>> What does your spring config look like?
>> Does your service also have an @Transactional? I assume you want to have a tx that spsns both repo calls?
>> Sent from mobile device
>> Am 08.04.2012 um 14:44 schrieb Newbie <xia.in...@gmail.com>:
>> > Anyone has any insight?
>> > Do I have to revert to use native api to persist data?
>> > On Apr 5, 4:00 pm, Newbie <xia.inter...@gmail.com> wrote:
>> >> I have two repository interfaces that extends from GraphRepository. In
>> >> my service layer method, I save data using both repositories. When the
>> >> second save fails, the data saved by the first repository gets
>> >> persisted in my embedded db.
>> >> I am using spring data neo4j 2.0.1 release, neo4j 1.6, and spring
>> >> 3.1.0.release.
>> >> I tried to annotate my method with @Transactional,
>> >> @Neo4jTransactional, but neither worked properly. What could be the
>> >> problem? Is there documentation that I can follow step-by-step to
>> >> setup transaction control with spring-data-neo4j?
>> >> Thanks,
>> -- >> You received this message because you are subscribed to the Google Groups "Neo4j" group.
>> To unsubscribe from this group and stop receiving emails from it, send an email to neo4j+un...@googlegroups.com.
>> For more options, visit https://groups.google.com/groups/opt_out.
> -- > You received this message because you are subscribed to the Google Groups "Neo4j" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to neo4j+unsubscribe@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
> On Wednesday, March 20, 2013 1:45:34 PM UTC-4, Neil Russell wrote:
>> Hi,
>> We are using RESTlet with jetty and Spring to handle the REST requests, >> which get sent into a helper class >> that is annotated @Component (I also tried @Service). I also tried >> @Transactional on the ObjectiveRepository class per some notes I found >> elsewhere. >> None of that works, no new transaction is created when the method fires.
>> I have so far been able to work around it by coding my own TX management >> in every method, very ugly but at least I can get it to work.
>> So there is no way to use the @Transactional to wrap a method on a jetty >> server and have clean code?
>> --N
>> On Wednesday, March 20, 2013 1:52:21 AM UTC-4, Michael Hunger wrote:
>>> The rest api only has a tx per request.
>>> So @Transactional doesn't really work with server.
>>> The rest-binding just uses a null-tx
>>> Michael
>>> Sent from mobile device
>>> Am 20.03.2013 um 04:11 schrieb Neil Russell <neil.e....@gmail.com>:
>>> Hi,
>>> I'm attaching my question to this thread because it seems so similar.
>>> Using Neo4j 1.8.1 embedded graph database, SDN 2.1.0 in jetty container.
>>> applicationContext.xml has:
>>> <!-- Activates various annotations to be detected in bean classes --> >>> <context:annotation-config />
>>> <!-- enable the configuration of transactional behavior based on >>> annotations --> >>> <tx:annotation-driven />
>>> I have a class ObjectiveComponent that does its own auto-wire of >>> ObjectiveReposistory class, which seems to be working fine for us.
>>> I added @Transactional to the update() method, which does a >>> repository.save() but then does a lot of other stuff, and I want to roll >>> back all of it if anything else fails withing that update() method.
>>> To test this, I throw a RuntimeException at the bottom of my method >>> after the repository.save() but before the end of the method, but the >>> repository.save() still commits and does not roll back.
>>> What am I doing wrong?
>>> I also do not find the @Neo4jTransactional annotation anywhere.
>>> Thanks,
>>> --N
>>> On Sunday, April 8, 2012 1:09:16 PM UTC-4, Michael Hunger wrote:
>>>> What does your spring config look like?
>>>> Does your service also have an @Transactional? I assume you want to >>>> have a tx that spsns both repo calls?
>>>> Sent from mobile device
>>>> Am 08.04.2012 um 14:44 schrieb Newbie <xia.in...@gmail.com>:
>>>> > Anyone has any insight?
>>>> > Do I have to revert to use native api to persist data?
>>>> > On Apr 5, 4:00 pm, Newbie <xia.inter...@gmail.com> wrote: >>>> >> I have two repository interfaces that extends from GraphRepository. >>>> In >>>> >> my service layer method, I save data using both repositories. When >>>> the >>>> >> second save fails, the data saved by the first repository gets >>>> >> persisted in my embedded db.
>>>> >> I am using spring data neo4j 2.0.1 release, neo4j 1.6, and spring >>>> >> 3.1.0.release.
>>>> >> I tried to annotate my method with @Transactional, >>>> >> @Neo4jTransactional, but neither worked properly. What could be the >>>> >> problem? Is there documentation that I can follow step-by-step to >>>> >> setup transaction control with spring-data-neo4j?
>>>> >> Thanks,
>>> -- >>> You received this message because you are subscribed to the Google >>> Groups "Neo4j" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to neo4j+un...@googlegroups.com. >>> For more options, visit https://groups.google.com/groups/opt_out.
> -- > You received this message because you are subscribed to the Google Groups > "Neo4j" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to neo4j+un...@googlegroups.com <javascript:>. > For more options, visit https://groups.google.com/groups/opt_out.
>>> On Wednesday, March 20, 2013 1:45:34 PM UTC-4, Neil Russell wrote:
>>>> Hi,
>>>> We are using RESTlet with jetty and Spring to handle the REST requests, which get sent into a helper class
>>>> that is annotated @Component (I also tried @Service). I also tried @Transactional on the ObjectiveRepository class per some notes I found elsewhere.
>>>> None of that works, no new transaction is created when the method fires.
>>>> I have so far been able to work around it by coding my own TX management in every method, very ugly but at least I can get it to work.
>>>> So there is no way to use the @Transactional to wrap a method on a jetty server and have clean code?
>>>> --N
>>>> On Wednesday, March 20, 2013 1:52:21 AM UTC-4, Michael Hunger wrote:
>>>>> The rest api only has a tx per request.
>>>>> So @Transactional doesn't really work with server.
>>>>> The rest-binding just uses a null-tx
>>>>> Michael
>>>>> Sent from mobile device
>>>>> Am 20.03.2013 um 04:11 schrieb Neil Russell <neil.e....@gmail.com>:
>>>>>> Hi,
>>>>>> I'm attaching my question to this thread because it seems so similar.
>>>>>> Using Neo4j 1.8.1 embedded graph database, SDN 2.1.0 in jetty container.
>>>>>> applicationContext.xml has:
>>>>>> <!-- Activates various annotations to be detected in bean classes -->
>>>>>> <context:annotation-config />
>>>>>> <!-- enable the configuration of transactional behavior based on annotations -->
>>>>>> <tx:annotation-driven />
>>>>>> I have a class ObjectiveComponent that does its own auto-wire of ObjectiveReposistory class, which seems to be working fine for us.
>>>>>> I added @Transactional to the update() method, which does a repository.save() but then does a lot of other stuff, and I want to roll back all of it if anything else fails withing that update() method.
>>>>>> To test this, I throw a RuntimeException at the bottom of my method after the repository.save() but before the end of the method, but the repository.save() still commits and does not roll back.
>>>>>> What am I doing wrong?
>>>>>> I also do not find the @Neo4jTransactional annotation anywhere.
>>>>>> Thanks,
>>>>>> --N
>>>>>> On Sunday, April 8, 2012 1:09:16 PM UTC-4, Michael Hunger wrote:
>>>>>>> What does your spring config look like?
>>>>>>> Does your service also have an @Transactional? I assume you want to have a tx that spsns both repo calls?
>>>>>>> Sent from mobile device
>>>>>>> Am 08.04.2012 um 14:44 schrieb Newbie <xia.in...@gmail.com>:
>>>>>>> > Anyone has any insight?
>>>>>>> > Do I have to revert to use native api to persist data?
>>>>>>> > On Apr 5, 4:00 pm, Newbie <xia.inter...@gmail.com> wrote:
>>>>>>> >> I have two repository interfaces that extends from GraphRepository. In
>>>>>>> >> my service layer method, I save data using both repositories. When the
>>>>>>> >> second save fails, the data saved by the first repository gets
>>>>>>> >> persisted in my embedded db.
>>>>>>> >> I am using spring data neo4j 2.0.1 release, neo4j 1.6, and spring
>>>>>>> >> 3.1.0.release.
>>>>>>> >> I tried to annotate my method with @Transactional,
>>>>>>> >> @Neo4jTransactional, but neither worked properly. What could be the
>>>>>>> >> problem? Is there documentation that I can follow step-by-step to
>>>>>>> >> setup transaction control with spring-data-neo4j?
>>>>>>> >> Thanks,
>>>>>> -- >>>>>> You received this message because you are subscribed to the Google Groups "Neo4j" group.
>>>>>> To unsubscribe from this group and stop receiving emails from it, send an email to neo4j+un...@googlegroups.com.
>>>>>> For more options, visit https://groups.google.com/groups/opt_out.
>>> -- >>> You received this message because you are subscribed to the Google Groups "Neo4j" group.
>>> To unsubscribe from this group and stop receiving emails from it, send an email to neo4j+un...@googlegroups.com.
>>> For more options, visit https://groups.google.com/groups/opt_out.
> -- > You received this message because you are subscribed to the Google Groups "Neo4j" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to neo4j+unsubscribe@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>> On Wednesday, March 20, 2013 1:45:34 PM UTC-4, Neil Russell wrote:
>>> Hi,
>>> We are using RESTlet with jetty and Spring to handle the REST requests, >>> which get sent into a helper class >>> that is annotated @Component (I also tried @Service). I also tried >>> @Transactional on the ObjectiveRepository class per some notes I found >>> elsewhere. >>> None of that works, no new transaction is created when the method fires.
>>> I have so far been able to work around it by coding my own TX management >>> in every method, very ugly but at least I can get it to work.
>>> So there is no way to use the @Transactional to wrap a method on a jetty >>> server and have clean code?
>>> --N
>>> On Wednesday, March 20, 2013 1:52:21 AM UTC-4, Michael Hunger wrote:
>>>> The rest api only has a tx per request.
>>>> So @Transactional doesn't really work with server.
>>>> The rest-binding just uses a null-tx
>>>> Michael
>>>> Sent from mobile device
>>>> Am 20.03.2013 um 04:11 schrieb Neil Russell <neil.e....@gmail.com>:
>>>> Hi,
>>>> I'm attaching my question to this thread because it seems so similar.
>>>> Using Neo4j 1.8.1 embedded graph database, SDN 2.1.0 in jetty container.
>>>> applicationContext.xml has:
>>>> <!-- Activates various annotations to be detected in bean classes --> >>>> <context:annotation-config />
>>>> <!-- enable the configuration of transactional behavior based on >>>> annotations --> >>>> <tx:annotation-driven />
>>>> I have a class ObjectiveComponent that does its own auto-wire of >>>> ObjectiveReposistory class, which seems to be working fine for us.
>>>> I added @Transactional to the update() method, which does a >>>> repository.save() but then does a lot of other stuff, and I want to roll >>>> back all of it if anything else fails withing that update() method.
>>>> To test this, I throw a RuntimeException at the bottom of my method >>>> after the repository.save() but before the end of the method, but the >>>> repository.save() still commits and does not roll back.
>>>> What am I doing wrong?
>>>> I also do not find the @Neo4jTransactional annotation anywhere.
>>>> Thanks,
>>>> --N
>>>> On Sunday, April 8, 2012 1:09:16 PM UTC-4, Michael Hunger wrote:
>>>>> What does your spring config look like?
>>>>> Does your service also have an @Transactional? I assume you want to >>>>> have a tx that spsns both repo calls?
>>>>> Sent from mobile device
>>>>> Am 08.04.2012 um 14:44 schrieb Newbie <xia.in...@gmail.com>:
>>>>> > Anyone has any insight?
>>>>> > Do I have to revert to use native api to persist data?
>>>>> > On Apr 5, 4:00 pm, Newbie <xia.inter...@gmail.com> wrote: >>>>> >> I have two repository interfaces that extends from GraphRepository. >>>>> In >>>>> >> my service layer method, I save data using both repositories. When >>>>> the >>>>> >> second save fails, the data saved by the first repository gets >>>>> >> persisted in my embedded db.
>>>>> >> I am using spring data neo4j 2.0.1 release, neo4j 1.6, and spring >>>>> >> 3.1.0.release.
>>>>> >> I tried to annotate my method with @Transactional, >>>>> >> @Neo4jTransactional, but neither worked properly. What could be the >>>>> >> problem? Is there documentation that I can follow step-by-step to >>>>> >> setup transaction control with spring-data-neo4j?
>>>>> >> Thanks,
>>>> -- >>>> You received this message because you are subscribed to the Google >>>> Groups "Neo4j" group. >>>> To unsubscribe from this group and stop receiving emails from it, send >>>> an email to neo4j+un...@googlegroups.com. >>>> For more options, visit https://groups.google.com/groups/opt_out.
>> -- >> You received this message because you are subscribed to the Google Groups >> "Neo4j" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to neo4j+un...@googlegroups.com. >> For more options, visit https://groups.google.com/groups/opt_out.
>> -- > You received this message because you are subscribed to the Google Groups > "Neo4j" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to neo4j+un...@googlegroups.com <javascript:>. > For more options, visit https://groups.google.com/groups/opt_out.
To be clear, annotating any methods in the below class as @Transactional, does not appear to work - no transaction is started when such methods are called.
>>> On Wednesday, March 20, 2013 1:45:34 PM UTC-4, Neil Russell wrote:
>>>> Hi,
>>>> We are using RESTlet with jetty and Spring to handle the REST requests, >>>> which get sent into a helper class >>>> that is annotated @Component (I also tried @Service). I also tried >>>> @Transactional on the ObjectiveRepository class per some notes I found >>>> elsewhere. >>>> None of that works, no new transaction is created when the method fires.
>>>> I have so far been able to work around it by coding my own TX >>>> management in every method, very ugly but at least I can get it to work.
>>>> So there is no way to use the @Transactional to wrap a method on a >>>> jetty server and have clean code?
>>>> --N
>>>> On Wednesday, March 20, 2013 1:52:21 AM UTC-4, Michael Hunger wrote:
>>>>> The rest api only has a tx per request.
>>>>> So @Transactional doesn't really work with server.
>>>>> The rest-binding just uses a null-tx
>>>>> Michael
>>>>> Sent from mobile device
>>>>> Am 20.03.2013 um 04:11 schrieb Neil Russell <neil.e....@gmail.com>:
>>>>> Hi,
>>>>> I'm attaching my question to this thread because it seems so similar.
>>>>> Using Neo4j 1.8.1 embedded graph database, SDN 2.1.0 in jetty >>>>> container.
>>>>> applicationContext.xml has:
>>>>> <!-- Activates various annotations to be detected in bean classes --> >>>>> <context:annotation-config />
>>>>> <!-- enable the configuration of transactional behavior based on >>>>> annotations --> >>>>> <tx:annotation-driven />
>>>>> I have a class ObjectiveComponent that does its own auto-wire of >>>>> ObjectiveReposistory class, which seems to be working fine for us.
>>>>> I added @Transactional to the update() method, which does a >>>>> repository.save() but then does a lot of other stuff, and I want to roll >>>>> back all of it if anything else fails withing that update() method.
>>>>> To test this, I throw a RuntimeException at the bottom of my method >>>>> after the repository.save() but before the end of the method, but the >>>>> repository.save() still commits and does not roll back.
>>>>> What am I doing wrong?
>>>>> I also do not find the @Neo4jTransactional annotation anywhere.
>>>>> Thanks,
>>>>> --N
>>>>> On Sunday, April 8, 2012 1:09:16 PM UTC-4, Michael Hunger wrote:
>>>>>> What does your spring config look like?
>>>>>> Does your service also have an @Transactional? I assume you want to >>>>>> have a tx that spsns both repo calls?
>>>>>> Sent from mobile device
>>>>>> Am 08.04.2012 um 14:44 schrieb Newbie <xia.in...@gmail.com>:
>>>>>> > Anyone has any insight?
>>>>>> > Do I have to revert to use native api to persist data?
>>>>>> > On Apr 5, 4:00 pm, Newbie <xia.inter...@gmail.com> wrote: >>>>>> >> I have two repository interfaces that extends from >>>>>> GraphRepository. In >>>>>> >> my service layer method, I save data using both repositories. When >>>>>> the >>>>>> >> second save fails, the data saved by the first repository gets >>>>>> >> persisted in my embedded db.
>>>>>> >> I am using spring data neo4j 2.0.1 release, neo4j 1.6, and spring >>>>>> >> 3.1.0.release.
>>>>>> >> I tried to annotate my method with @Transactional, >>>>>> >> @Neo4jTransactional, but neither worked properly. What could be the >>>>>> >> problem? Is there documentation that I can follow step-by-step to >>>>>> >> setup transaction control with spring-data-neo4j?
>>>>>> >> Thanks,
>>>>> -- >>>>> You received this message because you are subscribed to the Google >>>>> Groups "Neo4j" group. >>>>> To unsubscribe from this group and stop receiving emails from it, send >>>>> an email to neo4j+un...@googlegroups.com. >>>>> For more options, visit https://groups.google.com/groups/opt_out.
>>> -- >>> You received this message because you are subscribed to the Google >>> Groups "Neo4j" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to neo4j+un...@googlegroups.com. >>> For more options, visit https://groups.google.com/groups/opt_out.
>>> -- >> You received this message because you are subscribed to the Google Groups >> "Neo4j" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to neo4j+un...@googlegroups.com. >> For more options, visit https://groups.google.com/groups/opt_out.
On Mon, Apr 1, 2013 at 5:49 PM, Neil Russell <neil.e.russ...@gmail.com> wrote:
> To be clear, annotating any methods in the below class as @Transactional,
> does not appear to work - no transaction is started when such methods are
> called.
> --N
> On Friday, March 22, 2013 1:58:49 PM UTC-4, Neil Russell wrote:
>>>> On Wednesday, March 20, 2013 1:45:34 PM UTC-4, Neil Russell wrote:
>>>>> Hi,
>>>>> We are using RESTlet with jetty and Spring to handle the REST requests,
>>>>> which get sent into a helper class
>>>>> that is annotated @Component (I also tried @Service). I also tried
>>>>> @Transactional on the ObjectiveRepository class per some notes I found
>>>>> elsewhere.
>>>>> None of that works, no new transaction is created when the method
>>>>> fires.
>>>>> I have so far been able to work around it by coding my own TX
>>>>> management in every method, very ugly but at least I can get it to work.
>>>>> So there is no way to use the @Transactional to wrap a method on a
>>>>> jetty server and have clean code?
>>>>> --N
>>>>> On Wednesday, March 20, 2013 1:52:21 AM UTC-4, Michael Hunger wrote:
>>>>>> The rest api only has a tx per request.
>>>>>> So @Transactional doesn't really work with server.
>>>>>> The rest-binding just uses a null-tx
>>>>>> Michael
>>>>>> Sent from mobile device
>>>>>> Am 20.03.2013 um 04:11 schrieb Neil Russell <neil.e....@gmail.com>:
>>>>>> Hi,
>>>>>> I'm attaching my question to this thread because it seems so similar.
>>>>>> Using Neo4j 1.8.1 embedded graph database, SDN 2.1.0 in jetty
>>>>>> container.
>>>>>> applicationContext.xml has:
>>>>>> <!-- Activates various annotations to be detected in bean classes -->
>>>>>> <context:annotation-config />
>>>>>> <!-- enable the configuration of transactional behavior based on
>>>>>> annotations -->
>>>>>> <tx:annotation-driven />
>>>>>> I have a class ObjectiveComponent that does its own auto-wire of
>>>>>> ObjectiveReposistory class, which seems to be working fine for us.
>>>>>> I added @Transactional to the update() method, which does a
>>>>>> repository.save() but then does a lot of other stuff, and I want to roll
>>>>>> back all of it if anything else fails withing that update() method.
>>>>>> To test this, I throw a RuntimeException at the bottom of my method
>>>>>> after the repository.save() but before the end of the method, but the
>>>>>> repository.save() still commits and does not roll back.
>>>>>> What am I doing wrong?
>>>>>> I also do not find the @Neo4jTransactional annotation anywhere.
>>>>>> Thanks,
>>>>>> --N
>>>>>> On Sunday, April 8, 2012 1:09:16 PM UTC-4, Michael Hunger wrote:
>>>>>>> What does your spring config look like?
>>>>>>> Does your service also have an @Transactional? I assume you want to
>>>>>>> have a tx that spsns both repo calls?
>>>>>>> Sent from mobile device
>>>>>>> Am 08.04.2012 um 14:44 schrieb Newbie <xia.in...@gmail.com>:
>>>>>>> > Anyone has any insight?
>>>>>>> > Do I have to revert to use native api to persist data?
>>>>>>> > On Apr 5, 4:00 pm, Newbie <xia.inter...@gmail.com> wrote:
>>>>>>> >> I have two repository interfaces that extends from
>>>>>>> >> GraphRepository. In
>>>>>>> >> my service layer method, I save data using both repositories. When
>>>>>>> >> the
>>>>>>> >> second save fails, the data saved by the first repository gets
>>>>>>> >> persisted in my embedded db.
>>>>>>> >> I am using spring data neo4j 2.0.1 release, neo4j 1.6, and spring
>>>>>>> >> 3.1.0.release.
>>>>>>> >> I tried to annotate my method with @Transactional,
>>>>>>> >> @Neo4jTransactional, but neither worked properly. What could be
>>>>>>> >> the
>>>>>>> >> problem? Is there documentation that I can follow step-by-step to
>>>>>>> >> setup transaction control with spring-data-neo4j?
>>>>>>> >> Thanks,
>>>>>> --
>>>>>> You received this message because you are subscribed to the Google
>>>>>> Groups "Neo4j" group.
>>>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>>>> an email to neo4j+un...@googlegroups.com.
>>>>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>> --
>>>> You received this message because you are subscribed to the Google
>>>> Groups "Neo4j" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>> an email to neo4j+un...@googlegroups.com.
>>>> For more options, visit https://groups.google.com/groups/opt_out.
>>> --
>>> You received this message because you are subscribed to the Google Groups
>>> "Neo4j" group.
>>> To unsubscribe from this group and stop receiving emails from it, send an
>>> email to neo4j+un...@googlegroups.com.
>>> For more options, visit https://groups.google.com/groups/opt_out.
> --
> You received this message because you are subscribed to the Google Groups
> "Neo4j" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to neo4j+unsubscribe@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
Are you sure this works in general? After all you are creating this class
with "new" and don't get it from the spring context where it would be
enhanced (using a proxy or AJ) to add the transactional interceptors.
> To be clear, annotating any methods in the below class as @Transactional,
> does not appear to work - no transaction is started when such methods are
> called.
> --N
> On Friday, March 22, 2013 1:58:49 PM UTC-4, Neil Russell wrote:
>>>> On Wednesday, March 20, 2013 1:45:34 PM UTC-4, Neil Russell wrote:
>>>>> Hi,
>>>>> We are using RESTlet with jetty and Spring to handle the REST
>>>>> requests, which get sent into a helper class
>>>>> that is annotated @Component (I also tried @Service). I also tried
>>>>> @Transactional on the ObjectiveRepository class per some notes I found
>>>>> elsewhere.
>>>>> None of that works, no new transaction is created when the method
>>>>> fires.
>>>>> I have so far been able to work around it by coding my own TX
>>>>> management in every method, very ugly but at least I can get it to work.
>>>>> So there is no way to use the @Transactional to wrap a method on a
>>>>> jetty server and have clean code?
>>>>> --N
>>>>> On Wednesday, March 20, 2013 1:52:21 AM UTC-4, Michael Hunger wrote:
>>>>>> The rest api only has a tx per request.
>>>>>> So @Transactional doesn't really work with server.
>>>>>> The rest-binding just uses a null-tx
>>>>>> Michael
>>>>>> Sent from mobile device
>>>>>> Am 20.03.2013 um 04:11 schrieb Neil Russell <neil.e....@gmail.com>:
>>>>>> Hi,
>>>>>> I'm attaching my question to this thread because it seems so similar.
>>>>>> Using Neo4j 1.8.1 embedded graph database, SDN 2.1.0 in jetty
>>>>>> container.
>>>>>> applicationContext.xml has:
>>>>>> <!-- Activates various annotations to be detected in bean classes -->
>>>>>> <context:annotation-config />
>>>>>> <!-- enable the configuration of transactional behavior based on
>>>>>> annotations -->
>>>>>> <tx:annotation-driven />
>>>>>> I have a class ObjectiveComponent that does its own auto-wire of
>>>>>> ObjectiveReposistory class, which seems to be working fine for us.
>>>>>> I added @Transactional to the update() method, which does a
>>>>>> repository.save() but then does a lot of other stuff, and I want to roll
>>>>>> back all of it if anything else fails withing that update() method.
>>>>>> To test this, I throw a RuntimeException at the bottom of my method
>>>>>> after the repository.save() but before the end of the method, but the
>>>>>> repository.save() still commits and does not roll back.
>>>>>> What am I doing wrong?
>>>>>> I also do not find the @Neo4jTransactional annotation anywhere.
>>>>>> Thanks,
>>>>>> --N
>>>>>> On Sunday, April 8, 2012 1:09:16 PM UTC-4, Michael Hunger wrote:
>>>>>>> What does your spring config look like?
>>>>>>> Does your service also have an @Transactional? I assume you want to
>>>>>>> have a tx that spsns both repo calls?
>>>>>>> Sent from mobile device
>>>>>>> Am 08.04.2012 um 14:44 schrieb Newbie <xia.in...@gmail.com>:
>>>>>>> > Anyone has any insight?
>>>>>>> > Do I have to revert to use native api to persist data?
>>>>>>> > On Apr 5, 4:00 pm, Newbie <xia.inter...@gmail.com> wrote:
>>>>>>> >> I have two repository interfaces that extends from
>>>>>>> GraphRepository. In
>>>>>>> >> my service layer method, I save data using both repositories.
>>>>>>> When the
>>>>>>> >> second save fails, the data saved by the first repository gets
>>>>>>> >> persisted in my embedded db.
>>>>>>> >> I am using spring data neo4j 2.0.1 release, neo4j 1.6, and spring
>>>>>>> >> 3.1.0.release.
>>>>>>> >> I tried to annotate my method with @Transactional,
>>>>>>> >> @Neo4jTransactional, but neither worked properly. What could be
>>>>>>> the
>>>>>>> >> problem? Is there documentation that I can follow step-by-step to
>>>>>>> >> setup transaction control with spring-data-neo4j?
>>>>>>> >> Thanks,
>>>>>> --
>>>>>> You received this message because you are subscribed to the Google
>>>>>> Groups "Neo4j" group.
>>>>>> To unsubscribe from this group and stop receiving emails from it,
>>>>>> send an email to neo4j+un...@googlegroups.com.
>>>>>> For more options, visit https://groups.google.com/**groups/opt_out<https://groups.google.com/groups/opt_out>
>>>>>> .
>>>> --
>>>> You received this message because you are subscribed to the Google
>>>> Groups "Neo4j" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>> an email to neo4j+un...@googlegroups.com.
>>>> For more options, visit https://groups.google.com/**groups/opt_out<https://groups.google.com/groups/opt_out>
>>>> .
>>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Neo4j" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to neo4j+un...@googlegroups.com.
>>> For more options, visit https://groups.google.com/**groups/opt_out<https://groups.google.com/groups/opt_out>
>>> .
>>> --
> You received this message because you are subscribed to the Google Groups
> "Neo4j" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to neo4j+unsubscribe@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
On Tuesday, April 2, 2013 7:26:19 AM UTC-4, Michael Hunger wrote:
> Are you sure this works in general? After all you are creating this class > with "new" and don't get it from the spring context where it would be > enhanced (using a proxy or AJ) to add the transactional interceptors.
> just injects dependencies imho, so @Transactional at the dependencies > should work but I doubt that they work in your current class.
> On Mon, Apr 1, 2013 at 5:49 PM, Neil Russell <neil.e....@gmail.com<javascript:> > > wrote:
>> To be clear, annotating any methods in the below class as @Transactional, >> does not appear to work - no transaction is started when such methods are >> called.
>> --N
>> On Friday, March 22, 2013 1:58:49 PM UTC-4, Neil Russell wrote:
>>>>> On Wednesday, March 20, 2013 1:45:34 PM UTC-4, Neil Russell wrote:
>>>>>> Hi,
>>>>>> We are using RESTlet with jetty and Spring to handle the REST >>>>>> requests, which get sent into a helper class >>>>>> that is annotated @Component (I also tried @Service). I also tried >>>>>> @Transactional on the ObjectiveRepository class per some notes I found >>>>>> elsewhere. >>>>>> None of that works, no new transaction is created when the method >>>>>> fires.
>>>>>> I have so far been able to work around it by coding my own TX >>>>>> management in every method, very ugly but at least I can get it to work.
>>>>>> So there is no way to use the @Transactional to wrap a method on a >>>>>> jetty server and have clean code?
>>>>>> --N
>>>>>> On Wednesday, March 20, 2013 1:52:21 AM UTC-4, Michael Hunger wrote:
>>>>>>> The rest api only has a tx per request.
>>>>>>> So @Transactional doesn't really work with server.
>>>>>>> The rest-binding just uses a null-tx
>>>>>>> Michael
>>>>>>> Sent from mobile device
>>>>>>> Am 20.03.2013 um 04:11 schrieb Neil Russell <neil.e....@gmail.com>:
>>>>>>> Hi,
>>>>>>> I'm attaching my question to this thread because it seems so similar.
>>>>>>> Using Neo4j 1.8.1 embedded graph database, SDN 2.1.0 in jetty >>>>>>> container.
>>>>>>> applicationContext.xml has:
>>>>>>> <!-- Activates various annotations to be detected in bean classes --> >>>>>>> <context:annotation-config />
>>>>>>> <!-- enable the configuration of transactional behavior based on >>>>>>> annotations --> >>>>>>> <tx:annotation-driven />
>>>>>>> I have a class ObjectiveComponent that does its own auto-wire of >>>>>>> ObjectiveReposistory class, which seems to be working fine for us.
>>>>>>> I added @Transactional to the update() method, which does a >>>>>>> repository.save() but then does a lot of other stuff, and I want to roll >>>>>>> back all of it if anything else fails withing that update() method.
>>>>>>> To test this, I throw a RuntimeException at the bottom of my method >>>>>>> after the repository.save() but before the end of the method, but the >>>>>>> repository.save() still commits and does not roll back.
>>>>>>> What am I doing wrong?
>>>>>>> I also do not find the @Neo4jTransactional annotation anywhere.
>>>>>>> Thanks,
>>>>>>> --N
>>>>>>> On Sunday, April 8, 2012 1:09:16 PM UTC-4, Michael Hunger wrote:
>>>>>>>> What does your spring config look like?
>>>>>>>> Does your service also have an @Transactional? I assume you want to >>>>>>>> have a tx that spsns both repo calls?
>>>>>>>> Sent from mobile device
>>>>>>>> Am 08.04.2012 um 14:44 schrieb Newbie <xia.in...@gmail.com>:
>>>>>>>> > Anyone has any insight?
>>>>>>>> > Do I have to revert to use native api to persist data?
>>>>>>>> > On Apr 5, 4:00 pm, Newbie <xia.inter...@gmail.com> wrote: >>>>>>>> >> I have two repository interfaces that extends from >>>>>>>> GraphRepository. In >>>>>>>> >> my service layer method, I save data using both repositories. >>>>>>>> When the >>>>>>>> >> second save fails, the data saved by the first repository gets >>>>>>>> >> persisted in my embedded db.
>>>>>>>> >> I am using spring data neo4j 2.0.1 release, neo4j 1.6, and spring >>>>>>>> >> 3.1.0.release.
>>>>>>>> >> I tried to annotate my method with @Transactional, >>>>>>>> >> @Neo4jTransactional, but neither worked properly. What could be >>>>>>>> the >>>>>>>> >> problem? Is there documentation that I can follow step-by-step to >>>>>>>> >> setup transaction control with spring-data-neo4j?
>>>>>>>> >> Thanks,
>>>>>>> -- >>>>>>> You received this message because you are subscribed to the Google >>>>>>> Groups "Neo4j" group. >>>>>>> To unsubscribe from this group and stop receiving emails from it, >>>>>>> send an email to neo4j+un...@googlegroups.com. >>>>>>> For more options, visit https://groups.google.com/**groups/opt_out<https://groups.google.com/groups/opt_out> >>>>>>> .
>>>>> -- >>>>> You received this message because you are subscribed to the Google >>>>> Groups "Neo4j" group. >>>>> To unsubscribe from this group and stop receiving emails from it, send >>>>> an email to neo4j+un...@googlegroups.com. >>>>> For more options, visit https://groups.google.com/**groups/opt_out<https://groups.google.com/groups/opt_out> >>>>> .
>>>>> -- >>>> You received this message because you are subscribed to the Google >>>> Groups "Neo4j" group. >>>> To unsubscribe from this group and stop receiving emails from it, send >>>> an email to neo4j+un...@googlegroups.com. >>>> For more options, visit https://groups.google.com/**groups/opt_out<https://groups.google.com/groups/opt_out> >>>> .
>>>> -- >> You received this message because you are subscribed to the Google Groups >> "Neo4j" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to neo4j+un...@googlegroups.com <javascript:>. >> For more options, visit https://groups.google.com/groups/opt_out.
@Neo4jTransactional is used internally and is mostly there if you have a
parallel relational transaction-manager in your code and don't want to
change all @Transactionals to use a qualifier.
On Thu, Apr 4, 2013 at 10:51 PM, Neil Russell <neil.e.russ...@gmail.com>wrote:
> I believe you are correct that calling "autoWire" takes care of basic DI
> stuff, but probably not a lot of other stuff.
> I changed my code to instead ask the context to getBean() for my class,
> and it appears that this does get the @Transactional notation working.
> I found several mentions online about @Neo4jTransactional annotation, but
> I don't see those in SDN 2.1
> ( I was wrong, we are still on SDN 2.1, FWIW).
> Thanks guys.
> --N
> On Tuesday, April 2, 2013 7:26:19 AM UTC-4, Michael Hunger wrote:
>> Are you sure this works in general? After all you are creating this class
>> with "new" and don't get it from the spring context where it would be
>> enhanced (using a proxy or AJ) to add the transactional interceptors.
>> just injects dependencies imho, so @Transactional at the dependencies
>> should work but I doubt that they work in your current class.
>> On Mon, Apr 1, 2013 at 5:49 PM, Neil Russell <neil.e....@gmail.com>wrote:
>>> To be clear, annotating any methods in the below class as
>>> @Transactional, does not appear to work - no transaction is started when
>>> such methods are called.
>>> --N
>>> On Friday, March 22, 2013 1:58:49 PM UTC-4, Neil Russell wrote:
>>>>>> On Wednesday, March 20, 2013 1:45:34 PM UTC-4, Neil Russell wrote:
>>>>>>> Hi,
>>>>>>> We are using RESTlet with jetty and Spring to handle the REST
>>>>>>> requests, which get sent into a helper class
>>>>>>> that is annotated @Component (I also tried @Service). I also tried
>>>>>>> @Transactional on the ObjectiveRepository class per some notes I found
>>>>>>> elsewhere.
>>>>>>> None of that works, no new transaction is created when the method
>>>>>>> fires.
>>>>>>> I have so far been able to work around it by coding my own TX
>>>>>>> management in every method, very ugly but at least I can get it to work.
>>>>>>> So there is no way to use the @Transactional to wrap a method on a
>>>>>>> jetty server and have clean code?
>>>>>>> --N
>>>>>>> On Wednesday, March 20, 2013 1:52:21 AM UTC-4, Michael Hunger wrote:
>>>>>>>> The rest api only has a tx per request.
>>>>>>>> So @Transactional doesn't really work with server.
>>>>>>>> The rest-binding just uses a null-tx
>>>>>>>> Michael
>>>>>>>> Sent from mobile device
>>>>>>>> Am 20.03.2013 um 04:11 schrieb Neil Russell <neil.e....@gmail.com>:
>>>>>>>> Hi,
>>>>>>>> I'm attaching my question to this thread because it seems so
>>>>>>>> similar.
>>>>>>>> Using Neo4j 1.8.1 embedded graph database, SDN 2.1.0 in jetty
>>>>>>>> container.
>>>>>>>> applicationContext.xml has:
>>>>>>>> <!-- Activates various annotations to be detected in bean classes
>>>>>>>> -->
>>>>>>>> <context:annotation-config />
>>>>>>>> <!-- enable the configuration of transactional behavior based on
>>>>>>>> annotations -->
>>>>>>>> <tx:annotation-driven />
>>>>>>>> I have a class ObjectiveComponent that does its own auto-wire of
>>>>>>>> ObjectiveReposistory class, which seems to be working fine for us.
>>>>>>>> I added @Transactional to the update() method, which does a
>>>>>>>> repository.save() but then does a lot of other stuff, and I want to roll
>>>>>>>> back all of it if anything else fails withing that update() method.
>>>>>>>> To test this, I throw a RuntimeException at the bottom of my method
>>>>>>>> after the repository.save() but before the end of the method, but the
>>>>>>>> repository.save() still commits and does not roll back.
>>>>>>>> What am I doing wrong?
>>>>>>>> I also do not find the @Neo4jTransactional annotation anywhere.
>>>>>>>> Thanks,
>>>>>>>> --N
>>>>>>>> On Sunday, April 8, 2012 1:09:16 PM UTC-4, Michael Hunger wrote:
>>>>>>>>> What does your spring config look like?
>>>>>>>>> Does your service also have an @Transactional? I assume you want
>>>>>>>>> to have a tx that spsns both repo calls?
>>>>>>>>> Sent from mobile device
>>>>>>>>> Am 08.04.2012 um 14:44 schrieb Newbie <xia.in...@gmail.com>:
>>>>>>>>> > Anyone has any insight?
>>>>>>>>> > Do I have to revert to use native api to persist data?
>>>>>>>>> > On Apr 5, 4:00 pm, Newbie <xia.inter...@gmail.com> wrote:
>>>>>>>>> >> I have two repository interfaces that extends from
>>>>>>>>> GraphRepository. In
>>>>>>>>> >> my service layer method, I save data using both repositories.
>>>>>>>>> When the
>>>>>>>>> >> second save fails, the data saved by the first repository gets
>>>>>>>>> >> persisted in my embedded db.
>>>>>>>>> >> I am using spring data neo4j 2.0.1 release, neo4j 1.6, and
>>>>>>>>> spring
>>>>>>>>> >> 3.1.0.release.
>>>>>>>>> >> I tried to annotate my method with @Transactional,
>>>>>>>>> >> @Neo4jTransactional, but neither worked properly. What could be
>>>>>>>>> the
>>>>>>>>> >> problem? Is there documentation that I can follow step-by-step
>>>>>>>>> to
>>>>>>>>> >> setup transaction control with spring-data-neo4j?
>>>>>>>>> >> Thanks,
>>>>>>>> --
>>>>>>>> You received this message because you are subscribed to the Google
>>>>>>>> Groups "Neo4j" group.
>>>>>>>> To unsubscribe from this group and stop receiving emails from it,
>>>>>>>> send an email to neo4j+un...@googlegroups.com.
>>>>>>>> For more options, visit https://groups.google.com/**grou** >>>>>>>> ps/opt_out <https://groups.google.com/groups/opt_out>.
>>>>>> --
>>>>>> You received this message because you are subscribed to the Google
>>>>>> Groups "Neo4j" group.
>>>>>> To unsubscribe from this group and stop receiving emails from it,
>>>>>> send an email to neo4j+un...@googlegroups.com.
>>>>>> For more options, visit https://groups.google.com/**grou**ps/opt_out<https://groups.google.com/groups/opt_out>
>>>>>> .
>>>>>> --
>>>>> You received this message because you are subscribed to the Google
>>>>> Groups "Neo4j" group.
>>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>>> an email to neo4j+un...@googlegroups.com.
>>>>> For more options, visit https://groups.google.com/**grou**ps/opt_out<https://groups.google.com/groups/opt_out>
>>>>> .
>>>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Neo4j" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to neo4j+un...@**googlegroups.com.
>>> For more options, visit https://groups.google.com/**groups/opt_out<https://groups.google.com/groups/opt_out>
>>> .
>> --
> You received this message because you are subscribed to the Google Groups
> "Neo4j" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to neo4j+unsubscribe@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.