spring

configure properties of LocalSessionFactoryBean in grails

I have grails project using my existing Java domain classes of a spring project and I need to configure typeDefinitions. In the spring project it is possible to configure this property of the LocalSessionFactoryBean - but how do you do that in a grails project? ...

spring limit max sessions ; limit max users

may i know possible to use spring security to limit max number of users able to login to website at the same time? definately, not concurrent-session-control parameter. what i want is for instance, i want to limit maximum only allow 1000 users login same time. if more than that forward to notice page stating maximum users exceeded ...

Flex/Spring: Working with join table/entity

Hi guys, I have a question regarding mapping and entities/domains with Flex/Spring mapping via BDS. I currently have domains mapped to tables, and I am working off existing code to try and change the logic from web services to work with Blaze. Now, i came across a value object used previously that mapped to a datagrid, but that value o...

Spring MVC - Web Flow Controller

Hi. I have a j2ee application developed using spring framework and spring webflow. Currently all of my url requests go through the Web Flow. What I want is to be able to choose whether to direct it to Web Flow or an ordinary spring mvc controller. I have no idea how to direct it to custom controllers. How do I do this? I tried having t...

What's a real life problem that you solved with Dependency Injection?

I was reading about DI thoroughly, and it seems interesting. So far, I'm totally living without it. All the examples i saw are related to JNDI and how DI helps you being more flexible. What is real life applications/problems that you solved with DI that will be hard to solve in other ways? UPDATE All the answers till now are educat...

spring security not eligible for auto-proxying

can anyone elaborate what does these info means when startup application? INFO: Bean 'org.springframework.aop.aspectj.AspectJPointcutAdvisor#0' is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) Jan 13, 2010 11:00:34 AM org.springframework.context.support.AbstractApplicationCont...

How to handle DataIntegrityViolationException in Spring?

I need to show custom messages in my Spring 3.0 application. I have a database with Hibernate and there are several constraints. I have doubts in how DataIntegrityViolationException should be handled in a good way. I wonder if there is a way to map the exception with a message set in a properties file, as it is possible in Constraints va...

Looking for a tutorial and/or example for the following: Annotation based Spring 3 with JPA and/or hibernate

I want to learn Spring. I'd like to start with Spring 3. I want a simple tutorial and/or example. So no full blown web example please. Also - not a trivial example - so something incorporating persistence (e.g. JPA or hibernate) would be nice. Also - I don't want to get bogged down writing XML. So - Annotation based Spring 3 with JPA an...

Spring - IoC Container - How to use dynamic values in properties ? (like a concat of 2 Strings)

Hello, I'm using Spring framework and I don't know how to do this simple thing: I want to provide a String to a bean, with the string being the result of the concatenation of multiple part, some fixed and other variables For example it could be something like: "myReportFile_20102101_1832.txt" - the first part is a fixed part - the sec...

Spring programmatic transaction with parameter

I'm working on some data access logic with Spring, my question has to do with transactions. The transaction documentation http://static.springsource.org/spring/docs/2.5.x/reference/transaction.html shows that you can implement declarative or programmatic transactions. I've chosen to use the programmatic approach so that I have finer cont...

Baffled by Java Logging Systems with Spring and Hibernate

Hi Everyone WHen deploying my Spring / Hibernate application, I get the following warning related to logging: log4j:WARN No appenders could be found for logger (org.springframework.web.context.ContextLoader). log4j:WARN Please initialize the log4j system properly. Surprising to me was the lack of information from a Google / SO search...

Spring OpenSessionInViewFilter: cant save object

hello, I encountered an common error with spring + hibernate, but cant fix it :( i have 2 tables with one-to-many relation: each Bsc have many Cell my hibernate config <class name="Bsc" table="bsc"> <id name="id" column="id"> <generator class="native" /> </id> <property name="name" /> <set name="cells"> ...

spring-security & spring-mvc configuration

Hola. i have written a small webapp using spring-security and spring-mvc with an annotation based configuration (@Secured). in order to have that work i had to split up the spring-security configuration: app-context.xml (included in web.xml's ContextConfigLocation) <security:http auto-config="true"/> app-servlet.xml (spring-mvc's di...

Cannot save clob data type in database (Struts, Spring, Hibernate)

@Column(name="transpired") @Lob private String transpired; public String getTranspired() { return transpired; } public void setTranspired(String transpired) { this.transpired = transpired; } I tried using the following code in our model class. Transpired is a field with long text messages (reports). When viewing the "report", i...

How to use a jar that uses Spring in common lib?

Hi, I'm really new to Spring and I'm not sure if I'm doing it the right way. Here's my prob : I've exported a jar which uses Spring 2.5 to inject dependency to a class in another project called "business". There's an accessor which uses ClassPathXmlApplicationContext to get the bean. I've placed that jar in the common/lib of JBoss 4.2....

Are there any Java-based web frameworks that are multitenant aware?

Looking for something between simply downloading struts and bolting on vs full-fledged portal software such as Liferay or BEA Portal. Would be great if the database connectivity supported EAV models but allowed developers to think in traditional relational 3NF terms. ...

LdapUserDetails Mapper changed in Spring Security 3.0?

In the earlier versions of the spring security, The LdapUserDetailsMapper used to have an attribute to store custom user attributes like samAccountName, givenName.... But with the recent release in Spring security 3.0 apparently something changed and there is no way to store these details which we can access later from security context. ...

Convert Spring Batch from 1.1.3 to 2.0.0

I'm trying to convert Spring Batch jobs from version 1.1.3 to 2.0.0 and have gotten numerous errors. Managed to resolve most of these, but not the following: In my QuartzBatchLauncher, the code invokes "new ClassPathXmlApplicationContextJobFactory(bean, path, parent)" and I've had no luck discovering what is the 2.0 equivalent to this ...

Declaring Integers, Doubles, Floats, Strings etc. in Spring XML

Occasionally, Spring can't figure out what type a "value" should be. This happens when the property or constructor is of type "java.lang.Object". In these cases, Spring defaults to "java.lang.String". Sometimes this isn't the right choice, for example when using: <jee:jndi-lookup id="test" jndi-name="java:comp/env/test" default-valu...

eclipse web project dependency

Hi everybody! i have one eclipse project(A) with a small spring application and another one with a web application using GWT (B). project A exports its ressources via build path / order and export. project B imports the ressources via build path / projects. eclipse adds the files to the build path and to the system class path of the r...