In class shown above insertUser() makes a call to deleteUser(). As per my understanding deleteUser() should have been executed in a new/saparate transaction, as it's annotated as @Transactional(propagation = Propagation.REQUIRES_NEW), but it's not happening that way. Instead deleteUser() is also executing in same transaction as that of insertUser(). Below is the log for this code which shows the same.
If that's correct than what is the use of @Transactional(propagation = Propagation.REQUIRES_NEW) annotation at deleteUser().
How a method will execute in saparate transaction if it's marked with an annotation @Transactional(propagation = Propagation.REQUIRES_NEW).
I am confused, please help me. Please let me know if question is not clear.
Is there any good link where I can have good understanding of Spring transaction as in my new project I would be majorly working on Spring Transaction.
Thanks for your reply. Still I've some doubts, please refer the code below which is related to it.
web.xml
testContentNegotiation-servlet.xml
FruitController.jsva
list.jsp
Fruit.java
Everything is fine for above code. I got json view as well as xml view for Fruit resource. But as shown I didn't configure any HttpMessageConverter in my context file. If HttpMessageConverter and ContentNegotiatingViewResolver works together then how conversion is performed here ?
I've a separate class shown below.
CoffeeController.java
Coffee.java
I got only xml representation for both Urls http://localhost:8080/contextName/testContentNegotiation/coffee/mocha (.xml or .json ). I am not getting any idea how this is happening as I didn't configure any MessageConverter in context. if that's mandatory then why xml is returned for both Urls. What role @ResponseBody is playing in CoffeeController.getCoffeeInXML() method?
One more doubt what is role of defaultViews and viewResolvers properties of ContentNegotiatingViewResolver.
I am confused about HttpMessageConverter and ContentNegotiatingViewResolver. Both does the same work or they are different? if we've an object that we wanna represent in xml format we can do it by using ContentNegotiatingViewResolver, same thing can be done using HttpMessageConverter. Then what is the difference?
I am really confused. Please let me know if my question is not correct.
Is there any book, tutorial which describes SAML and OAuth suppot in Spring3.0 with example. If you know please share the link ASAP. I got some tutorials for OAuth but that are more specific to Facebook & Twitter. If there's some link which explains these concepts in more generic way then please share that link.
I came across a confusion while reading instanceof operator. As per my understanding below code must have thrown a compile time error as Map & Collection are not in same class hierarchy. But code compiles fine please go through the code & let me know why is it happening ?
Now I am able to upload file in database now the problem is I've to download the file. I've googled a lot but could not find any web app for doing the same please help me in this ...
I am facing problem while saving Blob object (which represents a file being uploaded). When I run this code I don't get my object saved. Please suggest where I am missing something to get code working properly.
Employee.java
public class Employee implements Serializable {
long id;
private String name;
private String department;
private String projectTitle;
private String projectDescription;
private Blob content;
...................................
Thanks for your kind reply. Actually I've never used this API ... Was wondering if you can indicate me which class I should use to get my work done ...