spring

jboss shutdown not happening, stuck at message: Closing Spring root WebApplicationContext

2010-01-30 03:25:27,598 INFO [org.apache.catalina.core.ContainerBase] Closing WebApplicationContext of Spring FrameworkServlet 'expertx' 2010-01-30 03:25:27,696 INFO [org.apache.catalina.core.ContainerBase] Closing Spring root WebApplicationContext are the last few lines in my server log. looking for "Shutdown complete" to be posted i...

Java Spring remoting options

A little context: I would like to separate the Java application I'm writing into a more or less typical server-client model. I would provide a "server" which takes care of business logic and persistence, but write it in a very service oriented fashion. Any front-end code (GUI) would then call upon the server to provide the functionality ...

Correct usage Of LOG4J in Spring Framework Via DI

Hi I am trying to use Log4j as part of the Spring Framework, as far as i understand through the use of a an appropriate bean the system is supposed to map a singleton instance accessible in the code while mapping the logging depth automatically to the class Similar to the normal use of Log4J as in Logger log = Logger.getLogger(getCla...

How to use ExternalDirectory Resource

How to use External Directory to Store Images. And how i access that images thru my Web application ? I am using Jboss as an application Server. Web application is in Java,Jsp. Presently images stored in WAR file. After google i got the solution C:\jboss-4.0.0\server\default\deploy\jbossweb-tomcat55.sar\server.xml Then restart ...

JSF + Spring + JPA + Hibernate: keep entitymanager alive when rendering view?

Totally new to Spring & Java development but working on a project for a class with some experienced developers. I believe we're using Spring MVC as our web layer(but I'm a C# guy so I may be mistaken in that regard). We have a view that gets an object with lazily loaded properties -- pretty straightforward stuff. Yet when I call one o...

Should service layer classes be singletons?

I am using Java EE with Spring framework. Should my service classes be created as singletons? Can someone please explain why or why not? Thanks! ...

Spring-Hibernate DAO naming convention?

Is it typical to name DAOs in the following way: UserDAO - interface UserDAOImpl - implements UserDAO I am wondering if its standard to use the suffix 'Impl' for the implementation or if something more meaningful is the best practice. Thanks. ...

Maven archetype for integrating Struts 1 and Spring 2.5

Hi all, I have a project that integrates Struts 1 with Spring. I now wish to port it under Maven 2. I have searched for the proper maven archetype but can't seem to find a proper match. Any suggestions? Thanks! ...

Spring application context : access web.xml context-params ?

Greetings , Is there any way to get values from web.xml context-param into Spring context? For example I define the value in web.xml as : <context-param> <param-name>compass-index</param-name> <param-value>file:///home/compass/index</param-value> </context-param> And I want to assign that value to the bean-property as: <bean ....

Packaging a Spring managed Axis2 web service client

I've created a web service client using Axis2. I would like to package the client into a jar, so I can use it in several other projects. The client uses the Axis2 WS-Security module 'rampart'. This module, rampart.mar (not a typo!) has to be present on the Axis 'repository path', in a directory called 'modules'. The client also requires ...

on submit action

I am trying to call submit action from javascript using simpleFormController of Spring but action calling only handleRequest but its not calling the onsubmit action ...

Using Spring JDBC for Oracle Stored Procedure I get a ORA-02055 when SP throws ORA-20118

ORA-20118 is a custom exception from the stored procedure. The stored procedure runs just fine from PL-SQL developer, so the problem is in Spring. What I need to do is to get Spring to rollback the SP when it gets the ORA-20118 exception back from the SP. How do I do that? or maybe just get spring to correctly handle the 20118 code c...

Problem with JSON, Struts 2 and Ajax.

Hello, I have an apllication with Struts 2, Spring and I want to send JSON as a response to an Ajax request, but my server in not sending the JSON in the response. I have this base package: <package name="myApp-default" extends="struts-default"> <result-types> <result-type name="tiles" class="org.apache.struts2.views.tiles...

getting value from one controller to another controller

How can I get value from one controller to another controller using Spring framework ...

How can I read contents from Spring Messagesource within a Enum?

I have an Enum containing three different Status types. These statuses should be displayed in an email sent to users, and the strings containing the statuses to be displayed are stored in messages.properties (read using an implementation of Spring class org.springframework.context.MessageSource). This works well in a normal Spring contro...

Spring DefaultMessageListenerContainer, ActiveMQ and message redelivery

Hi, if I use the DefaultMessageListenerContainer of Spring to recieve JMS messages, I don't get JMS messages redelivered, even if I set sessionAcknowledgeMode to 2. In case of a RuntimeException within the onMessage() of my JavaBean, the message is not acknowledged within the JMS provider (ActiveMQ), it stays as pending in the queue. B...

spring hibernate.createSQLQuery return as custom entity

after did Query query =hibernate.createSQLQuery("select abc,def from table"); Is it possible to auto "parse" the result to "pojo" list? so that i can do below List<CustomPOJO> abc = query.list(); //CustomPOJO is pojo not entity , no @Entity tag ...

Can spring transactions unsynchronize a synchronized method?

My colleague and I have a web application that uses Spring 3.0.0 and JPA (hibernate 3.5.0-Beta2) on Tomcat inside MyEclipse. One of the data structures is a tree. Just for fun, we tried stress-testing the "insert node" operation with JMeter, and found a concurrency problem. Hibernate reports finding two entities with the same private key...

Jackrabbit Observation with Spring

Hi All, I am new to observation, although the repository supports observation, onEvent() is never invocked. Here're the details: I created a Param class, and it's just a POJO with setters and getters hasing properties that each represents a parameter for: ObservationManager.addEventListener() I careted an interface XListener that e...

Jersey w/ Spring 3.0?

I see some are using Jersey w/ Spring. With Spring 3.0 there are now annotations available to make RESTful APIs directly in a controller. Why should I consider using Jersey w/ Spring? ...