spring

Groovy + JPA + Spring not working

I have the following java class: package domain; //imports @Entity public class User { @Id @GeneratedValue private long id; private String name; private String password; private String mail; //Getters, Setters and Constructors } When I change the file extension to .groovy, the application stops working. In ...

Using Spring + Hibernate Transactional cache in Tomcat?

It seems that Hibernate transactional cache mode requires the use of a JTA transaction manager. In an app server such as Glassfish, Weblogic, etc, Spring can use the JTA transaction manager. Tomcat does not have a JTA transaction manager. Is there one that people use in this scenario? Or do people just not use transactional cache mod...

org.hibernate.PropertyAccessException

I've set up an automated build using cruisecontrol, junit, canoo webtests, hibernate, spring, mySQL 5 on cent os 5. My cruise control build checks out my code builds, performs unit tests, produces a corbetura report, deploys the build to tomcat 6.0.16 and runs canoo webtests against it. In all other tomcat enviroments that I have drop...

Spring MVC JavaScript

In a Spring MVC app, what is the best approach for putting external JavaScript files in WEB-INF/ along with jsps? /WEB-INF/spring/foo.jsp which has an include of <script src="foo.js"></script>. I want foo.js in the WEB-INF/spring/ directory right beside the owning jsp? I've noticed Spring has a ResourceSerlvet, but I'm not sure i...

What is the problem with not using Spring

I am trying to understand Spring. I have read about it and done some tutorials. I kind of get the IoC paradigm and the fact that DI is its implementation in Spring. My question is this: What do you lose by not using Spring? I understand this is a big question and somewhat subjective. But if you could write a few dot points or give an ex...

Spring Connection Pooling

Can someone tell me or point me to a document/tutorial that explains the usage of Spring Connection Pool Datasource? ...

spring MVC sample web app

Hi, I'm looking for an example Spring MVC 2.5 web app that I can easily: Setup as a project in Eclipse Deploy to a local app server (using Ant/Maven) There are a couple of example applications included with the Spring distribution ('petclinic' and 'jpetstore'), but they don't provide any Eclipse project files (or a way to generate t...

Streaming Data through Spring JDBC, unknown length

I currently have an application that inserts byte[] into our DB through the use of Spring JDBC [SqlLobValue]. The problem is, this is not a scalable way to take in data, as the server is buffering all the data in memory before writing to the database. I would like to stream the data from the HttpServletRequest Inputstream, but all the ...

Terracotta - Cannot cast to com.tc.object.bytecode.TransparentAccess

I have a rather large spring application, and all I'm trying to share is a single Map (using util.ConcurrentMap as implementation). To do this, I created a bean in my appContext, and I tried to use the following tc-config line: */applicationContext.xml Must I do something else to enable this to work? MyClass is a rather s...

Hibernate: lazy-loading doesn't work on one-to-many mapping on set

Hi, I'm using Spring together with Hibernate for developing a Portlet for the Liferay portal server. I now have basically two entities, A and B, where A possibly contains many B's. So this goes to a one-to-many mapping between the two. <set cascade="all" lazy="true" name="comments" order-by="creationDate desc"> <key column="lfpn_pin...

Grails 1.0.4 with Acegi 0.4.1 upgraded to Grails 1.1 and Acegi 0.5.1 with problems!

Hi guys! I upgraded my Grails 1.0.4 application to 1.1. I also upgraded from acegi 0.4.1 to 0.5.1! I had some problems but i'm working on it and i think this is my last problem. When i start my grails application i get the following error message: loading security config ... ...

Threads in Spring

I have a Web application using spring and hibernate and struts (it runs on Tomcat) The call sequence is something like this... Struts action calls spring service bean which in turn calls Spring DAO bean. The DAO implementation is a Hibernate implementation. The question is Would all my spring beans be running in the same thread ? Can ...

noob project to learn Spring/Hibernate

I want to get my feet wet with Spring/Hibernate. But I think I move along faster and am more motivated if I am working with code rather than just reading a book chapter by chapter. Does anyone have any good ideas for a home project to work on to learn these technologies? Any exercises that you might have worked on and thought useful? O...

BOF at Spring One

What is BOF ? I can see lots of mentions of it but can not find a 'relevant' definition. Bill ...

Spring DatasourceTransaction Manager Problem

final DataSource ds = DataSourceLocator.getInstance() .getDataSource(sg.cmpl.starhub.lprs.Constants.APP_KEY); final DataSourceTransactionManager txManager = new DataSourceTransactionManager(); txManager.setDataSource(ds); final DefaultTransactionDefinition def = new DefaultTransactionDefinition(); def.setIsolationLevel(TransactionDe...

Keeping request parameters on Spring SimpleFormController with Validator

I hope I'll be able to explain this properly. I'm developing a portlet for Liferay by using Spring. It's a pinboard system. So I have a view (Jsp) which shows the detail of a certain pinboard entry, given its id. Furthermore there is a link which goes to an AddCommentController for adding a new comment to the pinboard entry the user is c...

Spring Integration: Hooking web services to a FIFO queue

I'm still struggling with Spring Integration- here's my scenario: A web service gets a request from client A web service puts the request onto a queue A queue consumer processes the messages FIFO and sends a response that gets routed back to the web service Web services sends response back to client A There will be multiple web servi...

How can I apply an aspect using annotations in Spring?

Update: I've found the Spring 2.x annotation-based Controllers are horrible for AOP security because you can't make assumptions about the method prototype due to the increased freedom in params and return values. Before 2.x you could intercept handleRequest and know the first param was an HttpServletRequest and the return value was a Mod...

step by step Sample JMS in Spring Framework

JMS using in spring, how to config and what type of dependency to use ...

How can I define multiple sessionfactory instances in Spring?

I would like to have multiple Hibernate SessionFactories in a spring application, all of them with identical configurations except for the DataSource. Ideally, I would acquire a particular SessionFactory by name. I need to be able to do this based on runtime state, and it isn't possible to determine which session factories I will need ...