spring

Handling redirected URL within Flex app?

We have a Flex client and a server that is using the Spring/Blazeds project. After the user logs in and is authenticated, the spring security layer sends a redirect to a new URL which is where our main application is located. However, within the flex client, I'm currently using HTTPService for the initial request and I get the redirect...

Spring to understand properties in YAML

Did Spring abandon YAML to use as an alternative to .properties / .xml because of: [Spring Developer]: ...YAML was considered, but we thought that counting whitespace significant was a support nightmare in the making... [reference from spring forum] I am confident YAML makes a lot of sense for properties, and I am using it currentl...

Spring - Transaction Readonly

Hello Gurus! Just wanted your expert opinions on declarative transaction management for Spring. Here is my setup - A. DAO Layer is Plain old JDBC using jdbcTemplete (No hibernate etc) B. Service Layer is POJO with declarative trasnactions as follows - save*, readonly=false, rollback for Throwable Things work fine with above setup. Howev...

How to change granted role temporarily to achieve "view the site as" someone else

Hi Gurus, We are using 2.x spring security right now. I am asked to build an admin tool so that the ROLE_ADMIN can change to any user in the site and view the site as that person (each person on the site may see different stuff depending on the role which is dynamically granted base on the database) and of course the admin should be abl...

using Spring JdbcTemplate for multiple database operations

I like the apparent simplicity of JdbcTemplate but am a little confused as to how it works. It appears that each operation (query() or update()) fetches a connection from a datasource and closes it. Beautiful, but how do you perform multiple SQL queries within the same connection? I might want to perform multiple operations in sequen...

view is not rendered when returning ModelAndView

Hi, I have the following problem. I need to export a PDF in a controller The code below, where I return a View, works as expected. @RequestMapping(method = RequestMethod.GET) public View exportReport( @RequestParam(value = "userName", required = true) String userName, @RequestParam(value = "startDate", req...

Transferring data from Salesforce using Apex Data Loader to Oracle

While attempting to transfer data from Salesforce using Apex Data Loader to Oracle Keep getting the following error: 26937 [databaseAccountExtract] FATAL com.salesforce.dataloader.dao.database.Data baseContext - Error getting value for SQL parameter: nkey__c. Please make sure that the value exists in the configuration file or is ...

DAO and Service layer in Spring: session management

Am I right in understanding the principles of DAO & Service layer interconnection? DAO performs extractions of base objects, say by id from a db. Service layer USES a DAO object and may invoke MORE THAN ONE METHOD of DAO in one function. So, Service layer has to: instantiate a DAO implementation object invoke as many methods of the DA...

How can you connect to a password protected MS Access Database from a Spring JdbcTemplate?

I need to connect to a password protected MS Access 2003 DB using the JDBC-ODBC bridge. I can't find out how to specify the password in the connect string, or even if that is the correct method of connecting. It would probably be relevant to mention that this is a Spring App which is accessing the database through a JdbcTemplate config...

Spring's JdbcDaoSupport (using MySQL Connector/J) fails after executing sql that adds FK

I am using Spring's JdbcDaoSupport class with a DriverManagerDataSource using the MySQL Connector/J 5.0 driver (driverClassName=com.mysql.jdbc.driver). allowMultiQueries is set to true in the url. My application is an in-house tool we recently developed that executes sql scripts in a directory one-by-one (allows us to re-create our sche...

Invalid XML in persistence.xml : Init method

I'm getting the following error when I try to startup my application on google app engine: Failed startup of context com.google.apphosting.utils.jetty.RuntimeAppEngineWebAppContext@8fcc7b{/,/base/data/home/apps/sales-tracker/3.340980411948080671} org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'cli...

How to pass SQLXML type to view in Spring MVC?

In my webapp controller I'm getting results from the db, which are of type java.sql.SQLXML. I want to pass it to the view to be returned verbatim (as XML). The problem is, the data associated with SQLXML is released as soon as I leave JdbcTemplate call. How then should I pass the data to the view using a model? ...

SPRING: What is AOP, Dependency Injection and Inversion Of Control in Simple English

I have tried to understand AOP, Dependency Injection and Inversion of Control SPRING related concepts but I am having hard time understanding it. Can anyone explain this in simple English ? ...

Spring Transitive Dependency Injection

if I inject a recursive dependency through a constructor, then it gives me an exception, while if I use setter it doesn't. Why is this? ...

Spring + Hessian on Tomcat

Hello. I have a task to write a web service with use of Hessian and Spring. Unfortunately there is not enough information so i can't make it work myself... Please can anyone write a simple Hello World for me? My version always shows 404 when accesing with browser... I'm new to java so if smb knows how to help tell me what files of my ...

Spring Custom Filter Problem?

greetings all,iam using spring security 3 and i want to perform some logic(saving some data in the session) when the user is visiting the site and he's remembered so i extended the GenericFilterBean class and performed the logic in the doFilter method then complete the filter chain by calling the chain.doFilter method,and then inserted t...

Spring MVC JSP Parameters

I'm looking to turn off try blocks for a specific JSP page (though turning it off globally would be OK as well). From what I've gathered, it looks something like this: <jsp-param> <param-name>noTryBlocks</param-name> <param-value>true</param-value> </jsp-param> However, everywhere I see that sample it's for a weblogic.xml file. Does a...

How to modularize a JSF/Facelets/Spring application with OSGi?

I'm working with very large JSF/Facelets applications which use Spring for DI/bean management. My applications have modular structure and I'm currently looking for approaches to standardize the modularization. My goal is to compose a web application from a number of modules (possibly depending on each other). Each module may contain the...

Spring rejecting bean name, no URL paths specified

I am trying to register an interceptor using a annotation-driven controller configuration. As far as I can tell, I've done everything correctly but when I try testing the interceptor nothing happens. After looking in the logs I found the following: 2010-04-04 20:06:18,231 DEBUG [main] support.AbstractAutowireCapableBeanFactory (Abstra...

Using Struts with SpringSource dm server gives Http Status 503 error

Hi, I developed an enterprise application using spring, struts and hibernate, now I want to transfer it to work with OSGi dm server. I found a book "Pro SpringSource dm server" where the author has explained a way to migrate WAR to OSGi bundles. I successfully migrated the application given in book. The first step of migration says th...