You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Gordon <go...@zareus.com> on 2003/02/28 01:16:18 UTC
[digester] xmlrules
If I have the following xmlrules and the createObject of DAOFactory
throws an exception, can I have digester continue processing the next
"dao" pattern? Currently it throws the exception and stops processing
the rest of the file.
<pattern value="dao">
<set-properties-rule>
<alias attr-name="name" prop-name="DAOName" />
</set-properties-rule>
<factory-create-rule classname="org.soa4j.dao.manager.DAOFactory"/>
<set-next-rule methodname="addDAO" paramtype="java.lang.Object" />
<set-properties-rule/>
<pattern value="attributes">
<set-properties-rule>
<alias attr-name="name" prop-name="groupName" />
</set-properties-rule>
<pattern value="attribute">
<call-method-rule methodname="setAttribute" paramcount="2" />
<call-param-rule attrname="name" paramnumber="0" />
<call-param-rule attrname="value" paramnumber="1" />
</pattern>
</pattern>
</pattern>
Gordon
Re: [digester] xmlrules
Posted by robert burrell donkin <ro...@blueyonder.co.uk>.
hi gordon
if you're still around, you might like to know that i've committed an
enhancement which (hopeful) does what you requested.
- robert
On Friday, February 28, 2003, at 12:16 AM, Gordon wrote:
> If I have the following xmlrules and the createObject of DAOFactory
> throws an exception, can I have digester continue processing the next
> "dao" pattern? Currently it throws the exception and stops processing
> the rest of the file.
>
> <pattern value="dao">
> <set-properties-rule>
> <alias attr-name="name" prop-name="DAOName" />
> </set-properties-rule>
> <factory-create-rule classname="org.soa4j.dao.manager.DAOFactory"/>
> <set-next-rule methodname="addDAO" paramtype="java.lang.Object" />
> <set-properties-rule/>
> <pattern value="attributes">
> <set-properties-rule>
> <alias attr-name="name" prop-name="groupName" />
> </set-properties-rule>
> <pattern value="attribute">
> <call-method-rule methodname="setAttribute" paramcount="2" />
> <call-param-rule attrname="name" paramnumber="0" />
> <call-param-rule attrname="value" paramnumber="1" />
> </pattern>
> </pattern>
> </pattern>
>
>
> Gordon
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>
[sql] Sybase ddl problems
Posted by "John E. Conlon" <jc...@verticon.com>.
Having a couple of problems using sql to generate or execute Sybase ddl.
1. The first is fairly easy. Looks like a typo in
org.apache.commons.sql.builder.SybaseBuilder at line 96 is causing a line
to be created with erroneous syntax.
println("IF EXISTS (SELECT 1 FROM sysobjects WHERE type ='RI' AND name=''"
at the end of the line name= should be followed by only one single quote
not two.
2. The second problem is that Sybase does not use a timestamp datatype.
This prevents one from using ddl like:
create table management
(
time TIMESTAMP NOT NULL ,
target VARCHAR NOT NULL ,
status VARCHAR NOT NULL ,
PRIMARY KEY (time, target)
);
and instead Sybase uses a datetime datatype so needs ddl like this:
create table management
(
time datetime NOT NULL ,
target VARCHAR NOT NULL ,
status VARCHAR NOT NULL ,
PRIMARY KEY (time, target)
);
Post generation editing of the ddl is really a kludge. Any ideas?
thanks,
John
********************************************
John E. Conlon
Verticon, Inc.
<ma...@verticon.com>mailto:jconlon@verticon.com
<http://www.verticon.com/>http://www.verticon.com
tel: (608) 675-3865
cell: (608) 606-1292
********************************************