spring

Unable to re-use HSQLDB in Jetty between restarts

I'm using the maven-jetty-plugin to run a Spring application. Initially the datasource was declared inside Spring. Due to external constratins, I've moved it to JNDI. The jetty-env.xml section I use for local development is: <New id="dataSource" class="org.mortbay.jetty.plus.naming.Resource"> <Arg></Arg> <Arg>jdbc/DataSource</Arg> <A...

Is there a usable standards-compliant (168/286) portlet testing framework? (especially one that works with Spring PortletMVC)

I've not seen anything in this area I would recommend to a client. If you've used Spring PortletMVC, how did you test it? It's easy to test under the level of portlet code, and relatively easy to test on the client side through HtmlUnit, Selenium and the like, but I haven't seen anything that is a "Gray Box" test in the spirit of JSFUn...

Eclipse: How to convert a web project into an AspectJ project and weave and run it using the AJDT plug in?

What I want to do: I want to use the @Configured annotation with Spring. It requires AspectJ to be enabled. I thought that using the AJDT plugin for compile time weaving would solve this problem. Before installing the plug in the dependencies which were supposed to be injected into my @Configured object remained null. What I have don...

Accessing domain classes or spring beans from camel routes in Grails

I have a camel route file which I want to populate/configure based on certain database records accessed through Grails domain classes. However, I cannot seem to access the domain classes (or anything in the spring context) from MyRoute.groovy. Any ideas on how I can make that possible? I tried the recommendations at http://stackoverflow...

multiple security:custom-authentication-provider

In applicationContext.xml, it is valid to defined mmultiple security:custom-authentication-provider ? for example <bean id="dummyAuthenticationProvider" class="com.user.sample.gwtspring.server.security.JDBCDummyAuthenticationProvider"> <security:custom-authentication-provider /> </bean> <bean id="dummyAut...

Maven 2 assembly plugin clobbers some META-INF files

Hi, I'm using the Maven 2 assembly plug-in to build a jar-with-dependencies and make an executable JAR file. My assembly includes Spring, and the CXF library. CXF includes copies of META-INF files spring.schemas and spring.handlers which end up clobbering the similar files from the spring-2.5.4 jar. By hand, I can update those two file...

SocketException in ActiveMQ when exiting listener application

Hi, I am currently setting up a Tomcat Server that is running an embedded ActiveMQ broker. I'm using Spring to configure JMS. I wrote a test application to listen to topics and when I exit the test application the ActiveMQ broker throws a SocketException. Here is the exception: 2009-06-09 13:12:48,005 DEBUG Transport:229 - Transpor...

Spring Transaction Management Test

I want to test my Dao Class using the SpringContextTests. In my method class I extended the AbstractTransactionalJUnit4SpringContextTests in order for my test class to integrate with JUnit4. I have also set up the configurations and made the initialization and database clean up in the @Before and tearDown in the @After. My test class wor...

Unable to get Mapping in Spring 2.56 for REST style urls to work.

I am trying to develop a REST style application with Spring but the url mapping is not working as I expected. in web.xml I have <servlet-mapping> <servlet-name>UrlParsing</servlet-name> <url-pattern>/device/</url-pattern> </servlet-mapping> in NetTRaceHQ-servlet.xml I have <bean name="urlMapping" class="org.spr...

Performance overhead for Hibernate and Spring due to reflection.

Spring and Hibernate uses reflection for bean creation (in case of spring) and POJO mapping (in case of Hibernate). Does it negatively impacts on performance ? Because reflection is slower compare to direct object creation. ...

Usage of SoapActionEndpointMapping in Spring-ws

Hi all. I'm trying to create a WS based on a WSDL that defines one Request and one Response. The incoming request should be mapped to an endpoint depending on the SOAPAction defined in the SOAP message. To achieve this I'm trying to use the SoapActionEndpointMapping in my servlet.xml config file and define the mappings, as described in t...

programmatically create a spring context

Does anyone know if there any way that I can programmatically create a bean context? I want to be able to do something like: ConfigurableApplicationContext c = new ConfigurableApplicationContext(); BeanDefinition bd = new BeanDefinition(); bd.setId("id"); bd.setClassName("classname"); bd.setProperty("propertyName", propertyValue"); ......

Does it make sense to have more than one MethodSecurityInterceptor bean?

Can two MethodSecurityInterceptor beans be defined as follows? <beans> <bean id="moduleOneMethodSecurity" class="org.acegisecurity.intercept.method.aopalliance.MethodSecurityInterceptor"> <property name="accessDecisionManager"><ref bean="serviceAccessDecisionManager"/></property> <property name="authenticationMa...

No Runnable methods Error From Base Test class

I have a A few base test classes that setup common configurations for spring,logging,jndi etc using test execution listeners that are then inherited by subclasses. This is done so tests can just run code without having to worry about getting jndi and logging services in place before being able to run testing code. Using intellij and inv...

Accessing HttpServletRequest from AOP advice in Spring 2.5 with annotations

Hi All, I have tried to find the answer to this question on both the Spring forum and by searching StackOverflow. I have found a lot of pages describing horrible architectures and asking for about the same thing as I do, but my intended usage is different so please bear with me :-) I have a Spring 2.5 project using annotation based for...

Has anyone successfully created a project using Tapestry, Hibernate and Spring for jax-ws web services?

I have a project using these technologies and I'm getting a number of issues. The first is this error:- org.apache.tapestry5.ioc.internal.util.TapestryException: Exception constructing service 'ValueEncoderSource': Error invoking service builder method org.apache.tapestry5.services.TapestryModule.buildValueEncoderSource(Map, Invalidatio...

spring authentication provider VS authentication processing filter

both spring authentication provider and authentication processing filter also need to register with authenticationManager? authentication provider i can use custom-authentication-provider tag but what is different spring authentication provider and authentication processing filter ? ...

Managing complexity in a dependency-injected app with a large number of beans

I'm working on an Spring application which has a large number of beans - in the hundreds - and it's getting quite cumbersome to use and document. I'm interested in any experience you have with DI-enabled apps with a large number of beans which would aid maintainability, documentation and general usage. Although the application is Sprin...

How do I use custom roles/authorities in Spring Security?

While migrating a legacy application to spring security I got the following exception: org.springframework.beans.factory.BeanCreationException: Error creating bean with name '_filterChainProxy': Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '_fil...

BeforeClass using Spring transactional tests

I'm using the Spring transactional test classes to do unit testing of my DAO code. What I want to do is create my database once, before all the tests run. I have a @BeforeClass annotated method but that runs before Spring loads up the application context and configures the jdbcTemplate, thus I don't actually have a connection to the DB ...