[kepler-users] Database Connection and Database Query
Frank Steinmann
steinman at dfki.uni-kl.de
Mon Dec 3 09:08:24 PST 2007
Hi,
I am using Database Queries in several parts of a complex workflow (i.e.
in different composite actors). Because the queries are all sent to the
same database, I am creating a single database connection and send it to
all actors needing it. Some of the composite actors which have a
Database Query inside need to be fired several times, therefore I am
using the repeat actor to send the database connection token several times.
But the Database Query actor only takes the first token and once it has
a database connection it does not read tokens from the dbcon port
anymore. Looking deeply into the bowels of the SDF kernel I found out
that each port has a queue and the capacity of this queue may be finite
or infinite, where infinite capacity is the default. For some reason the
capacity of the dbcon port of the Database Query actor is set to one
(strangely, this happens only the first time I run the workflow after
opening it, in every following run it is not set explicitely and
therefore infinite).
Now what happens should be clear: When the composite actor (containing
the Database Query) is fired the first time, the db connection token is
send to and taken by the Database Query. When fired the second time,
again a db connection token is send to the Database Query but it is not
taken. When fired the third time, another db connection token shall be
sent to the Database Query, but as the queue capacity is one and there
is already the token from the last iteration in the queue, the token
cannot be sent, which leads to an exception.
How should I handle this correctly? I think in a clean solution the
connection token would be sent only once. But I get an exception when
trying to fire the composite actor without having sent a token to the db
connection port.
Is there a way to fire a composite actor without having tokens at all
input ports (in SDF or DDF domain)?
If not, is there a way to set the capacity of the queue of the dbcon
port to infitity (I would not like this solution, but with infinite
queue capacity it would at least work).
Is there a totally different solution?
Thanks in advance,
Frank
--
Dipl.-Inf. Frank Steinmann
Knowledge Management Department
DFKI GmbH
Tel.: +49 (0)631 20575 - 114
Sekr.: +49 (0)631 20575 - 101
Fax: +49 (0)631 20575 - 103
E-Mail: Frank.Steinmann at dfki.de
-----------------------------------------------------------
Deutsches Forschungszentrum für Künstliche Intelligenz GmbH
Trippstadter Straße 122, D-67663 Kaiserslautern, Germany
Geschäftsführung:
Prof. Dr. Dr. h.c. mult. Wolfgang Wahlster (Vorsitzender)
Dr. Walter Olthoff
Vorsitzender des Aufsichtsrats:
Prof. Dr. h.c. Hans A. Aukes
Amtsgericht Kaiserslautern, HRB 2313
-----------------------------------------------------------
More information about the Kepler-users
mailing list