How can I influence the process of choosing a message converter in AnnotationMethodHandlerAdapter for resulting POJO by url extension?
I would like to have more representations of one data object, while data representation should be chosen by the requested url extension e.g. /users/2.xml or /users/2.json.
Current configuration of messag...
Hallo,
I tried to send the request to PostgreSQL 8.x that has character encoding SQL_ASCII. Sadly I can not convert it to UTF-8 in any way: neither sending connection properties client_encoding=UTF8 using springframework, nor "SET CLIENT_ENCODING = 'UTF8';" directly in jdbc transaction - nothing helps.
On setting client encoding in jd...
I have a problem with transactions in that annotating a service that calls a DAO with @Transactional throws an exception stating that the Session is not open. The only way I can get it working is by annotating the DAO with @Transactional. What on earth can be happening?
This is what I'd like to do but doesn't work:
class CustomerServic...
I am trying to restrict a user from signing more than once (forcing the previous session to expire).
I've checked the documentation on the subject here. I've set this up very similar to the documentation, but users are not being restricted to one session at a time. I can log in multiple times (in different browsers) with the same user a...
We're building a web application that is available to both authenticated and anonymous users. If you decide not to register/login you only have a limited set of features. User authentication is done over OpenID with Spring Security. That works fine.
However, the application also comes with an admin UI that is deployed at <host>/<context...
I'm working with Spring MVC and I'd like it to bind a a persistent object from the database, but I cannot figure out how I can set my code to make a call to the DB before binding. For example, I'm trying to update a "BenefitType" object to the database, however, I want it to get the object fromthe database, not create a new one so I do n...
I have a very simple method scheduled to run every 10 seconds like this:
@Component
public class SimpleTask {
@Scheduled(fixedRate=10000)
public void first() {
System.out.println("Simple Task " + new Date());
}
}
Config:
<task:annotation-driven executor="myExecutor" scheduler="myScheduler" />
<task:executor id="...
This page on Spring JDBC says
The DataSourceUtils class … provides static methods to obtain connections from JNDI
However the API doc for DataSourceUtils does not include the said static methods, as far as I can see.
What am I missing?
...
I have the following partial spring context xml file:
<bean name="template" class="org.springframework.jdbc.core.JdbcTemplate">
<property name="dataSource" ref="dataSource" />
</bean>
<bean name="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
<property name="driverClassLoader" value="" /> <!-- T...
Hi,
I am totally new to Spring Web Services and so what concept should I start concentrating on and where should I be looking for them and in general what steps would you recommend to get to speed with Spring Webservices Module.
Note: I have an requirement to build Web Service for and consume Web Service from different application an...
Hi!
Spring seems to resolve and create the autowired objects just fine on boot up. But when I try to access them they come back as null. Anyone have any guesses on what might be going on?
Also XML info is blank as I'm only allowed one hyperlink...
<beans xmlns=""
xmlns:xsi=""
xmlns:p=""
xmlns:mvc=""
xmlns:context=""
xsi:...
I have an AuthenticationManager with multiple AuthenticationProviders. That works very well, the first AP that can auth² the Authentication authenticates the user and if none can, the user is refused.
Now I have an a bit more special case, and I need to find out which AuthenticationProvider authenticated a user that was authenticated su...
Combination of corporateId and username is unique for us in the user table.
I know spring provide a mechanism to write custom query for the authentication.
<bean id="authenticationDao"
class="org.acegisecurity.userdetails.jdbc.JdbcDaoImpl">
<property name="dataSource" ref bean="dataSource" />
<property name="usersByUsername...
Hi,
I'm using Jboss 4, hibenate, spring and treecache. As we have different environments, I would like to store the cluster information in a separated property file and reference to the content from the treecache xml file. I copied the treecache-optimistic.xml into
\jboss-4.2.0.GA\server\Pearl\conf
and setup the properties in \jboss...
Is it as simple as creating a POJO with @Transactional methods?
...
I'm using Spring 3.0 along with Spring Security. I've always used the following configuration:
<form-login login-page="/login" authentication-failure-url="/login?error=credentials" default-target-url="/account" login-processing-url="/security_check"/>
So when the user doesn't login correctly, they go to /login. Now I have a logi...
here is my web.xml:
<?xml version="1.0" encoding="UTF-8"?><web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
<!-- Enables clean URLs with JSP views e.g. /welcom...
hi. my code:
<bean class="org.springframework.web.servlet.view.ContentNegotiatingViewResolver">
<property name="mediaTypes">
<map>
<entry key="xml" value="#{subscribersXml.contentType}" />
</map>
</property>
<property name="order" value="0"/>
</bean>
<bean id="subscribersXml" class="org.springfram...
I am using Spring HibernateTemplate, OpenSessionInViewFilter(actually I extended this class and created my own to switch to FLUSH.AUTO Mode) and Mysql for implementing hibernate many-to-many association. However when I save an object, corresponding many-to-many table's values are not inserted. Does anybody can help me? Thank you.
here i...
Hi. i am geting this strange exception below:
INFO: Deploying web application archive ZangV3Spring.war
10-Sep-2010 08:46:38 org.apache.catalina.startup.ContextConfig init
SEVERE: Exception fixing docBase for context [/ZangV3Spring]
java.util.zip.ZipException: error in opening zip file
at java.util.zip.ZipFile.open(Native Method)
...