spring

Roles/Priviledges in a Spring/Hibernate application

Hi, In a banking or similar application there are usually several roles defined and associated privileges required (for example a normal user could only do transactions but not post it while a supervisor can verify and post them, sort of maker/checker). We also need to add new roles and privileges in the system (not sure about the latte...

Springframework 2.5 SimpleMessageListenerContainer message received callback?

I have been reading up on the SimpleMessageListenerContainer to ease the pain of subscribing to a topic asynchronously. However, I cannot find a way to trigger a callback or loop through the messages that the container has received. Can someone point me in the right direction (documentation, examples, etc)? ...

Anyone using Spring dm Server for critical corporate applications?

Just wondering if dm Server is running any large enterprise apps yet. My Big Company is reluctant to use it until other Big Companies do. ...

org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from class path resource

Hi I am developing a RIA application using SWING as client,Java WebStart JNLP and Spring on server side using HTTPInvoker. I am getting the below error message when I am trying to Launch & Run my application from JNLP. But if I run the same as java application it workes fine and communicate with server and fetch data using spring bean. ...

How well does static code analysis work with Spring and other abstractions?

I'm in a situation where I'm required to make at least some effort to remove never-used code from my source code. The general preference is to use a static code analysis tool. We've had great luck with this in other projects, but the folks I hear from are mostly C/C++ developers working on device level code. I'm a web developer work...

Can i put 3 different authentication schemes in same spring security configuration ?

Hi, My requirement is to provide: Userid password based authentication. Open id based authentication Url based authentication (its a custom sso impl we have) in the same project. I have tried to plug in Spring security into an existing project as (code stripped down for simplicity): <?xml version="1.0" encoding="UTF-8"?> <beans:be...

Flex Cairngorm Spring Blazeds - Remoting Error - help me please....

Hi all, I seem to be getting the following error when I try to access a Remote Java class (on Spring/BlazeDS) from the Flex/Cairngorm application. I am going crazy at the moment trying to see what is wrong - any help would be greatly appreciated - thanks Mike. **Error: C0007E: RemoteObject not found for mycomponentsService at Remote...

Why is the Spring/Flex/BlazeDS Messaging service-adapter not called?

I have attached a service-adapter to a spring message-destination as follows: <flex:message-destination id="secured-chat" send-security-constraint="trusted" subtopic-separator="." service-adapter="secured-chatAdapter" allow-subtopics="true" /> The init methods are called during the bean's initialization, and I...

Jasypt not working with Spring configuration

I am trying to use Jasypt to decrypt the password in my JDBC configuration file. I am using Java 6 with Spring 2.5.6. I am using the Spring examples here to guide me: http://www.jasypt.org/encrypting-configuration.html. I can't get this tool to decrypt the password. What am I doing wrong? Here is what I executed to encrypt the password:...

spring + ibatis problem

I am getting No SqlMapClient specified error I have spring-for-ibatis.xml that has the following <bean id="MySqlMapClient" class="org.springframework.orm.ibatis.SqlMapClientFactoryBean"> <property name="configLocation" value="classpath:sql-map-config-oracle.xml"/> <property name="dataSource" ref="IbatisDataSourceOracle"/> </bean> ...

no SqlMapClientTemplate specified spring + ibatis

I have the following line of code in my DAO which gives error No SqlMapClient specified getSqlMapClientTemplate().queryForList("someNameSpace.procedureIdName", parm); My class is extending SqlMapClientDaoSupport I noticed in the api there is a setSqlMapClientTemplate method which takes sqlmapclienttemplate as the parameter, however, ...

why does a return statement inside a try catch work with 'throws'

does not work (Compilation error: missing return statement) public SqlMapClientTemplate getSqlTempl() throws UivException, SQLException{ try { SqlMapClient scl = (SqlMapClient) ApplicationInitializer.getApplicationContext().getBean("MySqlMapClient"); DataSource dsc = (DataSource) ServiceLocator.getInstance().getDataS...

Spring SimpleUrlHandlerMapping not allowing routing for any html page

I'm trying to implement a file upload in my Spring application based on the Spring documentation. However, when I add the SimpleUrlHandlerMapping reference, I can't even route to my login page. In my web.xml, I have all .htm files mapped to my servlet: <servlet-mapping> <servlet-name>myapp</servlet-name> <url-pattern>*.htm</url-...

Workflow engines that integrate easily/work well with Spring Web?

Hi, I have a Spring MVC web application that I need to introduce workflow into and was wondering if anyone had recommendations on existing products that would integrate well/easily with Spring. The steps (if that's the term) in any given workflow may or may not involve user interaction - so you could imagine kicking off something like ...

Testing SOAP endpoint through junit throws SAXParseException (soapenv:Envelope)

Hi all, I've try to implement integration tests for a working application (spring, hibernate, soap, cxf). I build an SOAP-XML by hand and handle it to my endpoint. Like this: private Source createRequest(String domainName, String email, String userId, String password) { String content = ""; content += "<soapenv:Envelope xmlns:s...

Problem with AnnotationSessionFactoryBean

I use the following configuration for initiating my SessionFactory: <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p" xsi:schemaLocation="http://www.springframework.org/...

Spring - Aspect is not getting applied at runtime

I have the following configuration: @Aspect public class MyAspect { @Around(@annotation(SomeAnnotation)) public Object myMethod(ProceedingJoinPoint joinPoint) throws Throwable { System.out.println("Hello..."); } } And have the following beans definitions: <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xs...

How can I Convert XML to an Object using Spring 3.0 mvc while making RESTful request

Hi, I'm using the Spring 3.0 RC1 framework and I'm currently testing out Spring mvc. I wanted to use Spring mvc to handle restful requests. I have set up my controller to handle the URI request. I am passing in xml with the request. So on the controller I have a method like follows: public void request(RequestObject request) { d...

Spring - Best approach to provide specific error messages in a validator from a DAO?

What is the best way to implement a validator in Spring that accesses a DAO object but needs to return different error messages based on the DAO error? Should the DAO method throw different exceptions that the validator turns into proper error messages? Should the DAO return an enumeration so the validator can handle each return type s...

Getting an application context

Is there a way to get an ApplicationContext from contexts in the file system and the class path all at once? rather than using FileSystemXmlApplicationContext and then ClassPathXmlApplicationContext and passing the fileSystemApplicationContext as the parent? ...