spring

What's your "best practice" for the first Java EE Spring project?

I'm currently trying to get into the Java EE development with the Spring framework. As I'm new to Spring, it is hard to imaging how a good running project should start off. Do you have any best practices, tipps or major DO NOTs for a starter? How did you start with Spring - big project or small tutorial-like applications? Which technolo...

What OSS project should I look at if I need to do Spring friendly WorkFlow?

We need to add WorkFlow to our Spring managed application. Does anyone have any useful experience in using any of the myriad of OSS Work Flow solutions? Which one is best? Which one integrates with Spring best? Which ones should we avoid? ...

What's the best way to get started with OSGI?

What makes a module/service/bit of application functionality a particularly good candidate for an OSGi module? I'm interested in using OSGi in my applications. We're a Java shop and we use Spring pretty extensively, so I'm leaning toward using Spring Dynamic Modules for OSGi(tm) Service Platforms. I'm looking for a good way to incorpor...

Template Engines for Spring Framework

I've taken quite a shine to the Spring Framework and would like to get into it a bit more. I have noticed that aside from plain vanilla JSPs there are various template engines for use with Spring MVC, such as Velocity and Freemarker. Are there others? Which one do you recommend? ...

How do you use WebServiceMessageDrivenBean in Spring-WS?

How do you use the the org.springframework.ws.transport.jms.WebServiceMessageDrivenBean class from the Java Spring Framework - Spring-WS project? There is very little documentation or examples available on the web. ...

Aspectj doesn't catch all events in spring framework?

My project is based on spring framework 2.5.4. And I try to add aspects for some controllers (I use aspectj 1.5.3). I've enabled auto-proxy in application-servlet.xml, just pasted these lines to the end of the xml file: <aop:aspectj-autoproxy /> <bean id="auditLogProcessor" class="com.example.bg.web.utils.AuditLogProcessor" /> Create...

How do I return a 403 Forbidden in Spring MVC?

I want my controller to return the right HTTP response code when the user lacks permission to view a particular page. ...

Some Tomcat webapps not opening

Hi, I downloaded a couple of webapps and placed them in my /webapps folder. Some of them I could open by going to http://localhost:8080/app1 and it would open. However, some others I would do the exact same thing and go to http://localhost:8080/app2 and it will display "HTTP Status 404 - /app2/", even though I am sure it is there. I've...

Validation framework for business app built on Spring 2.5

Hi, What could the best strategy for writing validation layer for mid-enterprise level business application built on Spring 2.5 I know that Spring provides facility where we can implement Validator interface and write validation logic in validate method. But this will be restricted to only web requests coming through spring controller....

How do I create a spring bean for a Java double primitive?

I'd like to create a spring bean that holds the value of a double. Something like: <bean id="doubleValue" value="3.7"/> ...

Accessing a bean with a dot(.) in its ID

In a flow definition, I am trying to access a bean that has a dot in its ID (example: <evaluate expression="bus.MyServiceFacade.someAction()" /> However, it does not work. SWF tries to find a bean "bus" instead. Initially, I got over it by using a helper bean to load the required bean, but the solution is inelegant and uncomfortable. ...

How do I register a custom type converter in Spring?

I need to pass a UUID instance via http request parameter. Spring needs a custom type converter (from String) to be registered. How do I register one? ...

Should I use EJB3 or Spring for my business layer?

My team is developing a new service oriented product with a web front-end. In discussions about what technologies we will use we have settled on running a JBoss application server, and Flex frontend (with possible desktop deployment using Adobe AIR), and web services to interface the client and server. We've reached an impasse when it ...

Map of Enums and dependency injection in Spring 2.5

Let's assume we've got the following Java code: public class Maintainer { private Map<Enum, List<Listener>> map; public Maintainer() { this.map = new java.util.ConcurrentHashMap<Enum, List<Listener>>(); } public void addListener( Listener listener, Enum eventType ) { List<Listener> listeners; if( ( listen...

JPA Multiple Transaction Managers

i have one applicationContext.xml file, and it has two org.springframework.orm.jpa.JpaTransactionManager (each with its own persistence unit, different databases) configured in a Spring middleware custom application. i want to use annotation based transactions (@Transactional), to not mess around with TransactionStatus commit, save, and ...

Where can I find a good introductory tutorial for Spring?

I am a Java developer but up to now have not had any hands on experience using the Spring framework. Does anyone know of anyone good online tutorials that explain the basics and offer good examples and sample code. ...

How do you authenticate against an Active Directory server using Spring Security?

I'm writing a Spring web application that requires users to login. My company has an Active Directory server that I'd like to make use of for this purpose. However, I'm having trouble using Spring Security to connect to the server. I'm using Spring 2.5.5 and Spring Security 2.0.3, along with Java 1.6. If I change the LDAP URL to the ...

What is the best documentation for snapshots and flow repositories in Spring Web Flow?

I'm looking for more and better documentation about snapshots, flow repositories, and flow state serialization in Spring Web Flow. Available docs I've found seem pretty sparse. "Spring in Action" doesn't talk about this. The Spring Web Flow Reference Manual does mention a couple flags here: http://static.springframework.org/spring-we...

Best resources to prepare for the "Spring Framework Certification"

Hi there I want to do the Spring Framework Certification (2.5), but there aren't many good resources to prepare for the exam. For the Sun certifications there are a lot of books and trainers (Enthuware / Whizlabs) but not for the Spring certification. Has somebody done the 2.5 exam already? What was your first impression? How did you p...

How do you maintain java webapps in different staging environments?

You might have a set of properties that is used on the developer machine, which varies from developer to developer, another set for a staging environment, and yet another for the production environment. In a Spring application you may also have beans that you want to load in a local environment but not in a production environment, and ...