spring

JPA @ManyToMany Writing On Create But Not Update

Hi gang, My team has two classes, User and Store, related by JPA @ManyToMany annotations. The relevant code is below. When creating a new User object and setting its stores, life is good. But we're seeing some unexpected behavior when trying to update User objects through our Struts 2 / Spring web UI. (These problems do not occur whe...

Need Spring version# - only have spring.jar file

I've inherited an app that uses Spring. The original developers are not available. The Spring jar file is just "spring.jar", so there's no version# in the filename to help me. I'd like to download the Spring source corresponding to the jar file. The MANIFEST.MF file has "Spring-Version: 1.2" however that's not precise enough. I've looked...

spring JDBC

I am getting the following exception whe using derby to do a UPDATE in oracle Database org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is org.apache.derby.client.am.DisconnectException: A communication error has been detected. Communication protocol being used: Reply.fill(). Com...

@Secured() is there any statement show on log...?

i annotated a bean class with @Secured and when i call the bean, there is no security exception throw even when no user login yet. i trying to debug it. my question is when we annotate a method/class with @Secured, when spring app start, is there any statement printed on log....? i already put below log bean in appcontext.xml <bean cl...

Spring JMS Message Listener Container

Hi, I'm new to JMS and I am working on setting up ActiveMQ with Tomcat 6 and Spring. I have most of the basic things configured however I'm a little bit confused with the Message Listener Containers that Spring provides. Reading the documentation it sounds like the Message Listener Container is used to "handle" subscribing (I'm worki...

How to have a class use applicationContext beans?

I'm working on my first java struts2 webapp and want to be able to inject bean parameters into any arbitrary class that is called. But I find that I can only do this with struts action classes... Let's say I have this bean in my applicationContext.xml file: <bean id="BeanTest" class="BeanTest"> <property name="test" value="someval...

JAR file gets modified during execution

This is after the last unsuccessful run of my program. I notice that the file size has changed and I can no longer run the Java class for my program: root@dbs01 ~ $ ls -l lifecycle-0.1-SNAPSHOT.jar -rw-r--r-- 1 root root 24740243 Jun 4 20:48 lifecycle-0.1-SNAPSHOT.jar This is after I copy the new copy of the original JAR f...

Spring, JDBC & MultiThreading

Which datasource best supports multi-threading in Spring? ...

Spring-managed Clojure beans

Hi. I'm just wondering if it's possible to create Spring managed beans backed by Clojure code (Clojure namespace I guess, would implement regular Java interface)? If so, the example would be appreciated. Thanks, Dmitriy. ...

"Recycling" names within a spring application context

lets say, I have a lot of stuff within my spring application context which looks like that <bean name="foo.0001" class="com.example.MyClass"> <property name="name" value="foo.name.0001"/> <property name="zap"> <bean class="com.example.Other"> <property name="name" value="foo.name.0001"/> </bean> <...

Easiest way to add GWT to a Spring MVC application?

I've got a Spring MVC application and I've decided that I'd like to try using GWT for the front end. I'd like to continue using MVC as I'll also be using Spring Security and some other springy stuff. I'm aware of the GWT-SL project, and I guess I'll use it. The documentation is light on examples unfortunately. What I'm wondering now ...

Java: How do you declare nested map in spring framework?

For instance, how would you declare a triple map like- Map<String, Map<String, Map<Boolean, String>>>, with the keys being someKey1, someKey2, and someKey3 (true/false)? I know until this- <util:map id="someMap" map-class="java.util.HashMap" key-type="java.lang.String" value-type="java.lang.String"> <entry key="...

Q about AbstractApplicationContext.getBeansOfType() and getBean()

We have the following legacy 2.0.7 Spring code: final Map<String, MyClass> secondaryFactories = (Map<String, MyClass>) context.getBeansOfType(MyClass.class, false, true); return (MyClass) context.getBean("myClass"); where context is an instance of org.springframework.contex...

How do I gain access to the data source in Spring?

I read this post, but I don't understand how I can gain access to the request using a ThreadLocal or DataSourceLookup or AbstractRoutingDataSource. I read every post but it still doesn't work. How do I gain access to my request's dataSource parameters and dynamically create connections with them? ...

What are the advantages/disadvantages of Seam over Spring?

What are the advantages/disadvantages of Seam over Spring? Why would I use Seam in lieu of Spring? Is there anything that can be done in Seam that can't be done in Spring? Anything in Spring that can't be done in Seam? What about stateful/stateless architecture? I am a Spring user, so I am biased, naturally. ...

Short way of making many beans depend-on one bean

When using database migrations, I obviously want none of the DAOs to be usable before the migrations are run. At the moment I'm declaring a lot of DAOs, all having a depends-on=databaseMigrator property. I find this troubling, especially since it's error prone. Is there a more compact way of doing this? Notes: the depends-on attr...

Spring BlazeDS flex.messaging.endpoints.AMFEndpoint

I have been struggling with this today for quite a while, removing everything but the default channels just to get it going. I have resolved all of my library issues (I hope) and now am getting the error below. I have also included my config files in case anyone can take a look at this. Thanks!!! 03:19:51,945 INFO [STDOUT] - Context in...

Distinguishing between beans loaded from different spring configuration files

Hi, our project is based on Spring IoC which provides easy extensibility, meaning the functionality of our project is extended by what we call extensions (or plug-ins) that provide a few additional Spring xml configuration files + new code. The problem is I have to somehow distinguish between beans that have been loaded from different ...

gwt+grail.. advantages and shortcomings..

i wonder any folks doing gwt+grail integration . one advantage of grail is it has many plugins. while gwt is good and easy to create ajax ui. can anyone share some good and bad enperience doing gwt+grail integration. My question is triggered when i was looking for facebook connect . seems to me grail already has such plugin available whi...

Java: Spring Framework: Declaring Nested Maps

I get an error at 4th line saying: cvc-complex-type.2.4.d: Invalid content was found starting with element 'map'. No child element is expected at this point. <util:map id="entirePayTypesMap"> <entry key="34"> <value> <map> <entry key="default"> <v...