spring

Will Spring hold contents in memory or stores in the disk ?

When a file say 100 MB size is uploaded from browser will Spring hold whole data in memory or stores in the disk temporarily. After going through Spring doc I know how to set a temp dir but I want to know what will happen if I don't mention that. Am having following declaration : <bean id="multipartResolver" class="org.springframework....

How to freeze or disable an update input form

Hi, I wonder if it is possible for me to freeze or disable the entire update form? I have an input h:form with a check box in it. when users check the box, I would like to freeze or disable the entire form so that disallow users from changing inputs. Thanks, and I am using JSF, Spring Web Flow, Facelets, and Trinidad. ...

Spring 3 on GlassFish 2.1 java.lang.NoSuchFieldError: APPLICATION_CONTEXT_ID_PREFIX

I am trying to deploy a spring 3 application on GlassFish v2.1 and am getting the following error: APPLICATION_CONTEXT_ID_PREFIX at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:431) I found advice on the spring forum http://forum.springsource.org/showthread.php?t=79929 which says t...

GWT: get locale information from server side ?

I use GWT along with Spring/Hibernate/AOP. I use an Aspect to send notification emails. In one of my Aspect, I want to get the current locale from GWT,so that I can send the localized email to the user. Is there a way to access GWT Locale data from the client side? Thanks ...

spring - config spring email

I used the springmail to send email from my smtp server with the following config: <bean id="springEmailSender" class="org.springframework.mail.javamail.JavaMailSenderImpl"> <property name="defaultEncoding" value="UTF-8"/> <property name="host" value="mail.myserver.com"/> <property name="port" value="25"/> <property name="username"...

Thread safety in JSF

Assume that we have Spring bean UserController with singleton scope. All my further reasoning is based on my assumption that "singleton" scope is almost similar to application scope i.e. we have only one instance for all users. If this is wrong assumption then tell me about it, please. So, we have a web-form with several fields. Two ...

How to programmatically add Security to a Spring Bean

I´m using spring-security-tiger-2.0.5. Is there a way to programmatically add a security proxy to a Spring Bean? I´m constructing the bean through BeanDefinitionBuilder, and i´d like to add same behaviour as the @Secured annotation. The roleName´s @Secured equivalent will be passed as a parameter. ...

Spring Security basics

How to make a link visible only if an authenticated user has correspondent permissions? I'm using JSF, and as I understand, I should use rendered attribute of a component which should call backing bean's boolean method. I've even found correspondent code some time ago but now I can't find it again. So, can anyone give me an example of...

understand spring xml annotation metadata?

<context:annotation-config/> <context:component-scan... this is used for class that i need to annotated with @Repository @Service @Component... <context:spring-configured /> <context:component-scan... use if i need to use @Configurable <tx:annotation-driven transaction-manager="transactionManager" /> <context:component-sc...

spring multiple @transactional datasource

<bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager"> <property name="entityManagerFactory" ref="data.emf" /> </bean> <tx:annotation-driven transaction-manager="transactionManager" /> <bean id="transactionManager2" class="org.springframework.orm.jpa.JpaTransactionManager"> ...

How to configure transaction management for working with 2 different db in Spring?

I have 2 databases (MySql and HSQLDB). I configured 2 data sources and 2 EntityManagerFactory beans. I can also configure 2 correspondent JpaTransactionManager beans. But I don't know how to specify which of them should be used to manage transactions for concrete service-class. I want to use @Transactional annotation for that purpose, ...

which SessionFactory should be use for transactionManager?

<bean id="projectService" class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean"> <property name="transactionManager" ref="transactionManager"/> <property name="target"> <bean class="com.company.project.company.services.ServiceImpl" init-method="init"> <property name="HRappsdao" ref...

persistence-unit as RESOURCE_LOCAL or JTA?

1.may i know what is the different of both? both also supported by all database right? 2. jpa transactionmanager and jta transactionmanager different? can explain? ...

using spring with ejb

Hi have you used spring and EJB together in a project? It it's good or not. And how, what you used spring and EJB for? thanks ...

Spring jta-transaction-manager

Using Spring: can jta-transaction-manager use id as name so that I can pass it as REF to my service layer like below? is tx:jta-transaction-manager can only be used for je22 container? I mean for Tomcat, I need to do it manually, like below: <tx:jta-transaction-manager id="name_transactionmanager"/> &lt;bean id="projectService" clas...

spring roo vs appfuse generate service /dao layer

I am looking for feedback from experienced users on spring roo and appfuse. Which do you think does a better job reverse engineering database tables and generating a service layer, dao layer, and jpa entities? If I am not mistaken, spring roo currently cannot reverse engineer a database. ...

spring hibernate configuration using resource_local or jta by default?

may i know as my configuration is done directly on applicationContext.xml, i do not have persistence.xml . by default this is resource_loca or jta? do i need to add extra parameter if i want to use jta? <bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource"> <property name="driverClassName"...

spring transaction show in log?

i configured spring with transactional support. is there any way to show log on transaction in log? just to ensure i set up correctly? showing in log is a good way to see what is happening ...

Spring tutorial on Session Management

Hi All, I want to learn how session management is being done in Spring web MVC. Do you know any free tutorial on how is it being done? I am thinking of similar sample applicatin such as BookStore or Shopping cart applications that I have done using basic servlets and JSP. Kindly advise me how is it done and make it done the proper way...

Modify HttpServletRequest before any HandlerMapping?

The problem I am trying to solve is that I want to check all incoming GET urls against a database. If the the url exist in the database it shall be passed to a certein controller. I'm using Spring 3.0. First I tried to make an interceptor and add that to DefaultAnnotationsHandlerMapping. Turns out i couldn't modify the url in preHandle(...