I am using Java EE with Spring framework. I have been setting up a test project (everything is working so far) and I currently have the following line in the controller to simply load up a view called index.jsp:
return new ModelAndView("index");
This is just a test project so I'm not worried about syntax or anything like that. I am ...
In the standalone application(single threaded command line tool) I am developing ,I use Spring +Hibernate.
It has DAO and Service layers and for DAOs I use HibernateDAOSupport.
The collections in domain model are lazy-loading.
Since for lazy-loading I need to keep the Session opended,I open session at start of my application using:
Hib...
I'm looking for resources showing how to integrate MongoDB with Hibernate (preferably from within spring) so that I can switch between a RDBMS and a NoSql alternative: does anyone have experience doing this?
...
I have a ServiceListFactoryBean which creates a list of service implementations:
<bean id="services"
class="org.springframework.beans...ServiceListFactoryBean"
p:serviceType="ServiceInterface"/>
I can access the services using the applicationContext without a problem:
final List services = ctx.getBean("services", List...
I'm developing some portlets for Liferay Portal 5.2.3 with bundled tomcat 6.0.18 using Spring IoC container.
I need to map the User_ table used in Liferay database to an entity with Hibernate, so I need to use two different dataSources to separate the liferay db from the db used by portlets.
My jdbc.properties has to hold all connecti...
I like constructor injection as it allows me to make injected fields final. I also like annotation driven injection as it simplifies my context.xml. I can mark my contructor with @Autowired and everything works fine, as long as I dont have to parameters of the same type.
For example, I have a class :
@Component
public class SomeClass {...
Has anyone combined these technologies? Could you share lessons learnt?
...
Any example of scenarios other than doing search for which I could use "compass"?
Lets say we have a page that list top 10 most view article. How to use compass to show this kind of results. Any demo/sample project on this to refer to? definitely Jira would be a good example but its source code is not available. I want to know how to ma...
Well, I am having a problem with configuring Spring's JDBCTemplate to work properly. I am trying to inject the datasource but it seems that it's always null. Here is a sample code:
applicationContext.xml:
<bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
<property name="driverClassName" value="...
Hi,
I am using Spring's JdbcTemplate and StoredProcedure classes. I am having trouble getting the stored procedure class to work for me.
I have a stored procedure on an oracle database. Its signature is
CREATE OR REPLACE PROCEDURE PRC_GET_USERS_BY_SECTION
(user_cursor OUT Pkg_Types.cursor_type
, section_option_in IN Varchar2
, se...
Using spring 3.0 MVC:
Is it possible to programatically execute a controller's action, and return the generated output (the html)?
I want to take that output and store it in the database.
...
I am trying to log (just to console write now for simplicity sake) the final rendered HTML that will be returned by the HttpServletResponse. (i.e. the body) To this end, I am using the HandlerInterceptorAdapter from Spring MVC like so:
public class VxmlResponseInterceptor extends HandlerInterceptorAdapter {
@Override
public void...
I'm defining a lot of flows and each of my flows has a lot of actions within its states.
The namespace seems to be getting fairly crowded now, so I'm wondering if it's possible to define the spring beans for flow actions from within the flow.xml
or some other way such that it's visible to the flow, but not to other flows, but still has...
Any ideas what could be the cause of this?
Unable to locate Spring
NamespaceHandler for XML schema
namespace
[http://www.springframework.org/schema/security]
org.springframework.web.context.ContextLoader initWebApplicationContext: Context initialization failed
org.springframework.beans.factory.parsing.BeanDefinitionParsingExc...
Hello everybody,
I'm using Spring to inject JMS connection factory into my Java application. Since this factory is only required within the production environment, not while I'm developing though, I put the bean definition into a separate XML which I include into my main applicationContext.xml. In production environments this extra file...
I am using Java EE and the Spring framework. I am writing my POJOs, and the base object for my system should have a globally unique ID. My question is: what would be a "best-practice" way for me to generate this ID. This id must also be stored in a db table as a primary key.
...
Using Spring MVC 3.0.0.RELEASE, I have the following Controller:
@Controller
@RequestMapping("/addIntake.htm")
public class AddIntakeController{
private final Collection<String> users;
public AddIntakeController(){
users = new ArrayList<String>();
users.add("user1");
users.add("user2");
// ...
users.add("userN"...
We would like to make JMX calls to other deployed applications within Websphere Application Server. This works fine if you do this within a web application where a user does a login with the right credentials. However if you try to make JMX calls, say, from a timer triggered part of the application that has no connection to any logged in...
The download page on http://www.springsource.com/download/community mentions:
spring-framework-2.5.6.SEC01
spring-framework-2.5.6
What is the difference between those two versions? Why the SEC01 numbering?
...
I'm having trouble getting the Spring Security OpenID functionality working. I'm getting the error below when I use http://spring.security.test.myopenid.com/ as input. Here is a link to the spring source that shows where the exception is thrown. Any ideas?
Unable to process claimed identity
'null'.
applicationContext-security.xml...