@rgupta12,
Please edit your post above to wrap the code in [ CODE] [/CODE] tags.
Why are you defining two transaction managers?
How are your transactions declared? What are they...
Type: Posts; User: litius; Keyword(s):
@rgupta12,
Please edit your post above to wrap the code in [ CODE] [/CODE] tags.
Why are you defining two transaction managers?
How are your transactions declared? What are they...
@pouncer,
Within a TaskletStep: http://static.springsource.org/spring-batch/reference/html-single/index.html#taskletStep
I don't know what exactly it is you are trying to do that you...
@stephaneeybert,
I meant that if it truly was a database constraint, it should have been dealt with within a Data Access layer ( no within UI ).
But it looks like in your case it is not...
Take a look at MDC ( Mapped Diagnostic Context ): http://logback.qos.ch/manual/mdc.html ( it is also there in native log4j )
While the MDC manages contextual information on a per thread basis,...
@pouncer,
then it depends how ATOMIC you want to be.
if you really need to be atomic, you should run it all within the same transaction.
if your requirements allow you to be...
@pouncer,
There are a couple of things here:
1. It is good that the step one will commit, because you will be able to restart from the second step right away.
2. If your...
@pouncer,
Again, it is best NOT to do it ( even if there was a way ).
Why can't you call these "Oracle functions" within a single Step?
/Anatoly
@stephaneeybert,
one Contact has many Referrer, and can only be deleted when it has no Referrers?
Contact {
List<Referrer> referrers
}
@stephaneeybert,
It is a little hard to hypothesize without seeing an actual data model. I understand what you are looking to achieve technically, I just don't think that you need to worry...
@pouncer,
No, your transactions will still be committed when commit is called ( by the framework ).
Again, I don't think you should search for the technical solution, but rather focus...
So what is the desired behavior? When there is a reference, the object that is referenced should be also deleted right? So why not to rely on cascading to delete it?
/Anatoly
@pouncer,
If all three "Oracle functions" should be atomic, they have to run within the same transaction, hence within the same Step.
There is no "easily automated" way you can rollback...
I think the question here is how did you end up in this situation in the first place? If your cascades were set correctly, this entity would have been deleted when "another entity" that had a...
@Stephane,
Hibernate will take care of deleting all the associations, if you set a "cascade" property correctly ( check the link in my post above ).
Testing is always good, but instead...
The above design has a data access layer leaking to the UI, which is not a good idea.
What is your real requirement?
take a look at Hibernate's "Transitive persistence"
/Anatoly
@stephaneeybert,
I am not quite sure what you are asking, maybe there are just too many connected, completing each other questions, but..
I would not recommend to throw your custom DAO...
@mgorav,
Spring Batch is a general purpose framework which is geared to address any batch related concerns. It also has lots of useful independent components that can be used to solve...
@achaayan,
Yes, it is shared. Think about a stateless "service" bean, that should only be created once and used by many at different times at runtime: that would be your typical, default...
@kousik.majumder,
First off, listen to Marten, declare your transactions declaratively e.g. :
<aop:config>
<aop:pointcut id="conciseBusinessServiceMethods"
...
you can vote for JIRA ROO-1641: "Remove Roo Completely from the Project with One Command"
/Anatoly
@Manuel,
Yeap, there are problems with both approaches, I am just saying with declarative approach to manage transactions, there are less of them.
I am a big fan of code reviews and...
@martinh,
what is the problem you are trying to solve?
in Spring Batch, for example, that is what "late binding" is used for:
<bean id="flatFileItemReader" scope="step"
...
It is much easier to manage transactions for the whole project when you can have a single view of what's going on.
If you have 500 services, I would suggest you use good naming conventions and...
@torarnek@pvv.org,
If your integration tests are transactional and you are using tools like DbUnit to stage / delete your data, you are better off NOT taking the approach you described.
...
@Mark,
Is there a set of such common interfaces in Spring Data:
REST
Protocol Buffer
toJson, toXml, etc.. /...