I am trying to retrieve data form an Oracle database using jdbc (ojdbc14.jar). I have a limited number of concurrent connections when connecting to the database and these connections are managed by Websphere connection pool.
Sometimes when I make the call I see an UncategorizedSQLException exception thrown in my logs with one of the fol...
It is the second time that I stumble across that issue and I haven't found a good solution yet. My problem is that I want to package a framework like JAR with a default Spring context and give the user of my JAR package the possibility to use this configuration (or even an ApplicationContext implementation) to add his own bean definition...
I have a Spring application (Spring version 2.5.6.SEC01, Spring Security version 2.0.5) with the following setup (this is based off of this question):
In the security-config.xml file, I have the following configuration:
<http>
<!-- Restrict URLs based on role -->
<intercept-url pattern="/WEB-INF/jsp/login.jsp*" access="ROLE_ANONYMO...
Is there any integration library/framework available? If not, what would be the best way to achieve this integration? Thanks in advance.
...
What are best practices to configure following class with spring.NET?
using System.Collections.Generic;
using Edu3.DTOModel;
namespace Edu3.Data.SubsonicProvider.RepositoryFramework
{
public static class RepositoryFactory
{
private static readonly Dictionary<string, object> Repositories =
new Dictionary<str...
I have some POJOs which are the basis for this RESTful API I am working on. However, some of the responses I need to include some other information to make the API more complete. I really don't want to put these extra information in the POJO, but include it at the web service layer as if it were.
It deals with "People" who have "Appoin...
I have a login controller that use the hibernate uniqueResult method. Everything works fine when i test it in eclipse's tomcat server. But when i deploy my webapps to tomcat server (on the same machine) it fails: it always returns null even i use the correct credential.
Here is my hibernate code:
session.createCriteria(User.class)
...
Im attempting to use the MVP design pattern with a Swing application in conjution with Spring IOC. In MVP the View needs to pass itself into the presenter, and I can't work out how to do this with Spring.
public class MainView implements IMainView {
private MainPresenter _presenter;
public MainView() {
_presenter = n...
I'm getting a 'No thread-bound request found' error in my web app and hoping to get some help.
I'm trying to use struts2 + spring + hibernate, and use spring to manage the hibernate session factory, and inject hibernate sessions into my struts actions. I hope that made sense.
When the app starts up, there are no errors, but when i make t...
Hi everyone
I think i'm missing something fundamental about how Hibernate works, specifically with lazy loading. My problem is debugging, as I'm not sure if this is a Hibernate problem or a Spring problem in disguise. I thought I would ask here before doing some major refactoring.
I have two Entities. One holds a collection of the ...
Spring 3 has introduced a new expression language (SpEL) which can be used in bean definitions. The syntax itself is fairly well specified.
What isn't clear is how, if at all, SpEL interacts with the property placeholder syntax that was already present in prior versions. Does SpEL have support for property placeholders, or do I have to ...
Just reading up on spring's data access, and it has something like this:
jdbcTemplate.query(someSql,
new Object[] { 1 },
new RowMapper() {
public Object mapRow(ResultSet rs, int rowNum) ...
Blah blah = new Blah();
blah.setId( rs.g...
If you have a call in a Dao method like (pseudo code):
return ..getHibernateTemplate( get by id );
Now say that entity has a lazy-loaded collection. Once you return from your Dao using the hibernateTemplate helper method, how come the session stays in scope and allows you to lazy-load a collection?
Is the session initialized and comm...
My application stores files, and you have the option of storing the files on your own server or using S3.
I defined an interface:
interface FileStorage {
}
Then I have 2 implementations, S3FileStorage and LocalFileStorage.
In the control panel, the administrator chooses which FileStorage method they want, and this value is stored i...
Is there any reason why a request scoped Spring object would be cached between requests, by a injected @SpringBean field?
...
Hi,
I have the following controller
@Controller
@RequestMapping("/project/view.html")
public class ProjectViewController {
private static final String viewName = "projectView";
@RequestMapping(method = RequestMethod.GET)
public String showPage(Model model,
@RequestParam(value="id",required=false) Long id) {
//code.....
...
I've developed a web service with jax-ws and Spring using the tutorials at the jax-ws commons website. It shows you how to define and reference your service from your spring applicationContext file (https://jax-ws-commons.dev.java.net/spring/).
What is the reason for the "#" when referencing the web service? I would expect to see somet...
hi everyone
I have what I thought was a simple Spring MVC app. However, I can seem to set the requestMappings correctly. What's strange is that the logs show that the url is mapped to the proper controller, yet the Dispatcher cant seem to find it at runtime. Any suggestions would be much appreciated:
Log
INFO: Mapped URL path [/app...
I have a Spring application running against a MySql database. I have a sales table like:
+-------------------+------------------------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------------------+------------------------------+------+-----+---------+-----...
I am trying to use validation with Spring 3.x.
I have annotated a method field with @Valid, added <mvc:annotation-driven/> to my common.xml, and added Hibernate-Validator.jar in the lib/ dir, but I keep getting this message: "Hibernate validator not found: ignoring".
Am I missing something?
[Version:15] Hibernate Annotations 3.4.0.G...