spring

Configuring Compass with Annotated Hibernate

I'm using Hibernate for a Java-based Web Application and want to add full-text search via Compass. Compass is supposed to support that, but fails to provide any useful Getting Started guide. I could figure out that I have to annotate my Entities with @Searchable and the various @SearchableXXX variations and accessing Compass in my servi...

Have you tried Spring Workflow already ?

Spring Workflow has now been published. Have you tried it yet? For what kind of scenario? What is your impression? How do you find it stacks up against other workflow libs? Found any good docs or tutorials? ...

Spring configuration error

My spring-context file is shown below. <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springframework.org/schema/aop" xmlns:jee="http://www.springframework.org/schema/jee" xmlns:jms="http://www.springframework.org/schema/jms" xmln...

What's the best way to share business object instances between Java web apps using JBoss and Spring?

We currently have a web application loading a Spring application context which instantiates a stack of business objects, DAO objects and Hibernate. We would like to share this stack with another web application, to avoid having multiple instances of the same objects. We have looked into several approaches; exposing the objects using JMX...

Which book would you recommend for entering into the J2EE world?

I was wondering if there are any books you would recommend for learning J2EE. I have done a lot of OO programming in the past (mainly java, C# and C++), but I'm now entering the world of J2EE with my job:: "struts 2, hibernate, spring, etc.." so many different libraries, plugins and ways to configure eclipse or netbeans... I feel a bit o...

Spring @Autowiring, how to use an object factory to choose implementation ?

I am trying to let a piece of runtime state decide WHICH implementation of an interface to use, preferably solely by autowiring. I have tried making an object factory for the interface thet uses dynamic proxies, and I used qualifiers to coerce the @Autowired injections to use the factory. The qualifiers are necessary because both the f...

How to learn Spring Framework fast?

Please recommend some good resources(especially must have books) about spring framework? ...

merge with hibernate causing error with dirty objects

I'm using Hibernate with Spring in my application. I have been consistently using detached objects and reattaching them whenever I need to make calls to the database. I'm using hibernate template to take care of managing the connections for me. My data structure is as follows: classA: <one-to-many name="classB" inverse="true" casca...

Real life business case for using spring method replacement?

Spring IoC container gives you an option of replacing a method of a bean. Can someone provide a real life example of using this feature to solve real life problem? I can see this used for adapting an old legacy code (w/o sources) to work with your app. But I think I would consider writing an adapter class using the legacy code directly ...

Finding out if LDAP user in Sun Directory Server 5.2 is locked out, in Java

I'm developing an application using Java, Tomcat, Spring Framework and Spring LDAP 1.2.1 for LDAP access. According to our LDAP administrator, it is not possible to find out programmatically, if a specific user is locked out in the directory - the user is just not returned. This makes life difficult for me, as I need to identify locked ...

Acegi Security: How do i add another GrantedAuthority to Authentication to anonymous user

i give users special URL with access key in it. users accessing the public page via this special url should be able to see some additional data as compared to simple anonymous user. i want to give some additional role to anonymous user based on parameters provided in request so i can do something like this in my template: <@sec.author...

How do I bind collection attributes to a form in Spring MVC

I'm trying to bind one of my model objects to the fields of a form, using Spring-MVC. Everything works fine, except that one of the attributes of the model object is an unordered collection. Doing something like <c:forEach items="${m.items}" var="i" varStatus="itemsRow"> <form:input path="items[${itemsRow.index}]"/> </c:fo...

How do I redirect to an ftp:// url with Spring Webflow?

I'm trying to use Spring WebFlow to redirect to a computed url to an ftp server, but in the ExternalRedirect code are the following lines: } else if (location.startsWith("http://") || location.startsWith("https://")) { sendRedirect(location, request, response); } else { sendServletRelativeRedirect(location, request, response); } Is ...

RMI server picking up an old ip address

I am seeing a strange problem: I have a linux machine, installed JDK1.6 on that machine, and some business went on, and some days later had to change the IP address of the machine. and now after some months... i am trying to get some spring application to work... and it seems the RMI Server is starting at my old ip address... 21:12...

Getting the caller to a Spring AOP Proxy

I'm searching for a way of developing a MethodInterceptor which prints the caller class. Is there any way of getting the caller object into the method interceptor? ...

Securing Remote Access over JMXMP with Spring Security

I am using Spring 2.5 and Java 1.6.0_7. I remote several JMX MBeans and have multiple clients invoking those MBeans remotely using JMXMP. I rely on JMX Notification listeners to push events out to multiple clients. I am trying to figure out how to secure remote access to those MBeans using Spring Security. I need to specify multiple le...

JAX-RPC, Spring web services, and UnsupportedOperationCallException

I have a JAX-RPC web service that I am attempting to consume using Spring. This is my first time using Spring to consume a web service, so right now I'm just trying to get it to integrate with the JAX-RPC web service as a test. The web service has several dozen operations in it, but for right now I only care about one. Here are the inte...

Java Not Converting String to Long Object Properly

We're using Spring/Hibernate on a Websphere Application Server for AIX. On my Windows machine, the problem doesn't occur--only when running off AIX. When a user logs in with an account number, if they prefix the '0' to their login ID, the application rejects the login. In the DB2 table, the column is of numeric type, and there shouldn...

Spring Integration as embedded alternative to standalone ESB

Hi All. Does anybody has an experience with Spring Integration project as embedded ESB? I'm highly interesting in such use cases as: Reading files from directory on schedule basis Getting data from JDBC data source Modularity and possibility to start/stop/redeploy module on the fly (e.g. one module can scan directory on schedule basi...

spring beans configuration

I'm using Spring's dependency injection but I'm running into difficulty loading a resource in my spring config file. The resource is an XML file and its in a jar file on my classpath. I try to access it as follows; <import resource="classpath:com/config/resources.xml" /> however I keep geting error; Failed to import bean definit...