spring

Spring 3.0 JAX-WS and or vs. Apache CXF

Spring 3.0.1 has solid JAX-WS web services support. At the same time, I see that many articles refer to Apache CXF as a great web services framework. If I work in the Spring/Hibernate world and want to expose the high-performing web services to the front end, should I consider utilizing Apache CXF? Is there any advantage to adding this...

Grails: Declarative Transactions

class ExtHotelApiService extends HotelApiService { static scope = "singleton" static transactional = true def save(params) { params.hotels.each{ht-> try{ transactionalSave(ht) } catch(Exception e) { /* exceptions handling */ } } } @Transactional(readOnly = false, propagation = Propagation.REQUIRES_NEW, rollBack...

Upgrading to Spring 3.0.3.RELEASE - Where can I find a history of the jars?

I'm trying to upgrade an application that's using Spring 2.5.6 to the latest (3.0.3.RELEASE) version and I'm using the Spring repository to find the latest versions of the jars I need: http://www.springsource.com/repository/app/library/versiondetail?name=org.springframework.spring&version=3.0.3.RELEASE I'm at version 2.0.8 for sprin...

JAX-WS client without having to generate new proxies when switching between test/production

I'm trying to configure my JAX-WS Client to switch between test/production enpoint without having to re-generate proxy classes with wsimport. The service I'm trying to consume use different WSDL's in test and production. For example the targetNamespace is different, as well as the soapAction address. I've tried using Springs JaxWsPortP...

Validator + MVC + REST::problems with update

Hi! I'm trying build my application using REST and Spring MVC. For some entities I have special page for update. After data submit it validated. If there are no errors it's redirecting to view of this entity otherway to edit page. haw I must pass data (entity and validator result) between controllers? here implementation with some ve...

Spring form get password entered

hi my login.jsp i have j_username ,j_password, this will call my UserDetailsServiceImpl.loadUserByUsername(string username) , how to authenticate the password ? ...

Spring LDAP 1.3.0 clarify

I have this error, what does it mean? org.springframework.ldap.NameNotFoundException: [LDAP: error code 32 - 0000208D: NameErr: DSID-031001A8, problem 2001 (NO_OBJECT), data 0, best match of: '' ]; nested exception is javax.naming.NameNotFoundException: [LDAP: error code 32 - 0000208D: NameErr: DSID-031001A8, problem 2001 (NO_OBJECT...

Can spring container inject collaborators using custom methods?

Normally dependencies are injected via setters by the following configuration (http://static.springsource.org/sprin...beans-beanname) : <bean id="exampleBean" class="examples.ExampleBean"> <!-- setter injection using the nested <ref/> element --> <property name="beanOne"><ref bean="anotherExampleBean"/></property> <!-- sett...

How do you integrate Flex 3 with Spring 2.5

Can Spring 2.5 be used with Flex 3.x my original question was misleading ...

My @Around advice is not being called for all the methods in the package

Hi, I have this code below in my LoggingAspect class and i am expect this to run for my methods like gov.ssa.rome.service.impl.save() gov.ssa.rome.dao.impl.save() but it is running only one time no matter what. i don't know why. i have used autowire to wire dao to servcice layer. I really appreciate your help. what should i do to mak...

Autowiring a collection via the constructor with Spring

I have what seems to be a simple problem, as stated in the title. Here is the kind of class I have : public class Foo { @Autowired public Foo(@Qualifier("bar") Set<String> bar) { // ... } } Which I try to run with the following spring context : <context:annotation-config /> <util:set id="bar"> <value>tata</val...

JUnit tests pass in Eclipse but fail in Maven Surefire

I have written some JUnit tests using JUnit 4 and spring-test libraries. When I run the tests inside Eclipse then run fine and pass. But when I run them using Maven (during the build process), they fail giving a spring related error. I am not sure what is causing the problem, JUnit, Surefire or Spring. Here is my test code, spring config...

How to understand Open Source projects/libraries?

There are few open source projects/APIs/libraries that we use in our project (Spring, Struts, iBatis etc.) and I want to understand their design and how they work internally. What is the best way to understand these projects? Note that I am already using these libraries in my project. And I know the input-output interaction/configuratio...

spring 3 sub-bean validation

I try to validate via org.springframework.validation.Validator. My Problem: I have the a form-bean which has data beans. PlayerRegistrationDataBean -> has: PersonBean So how do I have to validate the PersonBean if I do not want to implement the validation everywhere I use PersonBeans as "sub-beans"? ...

How to pass Java Date object to dojo DateTextBox through Spring MVC and back to Java?

I wonder how can I pass a Java Date object from beans --> hibernate --> Spring MVC --> dojo and back to that Date object that would be stored in the database using hibernate. I have tried, in beans class, creating getter and setter that return/get String by parsing the value to dojo friendly format (yyyy-MM-dd). When the date from the d...

Using Spring in a portlet without Spring MVC

Hi Is there a way to develop portlets with spring without using the DispatcherPortlet? I want to use other technologies for the UI, mainly Vaadin. Spring is used for DI and other stuff. Is there something similar to ContextLoaderListener class in the Portlet side? ...

short and easy question on spring nested transactions

Hi, If I have the transactionable methods A,B,C and A calls B,C ; then, C throws exception that is not caught inside A. My question is if B will be rolled back or not? Please note that nested transactions are disabled by default so A, B, C are all transactionable by themselves. Thanks ...

No aop output using spring aop 2.0

Hello, I'm reading Spring in Action and I'm trying to set an aop example. package com.springinaction.chapter01.knight; import org.springframework.beans.factory.BeanFactory; import org.springframework.beans.factory.xml.XmlBeanFactory; import org.springframework.core.io.FileSystemResource; public class KnightApp ...

Spring oxm getting type cast error near catch statement

I am getting error near catch statement Error : required java.lang.Throwabe found org.springframework.oxm.XmlMappingException enter code here public void writeObjectToXml(Object object, String filename) throws IOException { FileOutputStream fos = null; try { fos = new FileOutputStream(filename); try { ...

How to programmatically create bean definition with injected properties?

I want to programmatically add a bean definition to an application context, but some properties of that definition are other beans from that context (I know their names). How can I do this so that those properties will be injected? For example: GenericBeanDefinition beanDef = new GenericBeanDefinition(); beanDef.setBeanClass(beanClass)...