spring

Cannot get bean from flowScope

Hi all, I have a problem with my bean saved in flowScope, it doesn't recognize it-i receive null in my service class function, what could be the problem? And I ask this because with other beans it works. I copy the code for the beans that would work and I saw that in the moment I change the name of the bean-instead of result="flowScope....

Which framework to choose?

Hello there, I was thinking which framework would be a good choice to go into. I'm focusing on java apps and tested spring, grails and seam so far. I've also looked aboard java and gave ruby on rails a try too. In future I will be focusing on portlet development which I've gone through already without a complete framework (just hiberna...

STS : Using JSF , Managed beans and Aspects

Main idea is to use JSF with Spring AOP for modularizing cross cutting concerns like logging. I am using STS (Spring tool suite) and have jsp page with jsf tags. These tags are reading data from a managed bean properties(getter). I have aspect configured for the getters. When i run application with Java/AspectJ getter is called and aspec...

Resource Bundle Spring

How can I access the messages from a resource bundle in Spring MVC inside a class that extends from AbstractController? I have tried getMessageSourceAccessor().getMessage("a.message"); but it it throws this Exception: org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.spring...

Spring integration with Struts 1 - injecting dependencies to the ActionForm

Hi all, We are expanding an old Struts 1 project to be Spring managed - yet we wish to change the code and the flow as little as possible. We have therefore decided to leave Struts to manage the requests and have delegated the actions via the org.springframework.web.struts.DelegatingActionProxy class. Example: The struts-config.xml co...

Add Principal/authority dynamically for anonymous user

Hi Guru, I am using spring security 2.x (+spring + struts2) and would like to enable add authority to user dynamically after user submits a form. I have a protected directory (/protected/dir/) which is protected by ROLE_USER <sec:intercept-url pattern="/protected/dir/**" access="ROLE_USER, ROLE_ADMIN" /> Which user can access after ...

Spring Faces Error faces:flow-builder-services

Hi. I have this java web app running on spring framework with web flow. I tried integrating it with spring faces but I get this error in my config file org.xml.sax.SAXParseException: The prefix "flow" for element "flow:flow-executor" is not bound. Here's the stack trace org.xml.sax.SAXParseException: The prefix "flow" for element "flo...

DWR + Spring - Multiple ajax filters not working

Hi, Is there a problem defining more than one DWR (v2.0.5) ajax filter in a Spring (v2.5.1) configuration file? For example: <bean id="..." class="..."> <dwr:remote javascript="..."> <dwr:filter class="foo1"/> <dwr:filter class="foo2"/> </dwr:remote> </bean> In my case the only filter getting called is foo2, ...

Hibernate One-to-one Mapping with interface.i need advice

hello good people i'm developping an application where all the pojos are exposed as interface but we map the real implementation class.we are using spring and JPA annotation.i'm about to test the one-to-one relationship and i'm having a light problem with the interface. Caused by: org.springframework.beans.factory.BeanCreationExcepti...

How to prevent JPA from rolling back transaction?

Methods invoked: 1. Struts Action 2. Service class method (annotated by @Transactional) 3. Xfire webservice call Everything including struts (DelegatingActionProxy) and transactions is configured with Spring. Persistence is done with JPA/Hibernate. Sometimes the webservice will throw an unchecked exception. I catch this exception a...

How to use temporary queues from BlazeDS (OR Spring-Flex)?

Is there a way to tie a BlazeDS Message Destination to a JMS Temporary queue? ...

How to develop a Desktop Application when you only know EJB3 JPA and JSF ?

Hello everyone ! For almost a year know, i developped applications in EJB3/JPA for persistence and business and Seam/JSF for presentation. I had an idea for a desktop app, but i don't know what to use. Using an embedded jboss would be the easy thing, because i don't have to change the way i code, but it's not realistic, and i don't th...

Is this Spring training useful?

We have a Spring + Ibatis based J2EE app. I planned to wrap around our DAO's (which call iBatis templates ...by getting spring beans) with test cases. I don't have much experience with JUnit so I thought that simply making an object of my DAO and then calling one of the methods will work. But wrong I was, turns out that the whole J2EE ...

how to integration test a DAO built with spring + iBatis

I asked a question, title of which might have been misleading so I'm going to try to ask the question again with much detailed stuff. (i know question seems long but please bear with me) What I'm trying to do: I simply want to write a test case for my DAO and make it work. I know my DAO's work fine inside the container (app server) but...

how to configure java.xml.transform.transformer in spring

How can i configure java.xml.transform.Transformer in spring framework ? I need instance of transformer to transform xml to text via xslt. Hence it is critical that the configured transformer should have knowledge of xslt stylesheet. I am not using this in a web project, rather i am using this in a standalone java program. ...

Dependency Injection: How to maintain multiple configurations?

Hi StackOverflow, Lets assume we've build a system with a DI framework which is working quite fine. This system currently uses JMS to "talk" with other systems not maintained by us. The majority of our customers like the JMS approach and uses it according to our specification. The component which does all the messaging is injected with ...

Timing quartz task execution duration

Is there a standard way of logging the time Quartz takes to execute a task? I'm open to Spring based solutions as well, as I'm using both. ...

Dependency Injection: Jetty 7

Hi StackOverflow! My application requires several interface implementations which require a Jetty server to do their job. This is, however, not necessarily the case in every implementations of those interfaces so the Jetty server is only a dependency. Since it would be a huge amount of pain to wrap the entire jetty server with all its ...

Database not dropped in between unit test

Hello good people i came accross a weird behaviour in my test.I'm using JPA hibernate annotation with spring. let say i have an Class MyObject and it's property email is marqued @Column(name="EMAIL", length=100, unique=true) private String email; i prepare for what i need to be in the database in the setup of this class MyObjectDAOImp...

is this possible to do with iBatis + spring

usual idiom of using ibatis with spring support is following. Or this is how I'm doing it. please let me know if it can be done a better way? beans xml: <bean id="DataSource" class="org.springframework.jndi.JndiObjectFactoryBean"> <property name="jndiName" value="jdbc/some/som1/my/mydb"/> </bean> <bean id="SqlMapClient" class="org...