Whew! I finally figured it out!
Stack:
Java SE 1.6.0_21
Maven 2.0.10
Spring 3.0.5.RELEASE
JPA 2 (Provider - Hibernate)
Derby 10.6.1.0
Project Directory Structure:
pom.xml
...
Type: Posts; User: axiopisty; Keyword(s):
Whew! I finally figured it out!
Stack:
Java SE 1.6.0_21
Maven 2.0.10
Spring 3.0.5.RELEASE
JPA 2 (Provider - Hibernate)
Derby 10.6.1.0
Project Directory Structure:
pom.xml
...
I took the time to investigate spring roo. Seems like it would be nice for creating web applications. But I'm writing a Java SE application. If anyone knows how to enable using @Transactional from...
That is exactly why I wanted to stay away from the TransactionTemplate. Thanks for your reply. I'll check out spring roo. Do you know of a quick, short and sweet, spring roo getting started guide?
I'm creating a standalone java se application.
I was reading chapter 10 in the reference documentation and saw the recommended approach to use transactions in this environment is to use the...
Still no answers to this? Is anyone else using Spring/JPA in a Java SE environment? What are your experiences?
I think for completeness this is a good resource to add to this thread.
http://blog.springsource.com/2009/12/02/obtaining-spring-3-artifacts-with-maven/
I have the same questions. It would be nice if someone had some answers.
I just finished reading chapter 3 "The IoC container."
There is an example in section 3.11.2 that states:
My question is: following this example, how would a person invoke the prepare...
Here are some really helpful links on this subject for those of you who are in love with Maven.
http://maven.apache.org/plugins/maven-dependency-plugin/howto.html (Look at the bottom - How to use...
Hi,
I want to deploy my webapp to a godaddy hosted site.
Godaddy currently uses Tomcat 5.0.27. They have a restriction that the web application may not use log4j.
How would I go about...
This is a good question. I do this all the time. Here is an example from my code:
PersonService.java:
public interface PersonService extends GenericService<Person, Long>
{
public Person...
I had the hibernate.current_session_context_class=thread but I needed:
<prop key="hibernate.current_session_context_class">org.springframework.orm.hibernate3.SpringSessionContext</prop>
I'm not sure about the other dude's problem, but I just found the solution to mine.
I had the hibernate.current_session_context_class=thread but I needed:
<prop...
I see this is an old post so I suppose you have this working by now. If not, try this:
<!--Support for Annotated Transactions - Short and sweet!-->
<tx:annotation-driven...
I'm having the same problem. I see this was posted in 2007 but no one has replied. Any advice on this?
Your code is producing a NullPointerException because you are trying to access the partnerService without initializing it.
If you are using Spring Injection to set the partnerService in your test...
spring configuration:
<bean id="emailAction" class="your.package.action.EmailAction" scope="prototype">
<property name="emailService" ref="emailService"/>
</bean>
...
I found out after doing more research that the load method doesn't really load the object from the database. Instead it automatically returns a proxy object. Load assumes the object has already been...
Marten,
Thank you. You've been most helpful. I did know that load only returns an object that exists, but I did not know that it will not initially attempt to hit the database.
The information...
My object does exist. It's in the database. I can load it with the second method that I showed in the original post. It always throws the LazyInitializationException if I try to load it with the...
You seem to imply that I haven't already researched this matter. I've already read both "Java Persistence with Hibernate" and "Spring in Action" and tried to find the solution in them. I am aware of...
Hello World!
I have a problem that I've been stuck on for a few days now. The problem is probably a simple fix for all you guru's out there!
I wrote a generic DAO and most of the methods work...
I'm writing a generic dao similar to http://www.ibm.com/developerworks/java/library/j-genericdao.html. Its not exactly the same but pretty close.
My implementation of the generic dao will insert...
I've found several places that say to use
<%@ taglib uri="..." prefix="tiles"%>
This stupid forum wont let me put the url in the uri attribute because I haven't posted 15 times in this forum....
Hi Everyone,
I've been trying to get Tiles 2 to work with my application for a while now but I'm running into problems. My application currently works fine if I leave tiles out of it. The problem...