spring

Spring Injecting into Struts RequestProcessor

I wrote a custom Struts RequsetProcessor for my application that is manually fetching some references from Spring. It is working just fine, but I would like to do the "right" thing and inject everything I need at construction time. Is there a way to define a custom Struts RequestProcessor in a way that I can inject Spring objects into ...

Spring Open JPA

Hi, I am trying to integrate Spring and OpenJpa. For every scenario the exception thrown is SAXParseException: No Content allowed in Prolog. I am aware that the issue is probably related to the xml files but all the related xmls are read and validated correctly. The spring files are parsed correctly and beans are created but the en...

What is the simplest solution to integrate 2 apps within a Tomcat server?

I'm new to this and is looking at Apache Camel, Spring Integration and even Terracotta. I'm looking at sharing of common data like user/groups/account/permission and common business data like inventory/product details/etc. Any example will be really appreciated. ...

Can I use Spring roo in existing project that doesn't use Maven?

Spring Roo can be use in existing projects that follow standard maven layout. So far this appears to mean that projects that doesn't use maven are out of luck. I am wondering what (if any) are the options for such existing projects. Re-arrange the project layout to conform to Maven layout? This appears to be very difficult path for ...

testing hibernate parent/child relationship

hello good fellas! i use spring and hibernate for my data access layer i'll like to have some guidance about how to construct my unit testing to test if hibernate is effectively insert in the child table(parent hibernate mapping has the cascade all on the set). For what i know i shouldn't mix dao's unit testing.So supposing the i'm testi...

Apache Ant JAR Task: not finding properties.

Hey guys, How exactly should I specify the location of all the properties files inside the ant manifest? My jar is not working because it can't find the log4j, Spring, etc properties. These files are all contained within a folder called "server-config" that sits at the same level as the source code, ie: META-INF com server-config ...

Can SpringMVC be configured to process all requests, but exclude static content directories?

If I map my spring application to process all incoming requests ('/*'), then requests for static content return 404's. For example, a request for "myhost.com/css/global.css" would return a 404, even though the resource exists as Spring intercepts the request. The alternative is to map SpringMVC to a subdirectory (for example '/home/'), ...

netbeans and Apache Derby Embedded + spring

Hello good fellas.I'm using netbeans 6.7 on windows.I've been using DerbyClient in my spring test project and i've successfully change the driverClassName from org.apache.derby.jdbc.ClientDriver to org.apache.derby.jdbc.EmbeddedDriver.I was formally browsing through the bd from the service tab of netbeans.Now that i've changed the conne...

Does Spring-MVC annotation based bean validation support for collection-based property ? (Spring-MVC)

Hi, I have a command class named Parent as follows: public class Parent { private List<Child> childList; // getters and setters } And a Child class according to public class Child { @NotBlank private String name; @NotBlank private String email; @NotBlank private Integer age; } In Spring valid...

Validating that all JDBC calls happen within a transaction

How can I validate that all JDBC access happens on an active transaction, i.e. java.sql.Connection.getAutoCommit() always return false? I'm using Spring for transaction management ( @Transactional ) and Hibernate for data access. Update: What happens is that some Hibernate access is performed without the service method being annotate...

Spring 2 Hibernate Annotation

Hi Gurus, I am setting up Hibernate Annotation (User JPA for mapping) with Spring. (i.e. AnnotationSessionFactoryBean) I have a few questions Do I need a hibernate.cfg.xml for mapping? From the example http://www.zabada.com/tutorials/hibernate-and-jpa-with-spring-example.php, it seems you need to do AOP, do you really need that? I sa...

CAS Single Sign Out requests being ignored by JSP+Spring

I've set up CAS for single sign on with my Spring+JSP webapp, but now I've found out that single sign out isn't actually logging me out of the applications. I've confirmed that if I go to the CAS logout page, I do receive a SAMLP logout request from CAS. When I go back to a secured page in the app, however, I get in without logging back ...

Two approaches of task distribution in a multi tier application

I am working on a large web application in Java using Spring and Hibernate as the persistence solution. And as for the methodology, we're on Scrum. My role is that of a Scrum Master. I am also the one managing the business requirements and overall direction of the application. While dividing the requested features into tasks, we have tw...

Spring Annotation-based controllers not working if it is inside jar file

Hi, I've some annotation-based controller inside a sub module. These modules are deployed as jar files. The annotation-based controllers from the jar file is not getting loaded to the spring configuration. I'm manually exporting the jar file using the export utility in eclipse. Did any one faced this problem? ...

jdo integration with spring..?

is it a must to use kodo jdo if want to integrate with spring? from my understanding kodo is not free. any free implementation of jdo with spring? any such demo come with source code? ...

Spring JDBC connection pool and InputStream results

I am writing a webservice that allows users to post files and then retrieve them at a URL (basically think of it as the RESTful Amazon S3). The issue I came across was rather then return a byte[] from my Oracle query (Spring JDBC) I am returning an InputStream and then streaming the data back to the client in chunks. This (IMO) is a mu...

What's the most AGILE APPROACH to validate Spring-MVC command (speeds up validation implementation on server side) ? (Spring-MVC)

Hi, I am starting a new Spring-MVC project. Validation is a important feature in any project. This way, i have seen many approachs as follows: Spring Validator interface It sounds like a Struts 1.x validation. In my opinion, it is not agile. Commons Validator I think it is better than Validator interface Annotation based bean ...

ConstraintViolationException VS DataIntegrityViolationException

I am writing a Spring app, and it seems that when I run into database errors, sometimes Hibernate's ConstraintViolationException is thrown and sometimes Spring's DataIntegrityViolationException is thrown. Is there a reason one might be thrown and not the other? Do they mean different things? ...

Design patterns that every developer must know?

What are the design patterns that every developer must know? I'm interested in the context of Java web developers working with Spring & Hibernate. I have often heard that good knowledge in design patterns is essential for working with those frameworks. Can anyone list the specifics? For example, I know that understanding abstract facto...

Spring Datasource and Database Schema

Hi I am trying to declare a Spring datasource pointing to a DB2 database. Presently I am using a org.springframework.jdbc.datasource.DriverManagerDataSource to setup the connection but am not finding any way to specify the database schema in the database in the datasource bean. Could anyone help me on this? ...