Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

eWay Scheduling

Status
Not open for further replies.

ncaffee

Programmer
Apr 22, 2002
4
0
0
US
I have an eWay with a Java Collab that pulls data from a view in Oracle and writes out the data through another eWay to a flat file. The only problem I have is I cannot stop the eWay from pulling the data from a view more than once. I cannot schedule a stop, because I do not know how long it will take to pull the data. Any suggestions on how to make it stop. The eWay that pulls the data is the triggering event to kick it all off.
 
After pulling all data, shutdown the eway programmatically. EGate.shutdownRequest();
 
That did not work on my Java eWay. I receive the message shutdownRequest() is not available in e*BOB/e*BOS mode!
 
After some additional conversation with SeeBeyond, it was determined that this cannot be done. That is to say, use a multi-mode eway to pull data (from a view in Oracle) only once and cease pulling the data; while using the multi-mode eWay as the trigger. The schedule start works great, but the schedule stop is ineffective since it simply shuts down the eWay without sending outgoing messages. Since I cannot clock the length of time it would take to pull data from the view, I cannot schedule a stop. This in my opinion make the schedule stop useless.
 
hello ncaffee!

I had similar problem and i've found a solution.
But why do You want to stop it ? And do you need to read all record from view each time ?
If not U could define global variable with timestamp of last reading from view and control it programmaticaly.
I mean: read records from view in portions (say 1000 records per session), save timestamp and a sign of last processed record in view. Then check the time, compare it to saved timestamp and read next portion of records (here u'll need the sign of last record processed) if you need.
May be this will not help You, if so - explain your situation.

Regards.
 
Use SeeBeyond Command to stop your eWay when u r done with reading oracle data from the view. This SeeBeyond command will require additional eWay connection which interprets the command issued by your collaboration rule and can shut down/start up the eWay.
 
You don't need any special connection to do this. Here is a sample code to shutdown a eway.

// Set the parameters. May be you can read them from database

String registryHost = "localhost";
String schema = "MyTestSchema";
String controlBroker = "localhost_cb";
String user = "Administrator";
String password = "STC";

// Here the command is shutdown. We can also get the eway name
// programmatically using EGate.getLogicalName() method.
String command = "shutdown ewShutDownTest_MM";

String exeCommand = "";

// Create the shell command to execute
exeCommand = "stccmd -rh " + registryHost + " -rs " + schema + " -cb "
+ controlBroker + " -un " + user + " -up " + password +
" -cmd \"" + command + "\"";

// log some information
EGate.traceln(EGate.TRACE_EVENT_PUTINLOGMASK,
EGate.TRACE_EVENT_INFORMATION, "Sending the shutdown
request to shutdown the eway");
EGate.traceln(EGate.TRACE_EVENT_PUTINLOGMASK,
EGate.TRACE_EVENT_INFORMATION, "Command being
executed = " + exeCommand);

// execute the shell command
Runtime.getRuntime().exec(exeCommand);-
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top