spring

Where can I get information of how to config spring?

There are so many versions of spring and spring dependencies,spring security.And all many articles in websites,but I never saw any article about how to config spring xml file. And I can't understand the following thing And cant fingure out how to match the folloiwng three parts of a spring project: 1.jar files 2.XML header,something l...

Looking for spring-hibernate3-2.0.8 sources

I'm looking for the sources jar of spring-hibernate3-2.0.8 Jarvana only has the details to the jar with the compiled classes http://jarvana.com/jarvana/archive-details/org/springframework/spring-hibernate3/2.0.8/spring-hibernate3-2.0.8.jar Any idea where I could find it? I also tried mvn dependency:sources, but it couldn't find the so...

Spring : Command object not getting populated

Hi, I have two controllers , a simple form controller and a multiaction controller. Now, in simpleformcontroller, i want to redirect a request to multiaction controller. Here's code snippet in simpleformcontroller protected ModelAndView onSubmit(HttpServletRequest request, HttpServletResponse response, Object command, BindException ...

Spring Transaction Annotations - Execute on Success

Hi, I'm using Spring application events within my service layer to notify the wider system when specific events occur. The issue I have is that the events are fired within a transactional context (I'm using Spring's @Transactional annotation). The danger is that I fire an event and then the transaction fails on commit (can happen when u...

how to create spring cas login link

I have Spring Security 3.0.3 with CAS. Some of my conf follows: <security:http entry-point-ref="casAuthenticationEntryPoint" auto-config="true" > <security:intercept-url pattern="/*/secure/**" access="ROLE_USER" /> <security:custom-filter position="CAS_FILTER" ref="casAuthenticationFilter" /> <security:anonymous enabled="fal...

Spring - using applicationContext.xml and XXXXX-servlet.xml

I am integrating Spring MVC into an existing project I have been working on. By integrating, I mean I am rewriting the project using Spring, and using much of my old code. I have already setup the environment and have began working on it. I will refer to this project as ProjectX. I have already setup and configured my ProjectX-servlet.x...

Spring and synchronization for part of the method

I have a manager as Spring wired bean. I believe every bean defined for spring by default is wired as singleton. I have some methods in this bean which I need to synchronize. How should I be doing that then -- void zzz() { synchronized (this) { ... } } or void zzz() { synchronized (MyClass.class) { ... } } ? ...

Spring security LDAP connection

Hello i am new to spring. I am trying to connect to ActiveDirectory from my server using Spring-security1.3.0 spring2.0.1. I am using the documentation example (18.4.5) I can see the the LdapAuthenticationProvider object is constructed at page load in the application-context.xml. few Questions: I wonder where and when will the answer f...

Spring-mvc 3.0 crud with checkboxes issue

I am doing an simple user crud. My ApplicationUser has the following properties: private Long id; private String password; private String username; private Collection<Authority> myAuthorities; private boolean isAccountNonExpired; private boolean isAccountNonLocked; private boolean isCredentialsNonExpired; private boolean isEnabled; A...

Spring MVC annotation preload form

I am a newbie to spring mvc annotations. Which is the best way to load data into a page that has say a string, list (list of country for a drop down) and some form elements like name and address I see two possible ways @ModelAttribute on a method - can be used for string, list, initialize the form elements Put the string, list into Mo...

junit test case transaction not getting committed - no errors

Hi, We have implemented JUnit4 in our application which uses Spring core & JPA with DB2. We need to test a full functionality which retrieves data from one database and merges into another database. Test case for retrieving the data from 1st database is written and it is running without any error perfectly but the records are not st...

Connection pool problem with Spring and programmatic transaction management

Hi everyone ! I need your help in order to solve connection pool problem with Spring. I’m using Spring with Java 1.4 (no annotation). Here is the datasource and the connection pool definition: <bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close"> <property name="driverClassName"> <...

spring ldap outofmemory unable to create new native thread

HTTP Status 500 - -------------------------------------------------------------------------------- type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception javax.servlet.ServletException: Filter execution threw an exception root cause java...

How can I call an Oracle stored procedure with JDBC/Spring where some of the parameter type are user defined?

I'm trying to call an Oracle stored procedure from my Java program. I'm using JDBC and Spring's StoredProcedure. A couple of the parameters are user defined types and I need to know how to pass them in. In particular what type should I specify in the parameter map (i.e. which of java.sql.Types.*)? And what Java type should I use? Th...

Disable validate on previous state

How to disable validate when go to previous state? <view-state id="step2State" view="q_step2" model="questionModel"> <binder> <binding property="abcDate" required="true" /> <binding property="defDate" required="true" /> </binder> <transition on="prev" to="step1State" /> <transition on="next" to="step3Action" /> </view-state> a...

Handling password confirmations on spring-mvc

I am doing an user crud in spring-mvc. My model has the following properties: private Long id; private String password; private String username; private Collection<Authority> myAuthorities; private boolean isAccountNonExpired; private boolean isAccountNonLocked; private boolean isCredentialsNonExpired; private boolean isEnabled; I so...

Crosscut concerns in middle of methods

it's convenient for AOP (e.g. AspectJ, SpringAOP) to deal with(advise on) crosscut concerns at pointcuts around methods below, "Sandwich" code methodA { crosscut code user code A crosscut code } methodB { crosscut code user code B crosscut code } Is AOP apt to crosscut concerns overlapped to user code below? ...

UrlBasedViewResolver and Apache Tiles2 in Spring 3

Hi people, I've got the following exception while trying to open the URL http://localhost:8080/app/clientes/agregar: javax.servlet.ServletException: Could not resolve view with name 'clientes/agregar' in servlet with name 'Spring MVC Dispatcher Servlet' My mvc-config.xml is the following: <mvc:annotation-driven /> <bean class="org.s...

What object type does Spring Hibernate Template execute method return for a counting query on Oracle?

When run against and Oracle database, what is the runtime type of the object that the following Spring Hibernate Template (Spring 2.5 and Hibernate 3.3.2GA) code returns where the SQL query is a counting query like select count(*) from table? String sql = "select count(*) from table"; BigDecimal count = (BigDecimal) hibernateTemplate....

Handling parameters from dynamic form for one-to-many relationships in grails

My main question here is dealing with the pramas map when having a one-to-many relationship managed within one dynamic form, as well as best practices for dealing with one-to-many when editing/updating a domain object through the dynamic form. The inputs for my questions are as follows. I have managed to hack away a form that allows me ...