I'm using JDBC (through Spring's JDBCTemplate) to access a small number of tables in a database. Although I haven't had anything happen yet, I'm concerned about the possibility of deadlock.
I was under the impression there was a way to specify a lock order for queries that access multiple tables for deadlock avoidance, but I don't know...
In my Spring application I'm using the SchedulerFactoryBean to integrate with Quartz. We're going to have clustered Tomcat instances, and thus I want to have a clustered Quartz environment, so that the same jobs don't run at the same time on different web servers.
To do this, my app-context.xml is as follows:
<bean class="org.springfra...
Hi,
I need to create a system oriented around Methods where providers can register for the Methods they handle and consumers can do two things (for now) - either get Metadata for a method or execute it. I'm considering creating a REST style architecture where methods are resources with unique URIs and an interface consisting of two meth...
How i can define one ApplicationContext as prototype spring bean in other application context. Also i need pass current context as parent to new application context.
Details:
I have Bean, that represent one user sessions in rich client application. This class manage lifetime of application context, and few other objects (like database ...
Hello world,
I have some problem running spring in my j2ee application.
Short introduction:
I use WebSphere 6.1 (i don't know that it is websphere specific or more general problem)
Artifacts:
web application (war) where in WEB-INF/lib folder maven publishes all needed spring dependencies.
war is then packaged in ear and deploys on ...
The spring framework documentation states:
In the unlikely case that a test may
'dirty' the application context,
requiring reloading - for example, by
changing a bean definition or the
state of an application object -
Spring's testing support provides
mechanisms to cause the test fixture
to reload the configurations and...
I'm trying to set a bean property like this:
<bean id="threadImport" class="com.foo.bat.util.ThreadImport" singleton="false">
<property name="mailSender" ref="mailSender"/>
<property name="parseConfFile" value="classpath:parse/import.xml" />
<property name="logFilename" value="/tmp/import.log" />
but none of files are found. Wha...
Hi,
I have a requirement to expose a webservice using CXF. I am following this easy tutorial link text and did the following steps
Created a service and an implementation with @WebService annotations
Added the standard xml snippet of including cxf.xml and other xmls specified
Now I need to deploy this webservice in multiple containers....
Let's say I have this method in my controller:
@RequestMapping(value="/home", method=RequestMethod.GET)
public void captcha(@RequestParam String someValue, HttpServletResponse response)
{
System.out.println(someValue);
}
Why does the result of this request:
http://something/home?someValue=testvalue123
return this?
testvalue12...
Hi guys. Here is the simple explanation of the problem:
I have a controller RedirectController so that I want to handle everything like http://mydomain/**
However, still I want need to redirect http://mydomain/ to index controller (or index.jspx whatever) and most probably I need to exclude /help /about URLs in the future.
The current...
I'm developing a web app with Spring and Hibernate and I was so obsessed by making he application thread safe and being able to support heavy load that based on my boss recommendation I end up writing my own session and a session container to implement a session per request pattern. Plus I have a lot of DAOs and me not willing to write t...
I am trying to use AOP to do some processing after an annotated controller. Everything is running with no errors, but the advice is not being executed.
Here is the controller code:
@Controller
public class HomeController {
@RequestMapping("/home.fo")
public String home(ModelMap model) {
model = new ModelMap();
...
So I'm trying to configure my web app without XML and go the all annotated route. I have a few classes annotated with @Configuration and @Component that are getting picked up automatically, but for some reason my @Controller annotations aren't being recognized and mapped to their corresponding @RequestMapping values.
My web.xml file loo...
Spring-ws 1.5.9 depends on Spring 2.5 (based on the pom). Can it be used with Spring 3 without running into any classloading issues. I know that some of the packages match between the two, can I just not include those Spring 3 jars? I cant seem to find any official word on this.
...
Hi there,
I'm a little bit stuck in a problem right now: I've got a JBoss Portal which runs on a JBoss AS 4.2.3. There are running some webapps on the machine which provide some portlets to users. Now I need a centralized solution:
Every time an user logs in I want to create a session bean where some user information is hold. I'm using...
I'm trying to set up a request-scoped bean in Spring.
I've successfully set it up so the bean is created once per request. Now, it needs to access the HttpServletRequest object.
Since the bean is created once per request, I figure the container can easily inject the request object in my bean. How can I do that ?
...
So I'm working through a bit of a problem, and some advice would be nice. First a little background, please excuse the length.
I am working on a management system that queries network devices via the TL1 protocol. For those unfamiliar with the protocol, the short answer is that is is a "human readable" language that communicates via a ...
I have a quartz job that needs to render a GSP, when I tried:
def g = new org.codehaus.groovy.grails.plugins.web.taglib.ApplicationTagLib()
def text = g.render(template: "/templates/myTemplate",
model: [language: language,
product: product])
I received the following exception:
org.quartz.JobExecutionExcept...
Hi All
When trying to get items from db, I got this error:
13:00:13.876 [7838526@qtp-204712603-0] ERROR o.h.LazyInitializationException - failed to lazily initialize a collection of role: bo.myobj, no session or session was closed
org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: de.myob.linke...
When trying to convert a JPA object that has a bi-directional association into JSON, I keep getting
org.codehaus.jackson.map.JsonMappingException: Infinite recursion (StackOverflowError)
All I found is this thread which basically concludes with recommending to avoid bi-directional associations. Does anyone have an idea for a workaro...