When you have only one session per request (OpenSessionInViewFilter default), if you modify an object before you start in a transaction, even if you don't touch it during the transaction it will be...
Type: Posts; User: ronaldtm; Keyword(s):
When you have only one session per request (OpenSessionInViewFilter default), if you modify an object before you start in a transaction, even if you don't touch it during the transaction it will be...
How can I write a service that returns lots of XML data (not binary attachments)?
Axiom uses Stax, that should write directly to the output stream, but holds it all in memory before flushing.
...
I was just trying to follow Spring's philosophy :)
(oh, well, how Rod'd do this?...) :P
Hum... you could create a proxy, maybe. It would ask the ApplicationContext for the actual bean, and do all error handling logic. It could even delegate to a 'fallback' bean, that returns the last...
Did you tried to make the bean scope not 'singleton' (say, 'prototype') with lazy-init=true? I think that only singleton beans are loaded at start time. But then, you'd have to inject the...
I'll definitely try it asap! Thank you, Mark!
Ah, the baselib.BaseDao class is from a jar in WEB-INF/lib
The app is simple: springapp.SpringappController is injected with springapp.SpringappDao that extends baselib.BaseDao. The controller is...
Oops, I've reproduced the problem using BEA's jrockit-R27.2.0-jdk1.6.0 (I got the setup wrong earlier!).
SEVERE: Context initialization failed...
At work, I run Tomcat in Netbeans, on Ubutu 'Feisty' Linux and JRockit VM 1.6, and the problem arises.
I tested it at home, and couldn't reproduce it either. Here I use Windows XP with both Sun's...
I developed the idea a little more, and made a bean that keeps monitoring a file and fire events when it gets changed/created/deleted, in a more general manner:
refresh/ActiveFileMonitorBean.java...
This bean may do what you want. I haven't tested it much, so I'm not sure how robust it is. But, there it goes:
import java.io.File;
import java.util.Timer;
import java.util.TimerTask;
import...
I kind of 'solved' the issue changing the class org.springframework.core.typefilter.AbstractTypeHierarchyTraversingFilter:
private boolean match(String className) {
try {
return...
I had the same problem!
Well, it seems that Stripes does classpath scanning, using the ServletContext, and trying to cast the ClassLoader to URLClassLoader.
That Spring-unrelated...
http://opensource.atlassian.com/projects/spring/browse/SPR-3173
Ah, without the "tx:annotation-driven" tag, the exception is not thrown.
Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'test' defined in class path resource [applicationContext.xml]: Initialization of...
I reproduced the bug this way:
public class BaseService<T> {
public java.util.List<T> findByExample(T example, Object... params) {
return new java.util.ArrayList<T>();
}
}
...
I have the exact same problem. Is there any workaround for this?
eh? How do you propagate transactions to clients (swing apps, for example) when you do remote calls?
The problem is not how to resolve the class, but how to integrate it to the container. Is there some way to add a new autowiring strategy ("byConvention"?)? I have to write a whole new implementation...
The code below does work as a bean factory, but how can I use it in an application context (in conjunction to a XmlWebApplicationContext to be more precise)?
public class ConventionBeanFactory...
It's still in the 'proof of concept' stage, I just want to know if it will work somehow!
But I'm thinking about using regex (oro- or ant-style) to decide if a bean should be auto-resolved or not....
I'd like to declare something like this:
Call this:
ApplictationContext ctx = AutoResolvingApplicationFactory("appCtx.xml");
ShoppingService service = (ShoppingService)...
One thing I would like is annotations to indicate a required dependency. The BeanFactory could then use it to verify dependencies when loading the XML, rether than the bean to throw a NPE when trying...