Julian-
the only way (i know how) to handle this scenario is to setup a listener which
will incorporate access to threads and thread management in your start method
a good starting point is to view the listener class
org.apache.axis2.transport.mail.SimpleMailListener and look at the start method
way to access worker threads and manage those threads thru ThreadPoolExecutor
BTW if you can ping dims he would know a better way to implement these thread
management scenarios
HTH,
M-
---------------------------------------------------------------------------
This e-mail message (including attachments, if any) is intended for the use of
the individual or entity to which it is addressed and may contain information
that is privileged, proprietary , confidential and exempt from disclosure. If
you are not the intended recipient, you are notified that any dissemination,
distribution or copying of this communication is strictly prohibited.
> Hi,
> i am pretty new to axis.
> I am trying to modify the initialize()-function of a webservice of the
> globus-container.
>
> The origin initialize()-Function looks like that:
> public synchronized void initialize() {
> try {
> MessageContext ctx = MessageContext.getCurrentContext();
> globusLocation = (String)
> ctx.getProperty(org.apache.axis.Constants.MC_CONFIGPATH);
> } catch(Exception e) { ...
>
> This works well as exspected.
> I am now trying to rewrite a new initalize-funktion that usees threads:
> public synchronized void initialize() throws Exception {
> class InitThread extends Thread {
> InitThread() { super(); }
> public void run() {
> try {
> MessageContext ctx = MessageContext.getCurrentContext();
> String globusLocation = (String)
> ctx.getProperty(org.apache.axis.Constants.MC_CONFIGPATH);
> } catch(Exception e) { System.err.println("3:"+e.getMessage()); }
> }
>
> public void test() {
> try {
> MessageContext ctx = MessageContext.getCurrentContext();
> String globusLocation = (String)
> ctx.getProperty(org.apache.axis.Constants.MC_CONFIGPATH);
> } catch(Exception e) { System.err.println("2:"+e.getMessage()); }
> };
> };
> try {
> MessageContext ctx = MessageContext.getCurrentContext();
> String globusLocation = (String)
> ctx.getProperty(org.apache.axis.Constants.MC_CONFIGPATH);
> } catch(Exception e) { System.err.println("1:"+e.getMessage()); }
> InitThread initThread = new InitThread();
> initThread.test();
> initThread.start();
> }
>
> If i start the globus-container, i get "3:null". The exception itself is
> null, i can't get further information about it.
> So, if you look at the code, all ctx.getProperty()-calls finish with success,
> only the one in the run()-method fails.
> Why that? Is there a simple way around that?
>
> Thank you,
> Julian
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>