Re: support

2006-02-09 Thread Manuel . Raedle

Hello,

I will have access to other DAO instances
within a DAO instance to have access to other data infos. Therefore I need
the context id of current DAO instance.

For example:

I have a UserSqlMapDao and a GroupSqlMapDao.

I support requesting users with group
infos. Therefore I will request all groups from the GroupSqlMapDao within
the UserSqlMapDao class.
I support also more than one database
so I need the context id.

Best regards
Manuel 

PRÜFTECHNIK Condition Monitoring 
Franz-Bayer-Straße 14
D-88213 Ravensburg
http://www.pruftechnik.com
Tel: +49 (0)751 76956-12
Fax: +49 (0)751 76956-79

-





Larry Meadors [EMAIL PROTECTED]

Sent by: [EMAIL PROTECTED]
09.02.2006 16:44



Please respond to
dev@ibatis.apache.org





To
dev@ibatis.apache.org


cc



Subject
Re: support








What is it that you are trying to accomplish with
this?

Larry


On 2/9/06, [EMAIL PROTECTED] [EMAIL PROTECTED]
wrote:

 Hello developers

 Can you support getting context (id) informations within a DAO impl
 instance?

 There is only a access to the daoManager instance that is set in the
 constructor of each DAO implementation in
 class XMLDaoManagerBuilder in method private DaoImpl
parseDao(Element
 element, StandardDaoManager daoManager, DaoContext daoContext)
 {...Constructor constructor = daoClass.getConstructor(new
 Class[]{DaoManager.class});...}

 If I have access to the context (id) I can call other DAO impls within
a DAO
 impl with the same context id.

 I think there are many ways to support that:

 1. add a second constructor to DAO impls that sets the DaoContext
in
 addition to the DaoManager (so I can call the method
 this.daoManager.getDao(DAO_name.class, this.daoContext.getId())
 2. add a method to DaoManager that returns the context id for current
DAO
 instance (so I can call the method this.daoManager.getDao(DAO_name.class,
 requested_context_id)
 3. add a method to DaoManager that returns a DAO instance within the
same
 context of current DAO instance (like
 this.daoManager.getDao(DAO_name.class, this)

 What do you think of this?

 Best regards
 Manuel Rädle
 Entwicklung

 PRÜFTECHNIK Condition Monitoring
 Franz-Bayer-Straße 14
 D-88213 Ravensburg
 http://www.pruftechnik.com
 Tel: +49 (0)751 76956-12
 Fax: +49 (0)751 76956-79

 -



sql maps running with MS SQL, Access and ORACLE

2005-09-07 Thread Manuel . Raedle
Hello all,

 I use iBATIS to access ORACLE, MS SQL and other databases (with the same 
SQL
 maps).

 To access ORACLE databases I have following connection URL:

 Connection URL: jdbc:oracle:thin:@cm_ora_test:1521:webtest

 webtest indicates the SID of the ORACLE database.

 The problem is that under webtest more than one databases could 
managed.
 So for each db query I must put the database name in front of the table 
name
 such like this:

 select * from VIBSCANNER.T_ALARM_BAND ... (VIBSCANNER is the database
 name).

 For MS Access, MY SQL, ... I couldn't take the same SQL maps and that is 
not
 nice.

 Can you tell me, how I could resolve this problem, e.g. indicate also a
 scheme in the connection URL
 (jdbc:oracle:thin:@cm_ora_test:1521:webtest)?

 Regards

 Manuel