spring

ThreadPooler in Spring 2.5.6

My application uses Spring 2.5.6. I have a service that creates explicit threads for some specific task. Triggering of this service call happens through quartz time scheduler. Question : While executing service calls, i want to use some sort of thread pooler that can return me thread instances. Is there any implementations that i can...

Change default polymorphism in Hibernate

Hi, I'd like to set polymorphism="explicit" property to several hibernate mapping classes. is it possible to override the default implicit value, so that I do not need to set explicit in multiple classes? <class name="xxxxx" table="XXXXX" polymorphism="explicit"> I am using hibernate mapping xml files (No annotations or JPA) and it w...

How to read and upload a xls file using spring framework.

Hi I have an xls file for eg. (abc.xls) how can i read and upload this file using spring. Can you help me with some sites where i can get some information on this. Thank you. ...

Spring MVC, forward

Is there any difference between public class Controller1 extends AbstractController { @Override protected ModelAndView handleRequestInternal(HttpServletRequest request, HttpServletResponse response) throws Exception { return new AnotherController().handleRequest(request, response); } } and @Controller...

Spring MVC 3 - How come @ResponseBody method renders a JSTLView?

I have mapped one of my method in one Controller to return JSON object by @ResponseBody. @RequestMapping("/{module}/get/{docId}") public @ResponseBody Map<String, ? extends Object> get(@PathVariable String module, @PathVariable String docId) { Criteria criteria = new Criteria("_id", docId); return genericDAO.getUniqueEnt...

Dynamic Cocoon Block list

Hi, I have a Cocoon 2.2 based application which uses blocks for different tasks and one block for shared pipeline fragments. All blocks are mounted within an Cocoon webapp. Now I would like to have an block which generates an overview of all other mounted blocks. I probably will have to use Java code - which is fine - but I am kinda los...

Custom property editors do not work for request parameters in Spring MVC?

Hello, I'm trying to create a multiaction web controller using Spring annotations. This controller will be responsible for adding and removing user profiles and preparing reference data for the jsp page. @Controller public class ManageProfilesController { @InitBinder public void initBinder(WebDataBinder binder) { binde...

Import system properties to maven plugin's Spring context

Hi All, I have in-house developed maven plugin(lets call it A) which uses spring IOC container and a maven project(call it B) that uses this plugin. I want to specify particular plugin configuration in B's pom.xml, so this property will be accessed in plugin's spring context I expect something like this, pom.xml (project B) <plugin>...

Is there Commons AnnotationUtils like library? (Java)

I can't find a general utilities (static methods) library for querying for annotations other than either using the annotations api directly and writing my own or using Springs: Springs Annotation Utils Normally I would not mind using Springs but its a rather big dependency just for dealing with annotations. Maybe Commons Lang will ha...

Does grails use spring's MVC front controller or it has its open implementation?

Does grails use spring's MVC front controller or it has its open implementation? ...

Spring configuration of C3P0 with Hibernate?

I have a Spring/JPA application with Hibernate as the JPA provider. I've configured a C3P0 data source in Spring via: <bean id="myJdbcDataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource" destroy-method="close"> <!-- Connection properties --> <property name="driverClass" value="$DS{database.class}" /> <property name=...

Class 'org.springframework.http.converter.ResourceHttpMessageConverter' not found - how to correct?

Eclipse STS is reporting I have problem with my spring project. It's a fresh project generated from the Spring Web MVC Project Template (File->New->Spring Template Project->Spring Web MVC ). When I create the project it has no problems - it's only once I modify the pom (by adding the hibernate dependencies) that STS then picks up the...

How to redirect to the same view using ModelAndview in Spring MVC framework

I have a page with a link. On clicking the link a page opens up in a separate window. This new page has a form. On submitting this form, some operation takes place at the server. The result of which needs to be redirected to the same page. However after the operation on using the following: return new ModelAndView("newUser"); //Thi...

Remote EJB lookup issue with WebSphere 6.1

I've seen this question asked before, but I've tried various solutions proposed, to no avail. Essentially, I have two EJB enterprise applications, that need to communicate with one another. The first is a web application, the second is a search server - they are located on different development servers, not in the same node, cell, or JV...

ETag in Spring (ShallowEtagHeaderFilter)

Hi guys, I've followed http://static.springsource.org/spring/docs/3.0.2.RELEASE/spring-framework-reference/html/mvc.html#mvc-etag and put ShallowEtagHeaderFilter in my web.xml like this: <filter> <filter-name>etagFilter</filter-name> <filter-class>org.springframework.web.filter.ShallowEtagHeaderFilter</filter-class> </filter> ...

How do I connect StaticListableBeanFactory with ClassPathXmlApplicationContext?

In the setup of my test cases, I have this code: ApplicationContext context = new ClassPathXmlApplicationContext( "spring/common.xml" ); StaticListableBeanFactory testBeanFactory = new StaticListableBeanFactory(); How do I connect the two in such a way that tests can register beans in the testBeanFactory during...

How to keep an Hibernate's Session open until the page is rendered

I'm having the following problem: I'm using Oracle ADF for the view and controller of my app. With OpenSessionInViewFilter, I intercept the request and open an Hibernate's Session, and it is closed as soon as the bean's method finishes. What I need is to keep the Session opened until the page is rendered, because in my JSP y use the ...

Class ConfigurableObject not found when using Spring in a JBoss 5 SAR

I'm packaging a couple JMX MBeans inside a JBoss SAR file. However, when I try to introduce Spring (3.0.2.RELEASE) into the project by marking the class as @Configurable and one of the dependencies as @Autowired, I get the following error during deployment: java.lang.ClassNotFoundException: org.springframework.beans.factory.aspectj.Con...

Spring, JPA, Hibernate, Jetty 7 Integration

Have anyone successfully run any spring and JPA application in jetty 7? I am getting following exception. This application throws no error in jetty 6. INFO [main] org.eclipse.jetty.util.log - Logging to org.slf4j.impl.Log4jLoggerAdapter(org.eclipse.jetty.util.log) via org.eclipse.jetty.util.log.Slf4jLog INFO [main] org.eclipse.jetty.uti...

Using Spring as a JPA Container

Hi, I found this article which talks about using Spring as a JPA container: http://java.sys-con.com/node/366275 I have never used Spring before this and am trying to make this work and hope someone can help me. In the article it states that you need to annotate a Spring bean with @Transactional and methods/fields with @PersistenceCon...