spring

spring+hibernate mapping class without xml

in my applicationContext.xml, this is how I map xml to POJO. how to map directory to class file without required to create xml? <bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean"> <property name="mappingResources"> <list> <value>com/custompackage/custom/spi/hibernate...

converting J2EE App from Sql to Oracle - suggestions with effecient approach

We have a J2EE app built on Struts2+spring+iBatis; not all DAO's use iBatis...some code still uses the old JDBC approach of interacting with Database. All our DAO's call Stored Procedures, we do not have any inline SQL. Since Oracle Stored Procedures return cursors, we have to drastically change our code. It is fairly easy for us to c...

Spring - How 'multiple' AOP behaviors to sevices are resolved?

Hello, I want to know that whether we can apply 'multiple' AOP behaviors to our service classes or not? Lets just say, i do this to my BankServiceImpl class: @Transactional on top of one of the method, accountTransfer(), and and some custom <aop> pointcut on the execution of another method someOtherMethod(). Then will Spring be able...

Spring: Getting FactoryBean object instead of FactoryBean.getObject()

Short question: If I have class that impelemnts FactoryBean interface, how can I get from FactoryBean object itself instead of FactoryBean.getObject()? Long question: I have to use 3-rd party Spring based library which is hardly use FactoryBean interface. Right now I always must configure 2 beans: <!-- Case 1--> <bean id="XYZ" class="F...

How does transaction propagation work when using Open Session In View?

I'm really confused about transaction propagation in Spring with Hibernate. I use Spring @Transactional annotations on my service layer methods. Some are marked as 'read-only=true'. If one of my read-only service methods calls a method that is not read-only, how can I deal with this? I'm thinking I can mark all my read-write methods to ...

Spring, iBatis, MySQL - how to manage transactions?

Hello I'm building a web application with spring ibatis and mysql. I'm going to use mysql stored procedures and I will call them with ibatis. My question is about how to manage the transactions. Should I manage the transactions inside the stored procedures or with spring/ibatis or with both? ...

Spring + Hibernate = Unknown entity

I'm trying to combine Spring with Hibernate using Annotations and I'm getting the following error: org.springframework.orm.hibernate3.HibernateSystemException : Unknown entity: entities.Bar; nested exception is org.hibernate.MappingException: Unknown entity: entities.Bar Here is my setup... My Entity: package entities; @Entity ...

Spring Transaction with Sybase

I am using Spring in my Web Application , with the underlying database as Sybase. I have 3 complex stored procedures to be executed. The procs , have create table and drop table commands to hold temporary result sets. The tables are created in the user db space , rather that in the tempdb space. Hence, I am faced with the need to ensu...

What is the difference between putting @Autowired to a variable and a method ?

Class A { private B instanceB; @Autowired public setInstanceB(B instanceB) { this.instanceB = instanceB; } } Above one versus this one. Class A { @Autowired private B instanceB; public setInstanceB(B instanceB) { this.instanceB = instanceB; } } Will the behavior differ based on the access modi...

Java Programming - Spring and JDBCTemplate - Use query, queryForList or queryForRowSet?

My Java (JDK6) project uses Spring and JDBCTemplate for all its database access. We recently upgraded from Spring 2.5 to Spring 3 (RC1). The project does not use an ORM like Hibernate nor EJB. If I need to read a bunch of records, and do some internal processing with them, it seems like there are several (overloaded) methods: query, que...

How to Pass hidden variable using displaytag

I am developing application using spring web mvc.. For displaying purpose i am using displaytag library.. Here is the code for that : <display:table uid="intf" name="${model.interfacesList}" id="interfacesList" pagesize="5"> <display:column property="id" title="ID" /> <display:column title="Name" property="name"/> <display:col...

Spring SimpleFormController - Including Search Form In Success View

UPDATE 1/31/10: Since this thread continues to get a lot of views...I am curious if it has been of help to anyone recently? Feel free to leave comments/feedback, thanks. I have a Spring form where I would like to reuse the search page to include the results under the search form. Currently when I do this I get the following error o...

Server Side Validation using Spring Web MVC validator class

Hello All... I am developing app using Spring Web MVC, Hibernate.. Now, i have my login page configuration like : <bean name="/uservalidate.htm" class="UserValidateFormController"> <property name="sessionForm" value="true"/> <property name="commandName" value="User"/> <property name="commandClass" value="User"/...

identity from sql insert via jdbctemplate

Is it possible to get the @@identity from the SQL insert on a Spring jdbc template call? If so, how? TIA ...

java.lang.NoClassDefFoundError: ProceedingJoinPoint

We have a number of web service client applications which interface between our main customer facing application and backend web services. These web service application generate their own JAXWS stub code to directly interface with the web services and implementation code to provide a clean interface between the JAXWS code and any applica...

How to inhibit start of WAR file within EAR file configuratively?

I have an ear file which contains 4 war files. The main reason we put those together is, that the order of startup is important, and it is easier from a deployment perspective (the customer only gets one file and does not have to worry about which versions works together). The ear files are going to be deployed on 4 different systems, w...

How to deploy a Spring Integration app in Tomcat?

I've gone through the "Spring Integration in 10 minutes" tutorial for setting up a basic Spring Integration application. I'd like to deploy this application in Tomcat and have the input channel live on the server and send the output back to a client, but I'm having a difficult time finding any examples of this. Could anyone provide m...

jsr 303 (hibernate validator 4) and spring 2.5.x

Hi, How can I configure my Spring 2.5.x application to utilize the JSR 303 validation (hibernate validator 4x) ? I'm using Maven, and update the version of hibernate validator to 4.x, though when my Spring HibernateDaoSupport saves a model thats annotated with constraints, even if the object fails the constraints, I don't get an excepti...

My Spring AOP not working

I need help making AOP work. What am I missing here? <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2...

Flex Java BlazeDS Dashboard - use Spring/JDBC or Hibernate ?

Hi, I am developing a IT Monitoring Dashboard for the company I work at. The system will primarily perform monitoring of files, databases and servers. There will be a small part of the system which will allow the users to configure static data about the system eg: file locations, server names etc... So as the app. will be a dashboard a ...