Stopping Sicstus Prolog query via Jasper

From: Ben (nospam_at_nospam.com)
Date: 09/18/04


Date: Sat, 18 Sep 2004 00:43:23 GMT

Hi,

Sorry if this is off-topic, but I have tried everywhere to get help on this
and this is the most relevent newsgroup I can find.

I am writing an application which uses Sicstus Prolog as the back-end and
Java for the front-end. Java sets up a query and then uses the Sicstus'
Jasper API to get a result from Sicstus Prolog. These queries can take a
long time and I need to be able to allow the user to cancel them from the
Java interface.

My problem is that I cannot find a way to stop queries in Jasper once they
have been started. The SICStus class has a "stopServer" method, but this
does not stop all the queries when it is called like you think it would.

I have looked a variety of hacky solutions that I can use. For example,
having a callback to Java in my query inner loop which asks a Java method
periodically if it should quit or not. These types of solutions aren't
great however, because Sicstus could easily hang the whole application if
something went wrong and it increases the coupling of the two programs.

Any ideas of how I could make the Prolog query end on the users request
would be greatly appreciated.



Relevant Pages

  • Re: dynamic type checking - a pauline conversion?
    ... to actually write the code in Java. ... Is the query handled ... One of the problems with Java typing is small differences in interfaces ... array iteration, List iteration, and database query result iteration all ...
    (comp.object)
  • Re: Oracle Prepared statement, taking too long for complex calculations.
    ... I have two tables A30DayUsage and A90DayUsage. ... Now for the values in resCalculation table are very complex. ... Java, in SQL*Plus? ... your queries on these two tables, then you should perhaps also look at ...
    (comp.lang.java.programmer)
  • RE: Slow response time from Java compared to Query Analyzer
    ... Slow response time from Java compared to Query Analyzer ... Please reply only to the newsgroups. ...
    (microsoft.public.sqlserver.jdbcdriver)
  • Embedded SQL in Java classes
    ... I am currently working with BMP EJBs and Oracle 8.1.7. ... Hides dependencies on database objects ... So I would prefer to move this logic out of the Java and back into the ... simplifying the Java end queries. ...
    (comp.lang.java.databases)
  • Re: Query LDAP from Linux??
    ... > I have a developer that wants to be able to query AD ... > using a Java based Linux app, what to I need to tell him ... have to explicitly send a bind request with the DN of a domain account. ... This should be no problem with any Java LDAP API ...
    (microsoft.public.windows.server.active_directory)