I have a common User / Role setup, with a user_role join table. I'm trying to use Spring's HibernateTemplate to mass delete all locked users like this:
getHibernateTemplate().bulkUpdate("delete from User where locked=?", true);
If the user being deleted does not have any roles (no record in the user_role table), then everything goes f...
Spring's form controller (such as SimpleFormController or BaseCommandController) uses commands to pass data between the HTML form and controller. My question is, is it common practice to use the backing model as the command itself? Or is it common to create a separate command with correspond attributes to those in the backing model.
My ...
Can a Spring form command be a Map? I made my command a Map by extending HashMap and referenced the properties using the ['property'] notation but it didn't work.
Command:
public class MyCommand extends HashMap<String, Object> {
}
HTML form:
Name: <form:input path="['name']" />
Results in the error:
org.springframework.beans.NotR...
I read in a post to the Smack forum recently that
Starting daemon threads in a Java EE server is a big no no
Basically Smack's XMPPConnection starts one daemon thread to monitor incoming data
& another to send outgoing data from/to the jabber server respectively. Is it reasonable to use daemon threads to listen for write/reads in ...
Hi all,
I've been wrestling with this problem for a while, and don't see a solution. Hope anyone can help me.
I have a HibernateTransactionManager configured. However, I see the following message in the log file:
DEBUG [http-8080-1] AnnotationTransactionAttributeSource.getTransactionAttribute(107) | Adding transactional method [cashIn...
I'm considering using Spring to assemble the components of my application, but I've got a problem. Our application uses a configuration repository that is global to the VM, and is similar (but not precisely) to the system properties.
This configuration API is accessed like so:
Configuration.getDb ().get ("some_property_name")
Is the...
I have a multi-module (maven) spring build. All the modules publish some beans, and most also consume beans defined further down the dependency graph. Although most of it is annotation declared beans, almost every module also has one or two xml-declared beans.
Although we have a half-decent solution, but I am really wondering what is th...
Is there an Eclipse plugin or feature that allows previewing of JSP files? Ideally such a feature would be aware of Spring tags. It's a major pain to edit the JSP in Eclipse, then build and deploy to see the results.
...
Is there a way to write a Spring bean in XML so that it uses constructor injection when that constructor has a varargs parameter type? IE, is there a way to specify an array the way you can specify a list?
For instance:
class MyClass {
MyClass(String... args) {
// rest omitted
}
}
...
Hello guys,
Once more here I come with a question of s2, i'm a beginner at it and got some trouble finding examples.
I'm build a menu service wich depends upon a login, wich is give when the user enter at start page. Once the login has been made, I store the user object into the session by doing the follow:
@Override
public String int...
I have been searching the web, but can't find any good tutorials for getting started with JMS under Spring connecting to TIBCO EMS.
Anyone can point me to a good one?
...
What are the design patterns which used in Spring framework?
...
How far does the spring framework go with transaction handling? My reading of the book "Spring In Action" suggestions with its examples that you create DAO methods that don't worry about Session and Transaction management fairly simply by setting up a session factory and transaction template in XML and then wiring them into your DAO. Spr...
I have an independent study next semester and would like it to be something that applies to future job prospects. I've interned at a company for the passed several years that uses Spring, Hibernate, and ServiceMix. I'd like to learn these technologies during my independent study so I can hit the ground running if I get hired there. Does ...
I'm using Spring's SimpleFormController for form processing. In my case, the edit view (JSP) can vary depending on what's being edited. SimpleFormController's formView is a field (class variable) which means that it's shared by all threads that use the instance of it. Thus it's not safe (nor appropriate) to set the formView (via setFormV...
[Edit: Rethinking architecture along mvvm lines made this problem largely fall away - thanks @kent]
Using Spring.NET + WPF.
Load two WPF buttons in the config:
<object name="Button1" type="System.Windows.Controls.Button, PresentationFramework" >
<property name="Name" value="Next" />
<property name="Width" value="200"/>
<property...
I'm looking for a best way that is available for Java developers to implement REST services that will be communicating via JSON or XML. I'm looking for production-ready products.
I know that Spring 3.0 is coming, but it's not done yet - no luck.
Is Jersey the one?
My application is hosted by Tomcat, uses Spring, Jettison and XStream....
I've deployed Jersey on Tomcat and everything works perfectly (when I use the com.sun.jersey.spi.container.servlet.ServletContainer), but as soon as I change it to the com.sun.jersey.spi.spring.container.servlet.SpringServlet (according to all the tutorials I can find), I get a nasty exception:
Apr 19, 2009 5:07:35 PM org.apache.catalin...
Hi,
I'm using Spring AOP. I'm giving my pointcuts like:
@Pointcut("execution(* com.demo.Serviceable+.*(..))")
public void serviceMethodCalls() {
}
Is it possible to avoid the in-place pointcut expression in Spring AOP?
Thanks,
Veera.
...
Im getting a weird error when running my spring2.5.6,jpa(hibernate3.4) webapp in weblogic 10.3
[ERROR] Javassist Enhancement failed: com.xxx.domain.model.Scheme
java.lang.NoSuchMethodError: pcGetManagedFieldCount
at com.xxx.domain.model.Fund.<clinit>(Fund.java)
at sun.misc.Unsafe.ensureClassInitialized(Native Method)
...