I have a two ibatis sql maps that are linked together via a sub select like the simplified example below:
<resultMap id="order" class="Order">
<collection property="orderLines" ofType="OrderLine" resultMap=”orderLine”/>
</resultMap>
I have an order object that contains a collection of line objects that are returned by a join and an ...
Hi,
I have the following setup:
@Component
public class ImplOne implements IFace{
}
@Component
public class ImplTwo implements IFace{
}
public interface IFace{
}
I am trying to get a reference of ImplOne by type:
@RunWith(SpringJUnit4ClassRunner.class)
public class ImplOneTest {
@Autowired
private ImplOne impl;
@Test
publ...
Hi,
I am working on a form with a bunch of selection criteria that will generate a report when the form is submitted. I also have a number of different reports that can be generated form this same criteria, and want the type of report to be selectable by using a tab system where each tab clicked on submits the form and generates the cor...
Hello All...
I have one table that has composite key 'rid' and 'sid'.
For that i have made following beans to map with hibernate annotations :
WBList.java
============
@Entity
@IdClass(WBListPK.class)
public class WBList {
private int rid;
private int sid;
private String wb;
@Id
@JoinColumn(name="rid")
public ...
Working on a large size project, we started to use spring to manage our dependency injection. Since most dev are migrate from coding stateful class, we found some of stateless bean actually contain instance variables which themself are stateful.
Correct me if I am wrong, it shouldn't be too tough to write a unit test to verify that all ...
350 Bounty and waffles to the person who can help me!
I have been struggling with Spring Web Service encryption for days and I can't figure out how to get Spring's encryption on the message body to work. Whenever I have the server encrypt the resulting message the client doesn't seem to be decrypting it before it attempts to validate i...
In my application, Spring manages connection pool for database access. Hibernate uses these connections for its queries. At first glance, I have no problems with the pool: it works correctly with concurrent clients and a pool with only one connection. I can execute a lot of queries, so I think that I (or Spring) don't leave open connecti...
I'm a long-time web developer who's been focusing on ASP.NET/C# for the past 5 years. For my final Masters in Software Engineering project, my team is working with a local company to build them an app using Spring Web Flow (as that's their current tech stack).
I don't know the first thing about building web sites with Java. In fact th...
With Spring I can autowire a bean with the following property:
@PersistenceContext(unitName="foo") private EntityManager em;
Using the following I can manually autowire the bean "someBean":
ClassPathXmlApplicationContext ctx =
new ClassPathXmlApplicationContext("META-INF/applicationContext.xml");
AutowireCapableBeanFactory fac...
Hello All...
I have one table with composite key attribute..
For that i have made 2 beans for hibernate annotations mappings..
Now, it works fine for save, update and delete..
But when I am fetching using some criteria, it's giving me "could not resolve property" exception.
My Beans are as follows :
WBList.java
@Entity
public clas...
when using spring @Transcational on service layer, I will need to put <annotation driven> on xml file.
may i know can javax.jdo.annotations.Transactional be used on service layer just like spring does? do not need to configure xml files. etc?
can javax.jdo.annotations.Transactional be used on service layer independent on whether i usi...
my service layer methods are transactional, when i use ExecutorService and submit task to threads, i cannot pass servicelayer as parameter to each threads, as i get error
Dec 14, 2009 10:40:18 AM com.companyx.applicationtest.applicationtestcompanyx.services.threadtestRunnable run
SEVERE: null
org.hibernate.HibernateException: No Hiberna...
Hi. I want to ask where do i put my external javascript files and how to access them in the page. I have a problem with getting the relative path for my javascript files.
...
I have application that look like below
without spring (prior)
UI-> service --> javabean
p.s: my ui call service (not using DI) and i want to remain this way
new service()
I want my javabean to do DI for certain bean from applicationcontext.xml file.
Should i use Applicationcontext.getBean(the ..xml) file in javabean or is th...
I am currently new to web programming and is trying out to learn spring framework. I have basic understanding on Servlets and JSP.
Currently, I am confused on the property cacheSecond on the Spring Controller. Can anybody point me to resource where I could understand below concepts?
I made some reading on browser caching but I am not...
In my project Spring manages connection pool with org.apache.commons.dbcp.BasicDataSource class. Is possible to get how many connections are free or used in current time?
Thanks.
...
I need to inject a Spring bean into a Seam context. Unless I declare the spring bean as a EJB, I cannot get it injected into other seam-managed components. But when I do this, all the spring injected fields are usless cause Seam creates new instances at run-time.
I also tried to add the <seam:component/> element to the spring bean defi...
Hi everybody!
I'm trying to configure Spring+Hibernate+JPA for work with two databases (MySQL and MSSQL)
my datasource-context.xml:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springframework.org/schema/a...
I'm not a Java programmer by any sense, so I apologize if this is a stupid question. I have a service that was given to me, that basically searches the inventory of a future partner. The file they sent is a compiled .jar file, and a wsdl file. The read me file states that it can be used with XFire or CXF. The question is, how do I set th...
Hi,
what is the advantage of using @configurable compared to on bean that not managed by bean doing di by applicationcontext.getbean? any anyone list pro and cons?
...