spring

How to handle: Communication link failure

Hello, We're using Spring 2.5.4/Hibernate 3.2/Websphere Application Server 6.1.0.17. We've deployed the application on an AIX box. The next day when I come in, I try to log into the application. I get this exception on the page: Error 500: Request processing failed; nested exception is org.springframework.dao.DataAccessResourceFailu...

spring BeanIsAbstractException

im trying to load spring beans using XmlWebApplicationContext setConfigLocations method however i keep getting a BeanIsAbstractException I know that the bean is abstract, i have it configured this way, so Spring should know not to try instantiate im using Spring2.0.8.jar with jetspeed2.1. spring bean: <bean id="ThreadPool" abstrac...

Using spring to get your service layer - good idea?

Suppose I have service layer doing hibernate and DB stuff. Silverlight and windows clients need to get service layer through some kind of remote service. ASP.NET would benefit if could get it directly (on the same machine, same process, class instantiation). Is it a good idea to use spring or other tool to "get" your service layer throu...

The Spring AOP Proxy that isn't.

I have two Spring proxies set up: <bean id="simpleBean" class="org.springframework.aop.framework.ProxyFactoryBean"> <property name="target"> <ref local="simpleBeanTarget"/> </property> <property name="interceptorNames"> <list> <value>cacheInterceptor</value> </list> </property> </bea...

Injecting beans into a class outside the Spring managed context.

I'm an end-user of one of my company's products. It is not very suitable for integration into Spring, however I am able to get a handle on the context and retrieve the required bean by name. However, I would still like to know if it was possible to inject a bean into this class, even though the class is not managed by Spring itself. Cl...

lazily compile Jasper .jrxml to .jasper

Hi, I use Jasper reports with the JasperReportsMultiFormatView class provided by the Spring framework. This class takes care of compiling the source .jrxml files to their compiled .jasper format when the Spring application context is created. However, this compilation process is really slowing down the application startup time. Is it p...

How to inject a Jakarta enums in a Spring application context ?

I have a class which constructor takes a Jakarta enums. I'm trying to find how I can easily inject it via an Spring XML aplicationContext. For example : The enum : public class MyEnum extends org.apache.commons.lang.enums.Enum { public static final MyEnum MY_FIRST_VALUE = new MyEnum("MyFirstValue"); public static final MyEnum ...

Namespaces unmarshaling problem with Jaxb on Spring WS

Hi all, I am using JAXB1 (v1.0.6) for marshaling/unmarshaling on Spring WS 1.0.4 and JDK 1.4.2. Everything was working well until I have tried to add namespaces to the original XSD files from which I have generated java classes by JAXB, so that the system could accept requests with namespaces. Now, when I send a requst to my system, I...

inject property value into Spring bean

Hi, I have a bunch of Spring beans which are picked up from the classpath via annotations, e.g. @Repository("personDao") public class PersonDaoImpl extends AbstractDaoImpl implements PersonDao { // Implementation omitted } In the Spring XML file, there's a PropertyPlaceholderConfigurer defined: <bean id="propertyConfigurer" clas...

Spring bean with no id or name

I'm reviewing some Spring code, and I see a few bean defs that do not have an id or a name. The person who did it is not around to ask. The application is working fine. I am not familiar what this necessarily means. Anybody know if this means anything in particular? Thanks ...

How to use eclipse debugger to debug stacktrace of JSF core libraries?

Welcome I am extending some application written with Sprint and JSF. My work is partly writing xml config files. After some changes I got reports from library generators. Can I access with Eclipse debugger attached jars and fount what method throws error (and why) ? ...

Embed XML configuration directly in Spring application context

I have a Java object which is able to configure itself given an XML configuration description (it takes other descriptions as well, but I'm interested in the XML at the moment). I'm wondering if I can embed the XML description directly into a Spring application context description. I'm imagining something like: <bean id="myXMLConfigured...

What are some use cases for various DispatcherServlet.detectAllXxx flags?

In Spring Web MVC, the DispatcherServlet has a bunch of flags, such as detectAllHandlerMappings detectAllHandlerAdapters detectAllHandlerExceptionResolvers detectAllViewResolvers that allow you to choose between finding all type-matched beans on the app context and finding at most one, matched under a specific ID. They all default to t...

Spring <prop> tag

I have <bean id="dao" class="......"> <property name="foo"> <props> <prop key="me">Homer</prop> <props> <property> </bean> I want to use my current properties file, name-value pair, to change "Homer" I cannot figure it out... ...

Integrating Spring Webflow 2 and Apache Tiles

I've recently started upgrading some applications to use Spring Webflow 2, and I want to make use of the new Ajax functionality that comes with Webflow 2. Can somebody please direct me to a tutorial for integrating Tiles 2 with Spring Webflow (since that's apparently what they recommend). I've found the documentation that comes with We...

Implementing Rails' layout functionality with Apache Tiles

Has anybody tried duplicating Ruby on Rails' layout functionality with Apache Tiles 2 ? I'm trying to integrate Tiles 2 with Spring. I have a previously written custom view resolver for the Spring framework that does this quite nicely, but I'm upgrading to Spring Webflow 2 and I need to be able to integrate Tiles 2 ...

How can I set up an LDAP connection pool in a JEE Container?

I need to put an LDAP contextSource into my JEE container's JNDI tree so it can be used by applications inside the container. I'm using Spring-LDAP to perform queries against ORACLE OVD. For development, I simply set up the contextSource in the Spring xml configuration file. For production, however, I need to be able to use a JNDI looku...

.NET equivalent of modern Java web architecture

Almost every new Java-web-project is using a modern MVC-framework such as Struts or Spring MVC for the web tier, Spring for the "Service"/business-logic-layer and an ORM mapper such as Hibernate for persistence. What is the equivalent in .NET? I guess ASP.NET is used for the web tier and ADO.NET for persistence but what is the equivale...

Hibernate and Spring transactions - using private constructors/static factory methods

We have a Hibernate/Spring application that have the following Spring beans: <bean id="transactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager" /> <bean id="sessionFactory" class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean" /> When wiring the application together we get...

Making a Service Layer call from Presentation layer

I have to choose a technology to connect my Application/Presentation Layer (Java Based) with the Service Layer (Java Based). Basically looking up appropriate Spring Service from the Business Delegate Object. There are so many options out there that it is confusing me. Here are the options I've narrowed down to but not sure.. Spring RM...