spring

Spring Web Services: Redirect Web Service Request

I have different Spring Web Services, which are included into the context by the Endpoint Annotation, so there are no dependencies despite the Annotation (no interface etc.). Therefore, no "context" information is present. Now I want to chain a web service request, ie. an Endpoint is called which itself should call a web service on the...

Spring @Scheduled is executing task twice when using annotations

I have made task using Spring @Scheduled annotation, but for some reason it is executing task twice. My Spring Framework version is 3.0.2. @Service public class ReportService { @Scheduled(fixedDelay=1000 * 60 * 60* 24) @Transactional public void dailyReportTask() { ... code here ... } } Here is my XML: <...

Jax-ws, spring and SpringBeanAutowiringSupport

although in my @Webservice class I extend SpringBeanAutowiringSupport, autowiring simply does not work for Spring 2.5, tomcat6. nothing is injected. I tested those beans autowiring in main method, using classpathcontext, everything is injected fine. But not for jax-ws endpoint. do you have ideas? ...

What is the prerequisite when try to learn the spring or struts framework?

I think these technologies are really prior to java industry ...

executing stored procedure from Spring-Hibernate using Annotations

I'm trying to execute a simple stored procedure with Spring/Hibernate using Annotations. Here are my code snippets: DAO class: public class UserDAO extends HibernateDaoSupport { public List selectUsers(final String eid){ return (List) getHibernateTemplate().execute(new HibernateCallback() { p...

Dynamically select field names in a query with Spring JDBCTemplate

Hi, I have a problem with parameters replacing by Spring JdbcTemplate. I have this query : <bean id="fixQuery" class="java.lang.String"> <constructor-arg type="java.lang.String" value="select fa.id, fi.? from fix_ambulation fa left join fix_i18n fi on fa.translation_id = fi.id order by name...

JUnit test failing - complaining of missing data that was just inserted

I have an extremely odd problem in my JUnit tests that I just can't seem to nail down. I have a multi-module java webapp project with a fairly standard structure (DAO's, service clasess, etc...). Within this project I have a 'core' project which contains some abstracted setup code which inserts a test user along with the necessary item...

Is there a standard place to store Spring library jar files?

I've downloaded Spring 3.0.2 with dependencies and found that it contains 405 jar files. I usually keep third party libraries in a "lib" subdirectory, but there are so many Spring jars that it seems sensible to keep them separately so that they don't swamp the other libraries and to simplify version upgrades. I suspect that I want to ke...

using spring, hibernate and scala, is there a better way to load test data than dbunit?

Here are some things I really dislike about dbunit: 1) You cannot specify the exact ordering the inserts because dbunit likes to group your inserts by table name, and not by the order you define them in the XML file. This is a problem when you have records depending on other records in other tables, so you have to disable foreign key co...

Adjust threads used by the Spring container's task support

Is it possible to adjust the number of threads used by the Spring container's task support? ...

Spring - singleton problem - No bean named '....' found

Hey, I can't figure out what is wrong with this beans definition. I'm getting this error http://pastebin.com/ecn5SWLa . Especially the 14th log message is interesting. This is my app-context file http://pastebin.com/dreubpRY httpParams is a singleton which is set up in httpParamBean and then used by tsccManager and httpClient. The var...

Spring Security - is Role and ACL security overkill?

I have a 3 tier application that requires security authorizations be placed on various domain objects. Whether I use Spring's ACL implementation or roll my own, it seems to me that ACL based security can only be used to authorize (service) methods and cannot be used to authorize URL or web service invocations. I think this because ho...

would it be easy to wrap spring mvc with a scala functional style?

I like spring mvc's functionality, but i'd like to not use annotations and use a more functional style... something with currying and closures rather than method names and annotations. Would this be easily doable? ...

Java JMS Messaging

Hello, I have a working example of sending message to server and server receiving it via qpid messaging. Here is simple hello world to send to server : http://pastebin.com/M7mSECJn And here is server which receives requests and sends response(the current client doesn't receive response) : http://pastebin.com/2mEeuzrV Here is my prope...

EJB3 with Spring

I have understood that if I use EJB in Spring context, I get all the same benefits as if I was using it in "pure" EJB3 environment, is this true? I have googled but can't find a definitive, clear answer. For example, let's say I have a session bean that updates some tables in the database and it throws a System Exception. In "pure" EJB3...

Restful Path Parameters in Spring MVC 3

Is it possible to: set a URI template in the mvc:view-controller element of the *-servlet.xml file or in a controller method and then use/get that path parameter in a jsp? I understand that using @PathVariable in a controller method will give me access to the path parameter in that controller method. But how can I gain access to the pa...

Injecting Entitymanager via XML and not annnotations.

What I am trying to do is inject through XML almost the same way that is done through A @PersistenceContext annotation. I am in need of this because of the fact I have different entity managers I need to inject into the same DAO. The databases mirror one another and I would rather have 1 base class and for instances of that base class ...

How to get the set of beans that are to be created in Spring?

So here's the scenario: I have a Spring XML configuration with some lazy-beans, some not lazy-beans and some beans that depend on other beans. Eventually Spring will resolve all this so that only the beans that are meant to be created are created. The question: how can I programmatically tell what this set is? When I use context.getBe...

Generate Spring bean definition from a Java object

Let's suggest that I have a bean defined in Spring: <bean id="neatBean" class="com..." abstract="true">...</bean> Then we have many clients, each of which have slightly different configuration for their 'neatBean'. The old way we would do it was to have a new file for each client (e.g., clientX_NeatFeature.xml) that contained a bunch...

JRockit Mission Control does not capture Spring Bean methods invocations

Hi, I am trying to profile my Spring Web app running on WebLogic 9.2 JRockit Mission Control 4.0 works perfectly except it doesn't capture Spring Beans method invocations. Are there any tricks to make it work? ...