spring

Spring question about @ManagedResource annotation for JMX

I would like to find out what the properties of the org.springframework.ManagedResource annotation do as seen in this JavaDoc. I want to understand each param so I can set it to the proper value. If anyone knows where to find more info, I would appreciate it. http://static.springframework.org/spring/docs/2.5.x/api/org/springframework/...

AOP problem running Spring unit tests

I have a Spring web application which is configured to use JDK proxying for AOP. The AOP annotations (such as @Transactional) are declared on the interfaces, rather than the implementation classes. The application itself works fine, but when I run the unit tests, it seems to be attempting to use CGLIB for the AOP functionality (instead ...

spring bean configuration

Hi, I want to specify a file system path as part of a Spring bean configuration. I know that I can set a path such as: <bean id="myBean" class="com.example.BeanImpl"> <property name="path" value="/WEB-INF/jsp"/> </bean> An the path /WEB-INF/jsp is interpreted as being relative to the web application root. But how do I specify a pat...

Unable to start Camel 1.5.0

Hi, I'm trying to run the Camel Example "camel-example-spring-jms" (also at http://activemq.apache.org/camel/tutorial-jmsremoting.html). However, when I try to start Camel using "org.apache.camel.spring.Main" class, I get the error saying "Configuration problem: Unable to locate Spring NamespaceHandler for XML schema namespace [http://...

Spring MVC

i have a SimpleFormController, the doSubmit() is doing nothing but populating a command object(call it bar, a simple POJO, and it have a field, say id). So, the successView is being called. the successView is "redirect:/foo.html", and the bean def for foo.html is: i have this bean mapped to a simple jsp, called foo.jsp. the jsp come...

method-invoking Spring bean

Hi, I've declared the following bean in my Spring config <bean id="templateCacheClearingTask" class="org.springframework.scheduling.timer.ScheduledTimerTask"> <property name="delay" value="5000" /> <property name="period" value="5000" /> <property name="timerTask"> <bean class="org.springframework.scheduling.timer....

Struts and Spring together?

I am pretty new to both Struts and Spring. I need to know how to access a Spring Service in a Struts ActionForm. Even a pointer in the right direction would be appreciated. ...

Persistent Quartz Jobs in Spring

Has anybody had any experience configuring the Spring Framework to use Quartz' persistent jobs feature ? ...

Spring-WS: how to use WebserviceTemplate with pre-generated SOAP-envelope

Can you use a Spring-WS WebserviceTemplate for calling a webservice and avoid that it generates a SOAP-envelope? That is, the message already contains an SOAP-Envelope and I don't want that the WebserviceTemplate wraps another one around it. :-) The reason I want this is that I'd like to call a webservice that uses ws-security and do no...

Unit testing with Spring Security

My company has been evaluating Spring MVC to determine if we should use it in one of our next projects. So far I love what I've seen, and right now I'm taking a look at the Spring Security module to determine if it's something we can/should use. Our security requirements are pretty basic; a user just needs to be able to provide a usern...

App Servers vs. Spring

Hi, first of all: that might be a newbie question. However after few searches I cannot find anything that would bring me further. Basically what would be the reasons to choose an app server over a Spring framework to develop a medium complex web application? I am fairly new to Spring, did some hard core WebSphere for few years. While r...

In Spring/JSP, where should formatting be performed?

I'm using Spring, but this question applies to all JSP-controller type designs. The JSP page references data (using tags) which is populated by the corresponding controller. My question is, where is the appropriate place to perform formatting, in JSP or the controller? So far I've been preparing the data by formatting it in my controll...

Spring, Hibernate & JPA: Calling persist on entitymanager does not seem to commit to database

I'm trying to setup Spring using Hibernate and JPA, but when trying to persist an object, nothing seems to be added to the database. Am using the following: <bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource"> <property name="url" value="${jdbc.url}"/> <property name="driverClassName" value="${jdbc.driverClass...

How to Debug Spring NoSuchBeanDefinitionException

We have a (non-web app) Spring application that throws a NoSuchBeanDefinitionException when running tests on our CruiseControl continuous integration linux box. The test runs fine on Windows in Eclipse. The exception is thrown on the getBean() method: ApplicationContext context = new ClassPathXmlApplicationContext(CONTEXT_FILE); MyBea...

Can Spring Webflow 2.0's entity manager commit from subflow states?

Hello. My team and I are currently starting up a project using Spring 2.5.6 and Spring Webflow 2.0 (JDK 1.4.2). We're in the design phase right now, and I would like to know whether or not Spring's Persistence context/entity manager (we're going to use Hibernate) can commit from subflows. The commit attribute is only available from th...

Spring WebFLow Handling Request in JSP

I am new bie to Spring Webflow, I have am using Custom FlowHandler I can able reach the respective Controller, by if set a attribute in a request Object i can't get it in JSP that is View state. How can I proceed in this? ...

Best Practice for Spring MVC form-backing object tree initialization

If I have a form-backing object that has a complicated object tree -- say a Person that has a Contact Info object that has an Address object that has a bunch of Strings -- it seems that the object needs to be fully populated with component objects before I can bind to it. So if I'm creating a new Person, I need to make sure it has all t...

Advantages/disadvantages of Glassfish v3 Prelude vs Springsource dm server for Web applications?

Both of these appservers are at least in part OSGI based. One (Glassfish) is obviously J2EE while the other isn't. Now I'm at the stage of choosing a platform for a new project and the natural choice is Glassfish v3 Prelude. This does raise the issue of perhaps we should be using S2AP instead. The question then is this: does the spri...

Benefits of using JSTL vs Velocity for view layer in MVC app?

I'm currently building a Spring MVC application. I was looking to use JSP pages with tag libraries for handling the view layer and formatting of the HTML, but I've come across another group in my company that uses Velocity templates for the same purpose. From what I can see, it seems to me as if there are a lot of similarities between t...

JSP-based Templating with Spring

I'm using Spring's MVC with JSP views. Every JSP page has similar structure - headers, content, footers, perhaps a sidebar, etc. Looking around for "best practices" people seem to "include" footers and headers, but that means that every JSP page includes these "include" statements, giving a fixed format. To my eye a better solution would...