Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 37914 invoked from network); 18 Sep 2005 18:01:33 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 18 Sep 2005 18:01:33 -0000 Received: (qmail 13594 invoked by uid 500); 18 Sep 2005 18:01:32 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 13544 invoked by uid 500); 18 Sep 2005 18:01:31 -0000 Mailing-List: contact user-java-help@ibatis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user-java@ibatis.apache.org Delivered-To: mailing list user-java@ibatis.apache.org Received: (qmail 13524 invoked by uid 99); 18 Sep 2005 18:01:31 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 18 Sep 2005 11:01:31 -0700 X-ASF-Spam-Status: No, hits=0.1 required=10.0 tests=HTML_50_60,HTML_MESSAGE,RCVD_BY_IP,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of clinton.begin@gmail.com designates 72.14.204.206 as permitted sender) Received: from [72.14.204.206] (HELO qproxy.gmail.com) (72.14.204.206) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 18 Sep 2005 11:01:40 -0700 Received: by qproxy.gmail.com with SMTP id o38so148859qbe for ; Sun, 18 Sep 2005 11:01:28 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:references; b=VM9rAgEbySE8B0+73OrcwT5NGmgrXwnyZWxl/FoXFnkvH9Ow83/zvZZ5SPytPYvnVsbUFtUj28mWnopftfSRRDAkDrLD01AnzXgch9cG2VjS9lzp1D7klYoCHQhLJhqPHpEnEosqCJALyq+l/iUfS3x+Lhpcp17RHtHAmigM/tQ= Received: by 10.65.23.2 with SMTP id a2mr25785qbj; Sun, 18 Sep 2005 11:01:28 -0700 (PDT) Received: by 10.64.10.17 with HTTP; Sun, 18 Sep 2005 11:01:28 -0700 (PDT) Message-ID: <16178eb1050918110172c407bd@mail.gmail.com> Date: Sun, 18 Sep 2005 12:01:28 -0600 From: Clinton Begin Reply-To: clinton.begin@gmail.com To: user-java@ibatis.apache.org Subject: Re: Loading SqlMaps relative to SqlMapConfig.xml In-Reply-To: <001201c5bc69$90d7fff0$65f2fea9@vrc840> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_27330_28716443.1127066488278" References: <16178eb10509180800265d7c50@mail.gmail.com> <001201c5bc69$90d7fff0$65f2fea9@vrc840> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N ------=_Part_27330_28716443.1127066488278 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline So you trust your clients then? Fair enough I suppose, I would still=20 recommend against database connections over a LAN/WAN directly from a rich= =20 client. You'd be better off with a web service or even a proprietary=20 protocol. In any case, you can't load relative to the SqlMapConfig.xml file, but you= =20 can set it programmatically by using a property. For example: You can then either fix the property in a file, or pass the properties=20 programmatically to the SqlMapClientBuilder. Cheers, Clinton On 9/18/05, Volker_Reichel@t-online.de wrote: >=20 > Hi Clinton, > client and webserver could authenticate eachother using https and=20 > certificates. > Volker > =20 > -----Urspr=FCngliche Nachricht----- > *Von:* clinton.begin@gmail.com [mailto:clinton.begin@gmail.com]*Im Auftra= g=20 > von *Clinton Begin > *Gesendet:* Sonntag, 18. September 2005 17:01 > *An:* user-java@ibatis.apache.org > *Betreff:* Re: Loading SqlMaps relative to SqlMapConfig.xml >=20 > Before we answer that question... >=20 > How do you plan on securely distributing the SqlMapConfig via a webserver= ? >=20 > Clinton >=20 > On 9/18/05, Volker_Reichel@t-online.de =20 > wrote:=20 > >=20 > > Hi, > >=20 > > I'm new to iBATIS and alread read alot through the documentation=20 > > but I couldn't find a way to load sqlmaps relative to the location > > of SqlMapConfig.xml. It seems as if contents of attribute 'resource' > > is not resolved relative to the location where the SqlMapConfig was=20 > > loaded.=20 > > Is there a way to achieve relative loading of SqlMaps? > >=20 > > The background of my questions is as follows: > > Suppose a client application would load the SqlMaps from a webserver. > > Doing so would eliminate the problem of distributing the SqlMaps and=20 > > SqlMapConfig file to all remote clients. > >=20 > > Kind regards > >=20 > > Volker > >=20 >=20 > ------=_Part_27330_28716443.1127066488278 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline
So you trust your clients then?  Fair enough I suppose, I would still recommend against database connections over a LAN/WAN directly from a rich client.  You'd be better off with a web service or even a proprietary protocol.

In any case, you can't load relative to the SqlMapConfig.xml file, but you can set it programmatically by using a property.  For example:

<sqlMap url=3D"${baseURL}/Product.xml">
<sqlMap url=3D"${baseURL}/Category.xml">
<sqlMap url=3D"${baseURL}/Customer.xml">

You can then either fix the property in a file, or pass the properties = programmatically to the SqlMapClientBuilder.

Cheers,
Clinton

On 9/18/05, Volker_Reichel@t-online.d= e <volker_reichel@= t-online.de > wrote:
Hi=20 Clinton,
=  
client=20 and webserver could authenticate eachother using https and=20 certificates.
=  
=  
Volker<= /span>
=  
=  
=  
-----Urs= pr=FCngliche Nachricht-----
Von:=20 clinton.begin@gmail.com [m= ailto: clinton.begin@gmail.com]Im Auftrag von=20 Clinton Begin
Gesendet: Sonntag, 18. September 2005=20 17:01
An: user-j= ava@ibatis.apache.org
Betreff: Re: Loading=20 SqlMaps relative to SqlMapConfig.xml

Before we answer that=20 question...

How do you plan on securely distributing the SqlMapCon= fig=20 via a webserver?

Clinton

On 9/18/05, Volker_Reichel@t-online.d= e =20 <volker_reichel@t-online= .de=20 > wrote:
Hi,

I'm= =20 new to iBATIS and alread read alot through the documentation
but I= =20 couldn't find a way to load sqlmaps relative to the location
of=20 SqlMapConfig.xml. It seems as if contents of attribute 'resource'
is= not=20 resolved relative to the location where the SqlMapConfig was loaded. Is=20 there a way to achieve relative loading of SqlMaps?

The backgrou= nd of=20 my questions is as follows:
Suppose a client application would load = the=20 SqlMaps from a webserver.
Doing so would eliminate the problem of=20 distributing the SqlMaps and
SqlMapConfig file to all remote=20 clients.

Kind=20 regards

Volker


------=_Part_27330_28716443.1127066488278--