Question
Anyone worked with custom Queues?
Just looking for tips and pitfalls to avoid. I am considering adding
another listener to the system to listen on various events of a subset
of parts (soft-types). If any action is to be taken, it does not have to
be processed right away and I want to avoid the listener blocking the
primary event from continuing. Basically, I have an outside database of
parts records I want to keep in sync with parts in PDMLink.
I am thinking of creating my own processing queue and have the listener
add entries (ProcessingQueue.addEntry(...)) to the queue. I can then
use the same process to do periodic syncs of the records (queue up all
the qualifying part records). API looks pretty straight forward. Am I
correct in assuming the following:
addEntry takes the following:
public QueueEntry
<file: c:\ptc\windchill_9.1\windchill\codebase\wt\clients\library\api\<br="/>wt\queue\QueueEntry.html> addEntry(WTPrincipal
<file: c:\ptc\windchill_9.1\windchill\codebase\wt\clients\library\api\<br="/>wt\org\WTPrincipal.html> princ,
String
<">http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html>
t_method,
String
<">http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html>
t_class,
Class
<">http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Class.html> []
arg_types,
Object
<">http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html> [] args)
throws WTException
<file: c:\ptc\windchill_9.1\windchill\codebase\wt\clients\library\api\<br="/>wt\util\WTException.html>
The processing queue executes the QueueEntry which calls the class and
method above passing in the arguments and argument class types above.
This uses reflection, no?
another listener to the system to listen on various events of a subset
of parts (soft-types). If any action is to be taken, it does not have to
be processed right away and I want to avoid the listener blocking the
primary event from continuing. Basically, I have an outside database of
parts records I want to keep in sync with parts in PDMLink.
I am thinking of creating my own processing queue and have the listener
add entries (ProcessingQueue.addEntry(...)) to the queue. I can then
use the same process to do periodic syncs of the records (queue up all
the qualifying part records). API looks pretty straight forward. Am I
correct in assuming the following:
addEntry takes the following:
public QueueEntry
<file: c:\ptc\windchill_9.1\windchill\codebase\wt\clients\library\api\<br="/>wt\queue\QueueEntry.html> addEntry(WTPrincipal
<file: c:\ptc\windchill_9.1\windchill\codebase\wt\clients\library\api\<br="/>wt\org\WTPrincipal.html> princ,
String
<">http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html>
t_method,
String
<">http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html>
t_class,
Class
<">http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Class.html> []
arg_types,
Object
<">http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html> [] args)
throws WTException
<file: c:\ptc\windchill_9.1\windchill\codebase\wt\clients\library\api\<br="/>wt\util\WTException.html>
The processing queue executes the QueueEntry which calls the class and
method above passing in the arguments and argument class types above.
This uses reflection, no?

