I have this factory class, which i want to wire via spring for runtime configuration of the map. The map contains an enum object and standard pojo.
public class GenericEntityFactoryImpl implements GenericEntityFactory
{
private Map<IndexType,IEntity> indexEntityMap = null;
@Override
public IEntity getIndexEntity(IndexType ...
Please a bit of advice on the following:
I am using a ThreadPoolTaskExecutor to execute slow-external tasks like sending emails.
I need to improve this:
1) When the a task is passed to the exeuctor, it has to wait executing it till at least the transaction of the passing operation has finished.
Example: i makes no sense to email someth...
Mapped objects are not being persisted in DB (Postgresql 8.4) when calling persist in a running transaction. I am using Spring Transaction Management with the
org.springframework.jdbc.datasource.DataSourceTransactionManager
so everything should be fine. I set the autocommit-mode on the DataSource to "false". When setting the mode ...
Hi folks,
I'm writing a web application using Spring MVC. Although Spring MVC comes with a couple of tag libraries, they are not rich as Struts' counterpart. What I miss most is <html:xhtml>.
Those of you using Spring MVC, what third-party tag libraries do you guys use?
Thanks!
Edit: More specifically, I would like to auto-generate t...
Hi!
Im learning Spring (2 and 3) and i got this method in a ClientDao
public Client getClient(int id) {
List<Client> clients= getSimpleJdbcTemplate().query(
CLIENT_GET,
new RowMapper<Client>() {
public Client mapRow(ResultSet rs, int rowNum) throws SQLException {
Client...
Hello,
I have a Spring-WS service using PayloadRootAnnotationMethodEndpointMapping that has several interceptors:
<bean class="org.springframework.ws.server.endpoint.mapping.PayloadRootAnnotationMethodEndpointMapping">
<property name="interceptors">
<list>
<ref local="loggingInterceptor"/>
<r...
I have a singleton spring bean that is being invoked in response to some client side action.
I wish to capture some information about the client (specifically the IP address). I assume the best source of this information is the request object. How do I obtain access to the request object from inside my bean?
Forgive me if this is an obv...
I'm using latest versions of Spring Framework and Hibernate. I know how I can create custom version of MessageSource. But what would be best way to serve i18n messages. Because if I query database every time application needs internationalization, it will cause huge amount traffic to database, and often queries will just return same answ...
I'm adding some features to an old EJB 2 application using Spring. The Spring application context used by the EJBs is a parent context of the web application as described here.
I'm trying to use a session scoped bean from within the EJBs. The bean in question is initialized from the EJB application context.
However, I get this error ...
Hi All,
Please help me with what I want to do.
I have this scenario:
I display a list of assets to users.
User selects an asset and then
clicks add item
On my requestmapping, during GET
operation. I use the service class
to check if indeed this asset still
exist in DB
If not, user should be notified by a
message. I use the form:err...
We are beginning to build out a webapp which will probably see a lot of traffic. We dont have a lot of money, so we want to reduce hardware cost.
More or less, I think that means we will try to be as stateless as possible (as the Wicket way suggests - have bookmarkable URLs, etc. etc.)
The other problem is that we are gonna be hiring co...
Hi,
In the context of Spring Webflow 2.0.x......
Is it possible to REMOVE a validation error from within the Spring Errors object during validation? I cant see anything in the API.
i.e.
public class MyValidator implements Validator {
.......
public void validate(Object target, Errors errors) {
MyForm form = (MyForm) t...
Hello,
for the project I'm currently working at there is the requirement to disable the webapp context to be started when spring fails to initialize some beans (that call webservices during initialization and therefore are likely to crash then).
However, when a bean throws any exception during initialization, it looks like this:
org...
In Spring 3.0
if i have a jsp page with two different links each calling different method on MultiActionController
<form:form method="POST">
<a href="user.htm?action=add" style="color: blue;">Add</a>
<a href="user.htm?action=delete" style="color: blue;">Delete</a>
</form:form>
on the MultiActionController i get request param...
Hi
Could someone help me understand what am I missing in binding the view with model?
Here is the error I am getting:
org.springframework.binding.expression.PropertyNotFoundException: Property not found
at org.springframework.binding.expression.ognl.OgnlExpression.getValue(OgnlExpression.java:87)
at org.springframework.webflow.mvc.view...
I want to store user information after logging in and to display my login and username on every page (using jsp). How can I get access in my jsp views to the session bean that would store information of the user that is logged in?
...
In Spring MVC, an exception's stack trace is logged if it makes it all the way back up to the framework (for example, if there is a NullPointerException). Is there a simple way to do this using Spring's MBeanExporter?
I know that I could have try-catches in the method to do this, but that would lead to clutter. I checked the Spring doc...
I have a project built with Webflow 1.0 and Spring 2.0. We'd like to upgrade to Spring 3, but that requires Webflow 2.X.
I've updated all the Spring and Webflow jars in the project, but when I try to load the initial flow, I get:
org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Cannot ...
Hi Experts,
how can i use spring AbstractExcelView to generate a excel file in a portlet
Thanks
Sam
...
I have the following call in my JavaScript:
new Ajax.Request('/orders/check_first_last/A15Z2W2',
{asynchronous:true, evalScripts:true,
parameters:{first:$('input_initial').value,
last:$('input_final').value,
order_quantity:$('input_quantity').value}});
What do I need to do to get Spring MVC (3.0) to handle this?
...