ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher.Mathru...@sybase.com
Subject RE: [2.2.0] Use case for ResultObjectFactory
Date Thu, 31 Aug 2006 06:25:14 GMT
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii" 
format="flowed" plain; text Content-Type: 7bit Content-Transfer-Encoding:>
<META content="MSHTML 6.00.2900.2963" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=253281006-31082006><FONT color=#0000ff

size=2>I was one of the requestors of this functionality. The practical use case 
for this was to be able to specify an object factory that could instantiate 
objects rather than having iBatis use the newInstance() method. This would allow 
for someone to specify an object factory that could potentially return objects, 
for example, from the Spring container. While the interface does define an API 
for creating such an object factory it is incomplete of what is actually needed. 
The interface defines a way to return requested objects but requires that the 
implementing class provide a no argument constructor. This has some serious 
limitations. </FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=253281006-31082006><FONT color=#0000ff

size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=253281006-31082006><FONT color=#0000ff

size=2>To better complete this requirement we need a way to inject the 
ResultObjectFactory into iBatis rather that iBatis instantiating the 
implementation. While I have found a way to get this to work within the Spring 
container I feel that it is less than elegant and would welcome the ability to 
inject the ResultObjectFactory into iBatis.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=253281006-31082006><FONT color=#0000ff

size=2></FONT></SPAN>&nbsp;</DIV>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> Jan Vissers &lt;Jan.Vissers@cumquat.nl&gt;

[mailto:Jan Vissers &lt;Jan.Vissers@cumquat.nl&gt;] <BR><B>Sent:</B>
Wednesday, 
August 30, 2006 10:30 PM<BR><B>To:</B> 
user-java@ibatis.apache.org<BR><B>Subject:</B> [2.2.0] Use case for 
ResultObjectFactory<BR></FONT><BR></DIV>
<DIV></DIV>I'm trying to figure out why/when/how one would use a 
<BR>ResultObjectFactory - does anybody have a real practical use case for it? 
<BR><BR><BR><BR></BODY></HTML>


Mime
View raw message