spring

GWT hosted mode not working with Spring + Eclipse + GWT Eclipse plugin

I've been trying to get GWT working with Spring for a while now. Is there anyone who is using official Eclipse GWT plugin with Spring, and who has managed to get hosted mode working with that combination? I'm using GWTController to initialize GWT through dispatcher-servlet.xml. Since my WEB-INF is not in war, but in WebContent folder, I...

Problem with spring quartz

Hello all, I'm trying to invoke method based on some interval time, here are some beans inside applicationContext.xml <bean id="MngtTarget" class="com.management.engine.Implementation" abstract="false" lazy-init="true" autowire="default" dependency-check="default"> <bean id="jobDetail" class="org.springframework.scheduling.qua...

Spring @Transactional read-only propagation

I'm experimenting with using the command pattern to allow my web layer to work with Hibernate entities within the context of a single transaction (thus avoiding lazy loading exceptions). I am, however, confused now with how I should deal with transactions. My commands call service layer methods that are annotated with @Transactional ann...

Hibernate takes 10 mins to throw exception when database is down

I am running Spring + hibernate 3 + c3p0. Upon start up, if the database is down an exception is thrown after about 10 mins. Until then the program is blocked... I dont include spring xml, hibernate configuration etc, since it is a fairly common problem and if a solution exists it must be a standard straighforward way. If not i can trim ...

Ajax Chatting - JMS

Is there a decent open source spring-JMS (or else) messaging project? Objective: to be used on a website for a facebook-like chatting functionality ...

AccessControlException when using Spring Security with OpenID

Hello, I try to implement Spring Security with OpenID in Google App Engine but I am getting a 'java.security.AccessControlException: access denied' for the RequestURI /j_spring_openid_security_chec It is working fine if I use '-D--enable_all_permissions=true' as VM Argument. Any ideas? Thanks, Ralph ...

Hibernate Exception

Hi, I am trying to load some info from the database asynchronously. I have a class A that has a relation One to One with ClassB. What I do, is getting count of class A in the database then load limited number of class A So Hibernate runs 3 queries: first to get count, second to get class A, third to load class B, mapped in class A. I...

Using @PostConstruct annotation in Spring 3.0.0.RC1

I am using @PostConstruct annotation (to mark init method in a bean) in Spring version 3.0.0.RC1. I start this web application in Jetty and get the following exception: java.lang.NoSuchMethodError: org.springframework.core.OrderComparator.sort(Ljava/util/List;)V at org.springframework.context.support.AbstractApplicationContext.invok...

In Java/Spring, how do you setup the hashmap to append the query string?

in spring-config/applicationContext-mapping.xml: I have this code fragment: <bean id="unused-url-quick" class="java.util.HashMap"> <constructor-arg> <map> <entry key="/page.html" value="/otherpage.html"/> ... </map> I can an add an entry key to redirect from one page to another. Using this same method...

How do I get the Session Object in Spring?

I am relatively new to Spring and Spring security. I was attempting to write a program where I needed to authenticate a user at the server end using Spring security, I came up with the following: public class CustomAuthenticationProvider extends AbstractUserDetailsAuthenticationProvider{ @Override protected void additionalAuth...

Is it possible to send more data in form based authentication in Spring?

I am relatively new to the Spring Framework and Spring security. I have used a custom authentication scheme, HTML: <form action="j_spring_security_check"> <input type="text" name="j_username" value="abc"/> <input type="text" name="j_password" value="abc"/> <input type="text" name="myCustom1" value="pqr"/> <!-- maybe type="h...

Using the same service & DAO from two threads

Hi guys, I've made a very simple REST controller method with Spring 3.0.0.RC1 that uses hibernate to perform a query. The query takes about ten seconds to complete. I've made this with intent so that I can fire up two requests to my controller. Then I fire up the two requests, and query in MySQL (my DB backend) "show full processlist",...

Is there any Spring-Security-based production-ready security package for Java?

I'm designing the security subsystem for a new product. The system requires the following: Complex user/group/permission model, both service-level and domain-level (ACL) Administration UI for the above Rules performed upon user actions (account disable on failed login, password complexity requirements, etc). Before going ahead and im...

TransactionProxyFactoryBean when switching from configuration-based Service beans to annotation based service beans

Hi guys, I read about using <context:component-scan base-package="tld.mydomain.business"> <context:include-filter type="annotation" expression="org.springframework.stereotype.Service"/> </context:component-scan> and annotate my service beans with @Service("myService"), and thought great, I'll do that, since I'm already doi...

Pass Url Parameter web flow

Hi.... I have this web application using Spring Web Flow framework. In my main page I have a default display of a list of employees. When I click a particular row I need to redirect to another page displaying a detailed view of the row. I was thinking of passing the "name" field in my row through URL parameter. Is this possible or can...

Transaction between several DAO layers ?

As shown below, I am accessing a Service layer method inside of another DAO. (Every DAO in the system is implemented using HibernateDAOSupport class) I wanted to rollback the transaction when #1 or #2 (commented in the following code) is failed. But when #2 throws an exception, #1 does not get rolled back and I can see the entries in th...

autocomplete text box

i want to make a text box like stackoverflow have for the tag at askquestion page where data pop up as we write something. I want to fetch the tag from the database rather local static data. In my project i am using jsp servlet hibernate and spring Please tell me how to do.. thanks in advance ...

Spring Transactions in diffrent DAOs does not work anyway?

Here is my implementation in summary 1) all DAOs implemented using HibernateDAO support/ @Transational annotation is only used in Service layer 2) Use MySQL / HibernateTransactionManager 3) Test using main(String args[]) method (do transactions work using this method? ) Transactions does not get rollbacked and invalid entried can be...

Transactional services => BeanNotOfRequiredTypeException, should be Advice, but is TransactionInterceptor

Hi guys, After following the great advice given in a thread about service beans I have made a Service that is listed under. I've tried putting @Transactional at the interface level, interface method level, class level and class method level. However I do it, I get org.springframework.beans.factory.BeanNotOfRequiredTypeException: Bean n...

Ensure that Spring Quartz job execution doesn't overlap

I have a Java program that executes from Spring Qquartz every 20 seconds. Sometimes it takes just few seconds to execute, but as data gets bigger I'm sure it run for 20 seconds or more. How can I prevent Quartz from firing/triggering the job while one instance is still being executed? Firing 2 jobs performing same operations on a databa...