spring

Inversion of Control, Spring Framework - system of global instances

Is inversion of control essentially just retrieving a set of already instantiated objects? In theory. I guess more granular details as implemented by IoC frameworks like Spring have a lot more functionality, but in theory it seems like IoC containers operate like a collection of instantiated beans (in the Java world) and then you get a...

Combining namespace based configuration with different authentication methods in spring-security

I'm trying to get spring-security to work with a project where there is both a form login component needed (for website access) and a http-basic or http-digest component for web services. Now we started out with the namespace based configuration, e.g. a spring-security.xml file with stuff like: <http auto-config="true"> <intercept-u...

designing consoles for hardware appliances

What are the best practices in designing UI for hardware appliances? Are there any frameworks in Java that are particularly suited to this task? ...

Spring MVC form:select Tag, multiple selections not binding correctly?

I am trying to create a form to edit an existing database row. I am using the Spring MVC form tag to auto bind the html to a form backing object. The row has a many to many relationship with another table, which I am trying to represent with a multiple select box using the form:select tag; <form:select path="rules"> <form:options items...

Simple Spring, use of ClasspathApplicationContext for standalone apps, how to reuse?

If I have a standalone main application. Say 20 classes. They all may need to interface with the beans defined by the spring configuration (ApplicationContext) at any time. I would boostrap the classpath application context at the main application entry point. But how do you reuse the already instantiated beans? For example, it seem...

Using Spring IoC to set up enum values

Hi there, Given the followin enum : public enum Car { NANO ("Very Cheap", "India"), MERCEDES ("Expensive", "Germany"), FERRARI ("Very Expensive", "Italy"); public final String cost; public final String madeIn; Car(String cost, String madeIn) { this.cost= cost; ...

get some stack trace info into a custom tomcat error 500 page

What is the best way of getting some of the stack trace info, perhaps the Exeception.message onto my custom error 500 page with tomcat, spring, jsf? I'd just like the root cause of the exeception displayed. ...

Jasper in Equinox - does not resolve jstl core uri

I'm currently researching OSGi with Spring, and working through a couple of examples from Pro Spring Dynamic Modules for OSGi. My example web-app has a single controller like: @Controller public class HelloWorldController { private HelloWorldService helloWorldService; @RequestMapping(method = RequestMethod.GET) @ModelAttri...

How to make spring load JPA classes from multiple paths?

So I have a spring application divided into several modules, each in a separate project. Each module has its own JPA entities and I'm using Spring ORM for configuration: <beans ...> <context:component-scan base-package="org.myapp.module1.persistence" /> <context:component-scan base-package="org.myapp.module2.persistence" /> ...

What should I learn first, Spring or Hibernate?

Hi guys, I've just started learning Struts and I'm trying to be marketable for a good job as a Java programmer. My next decision would be choosing which to learn next, Spring or Hibernate? Also do you guys have any suggestions or tips for me to be good? Thanks in advance! ...

Using Spring IDE in Eclipse 3.4

Hello, I'm using the Spring IDE plugin with Eclipse 3.4 (finally decided to upgrade), and I have several projects which use the Webflow integration that comes with the Spring IDE plugin. For some reason, I can't view anything having to do with Spring Webflow in Eclipse 3.4. It worked just fine in 3.3, but not 3.4. Has anybody encount...

What is best way to learn Spring AOP or AOP in general?

Hi, I have got experience working in Spring framework, but i find it very difficult to understand the basics of Spring AOP or AOP in general. Could you guys suggest me some good online tutorials/books you have come across to learn it. -Snehal ...

What are all the portlet classes in Spring mvc?

In Spring MVC there seem to be two parallel class hierarchies, one with portlet, one without. What is that? Why is it so and what should I use. ...

portlet 2.0 (jsr286) development with spring

Hi! We are discussing whether it's a good idea to switch from plain portlet development on a liferay installation to spring webmvc portlet based development. We're starting the development of some portlets soon, so now is the time. But the problem I see is that we'd like to use some of the portlet 2.0 features, which won't work with ve...

How to Inject Spring ReloadableResourceBundleMessageSource

In order to programmatically refresh the resource bundle cache, I am using Spring's ReloadableResourceBundleMessageSource. I am having trouble injecting it into my bean where I want to invoke the clearCache() method. I've had to resort to the following: private ReloadableResourceBundleMessageSource messageSource; @Autowired public ...

Spring Integration: How does RendezvousChannel work?

I haven't been able to find any examples of how the RendezvousChannel works in Spring Integration. Does anyone know of any resources? I've read that RendezvousChannel is useful for adapting request/response clients to the asynchronous messaging in Spring Integration. ...

MySQL Cluster (Master/Slave) and Hibernate

The application when developed is using a single database and the spring configuration is as follows. <bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close"> <property name="driverClassName" value="com.mysql.jdbc.Driver" /> <property name="url" value="jdbc:mysql://localhost:3306/test" /> ...

Corrupted HTTP headers on Apache/Weblogic 9.2

I have a very strange problem. My application stack is J2EE based and uses Spring 2.5.6 with Spring webflow 2.0.6. The app server is Weblogic 9.2 with an Apache server in front (load balancing). We use SiteMinder Webagent as the authentication layer in apache. The problem below could be caused by any of the layers above - Our site pe...

Spring / Hibernate / JUnit - No Hibernate Session bound to Thread

Hi I'm trying to access the current hibernate session in a test case, and getting the following error: org.hibernate.HibernateException: No Hibernate Session bound to thread, and configuration does not allow creation of non-transactional one here at org.springframework.orm.hibernate3.SpringSessionContext.currentSession(S...

read file in classpath

Here is what I want to do and I am wondering if there is any Spring classes that will help with implementing. I don't have to use spring for this particular problem, I'm just implementing it with everything else. In my DAO layer I want to externalize my sql files aka 1 sql per file. I want to read and cache the sql statement even maybe...