diff options
author | Joachim Lingner <jl@openoffice.org> | 2002-09-16 11:30:42 +0000 |
---|---|---|
committer | Joachim Lingner <jl@openoffice.org> | 2002-09-16 11:30:42 +0000 |
commit | baf2cbd97e2465f25c1fb46f1c1dbe640bb37f9a (patch) | |
tree | f3fee30a0fae5e9cef4bb456f520ac49a57fcd7e | |
parent | 529868ac4043f5bed56057d924f79571cccd4daf (diff) |
#1003002# java error handling: on linux reboot necessary after jvmsetup, interaction handler only gets XInteractionAbort
-rw-r--r-- | stoc/source/javavm/interact.cxx | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/stoc/source/javavm/interact.cxx b/stoc/source/javavm/interact.cxx index 6283ba5412ed..1123eaad4127 100644 --- a/stoc/source/javavm/interact.cxx +++ b/stoc/source/javavm/interact.cxx @@ -2,9 +2,9 @@ * * $RCSfile: interact.cxx,v $ * - * $Revision: 1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: jl $ $Date: 2002-07-23 14:07:16 $ + * last change: $Author: jl $ $Date: 2002-09-16 12:30:42 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -60,6 +60,11 @@ ************************************************************************/ #include "interact.hxx" +#ifndef _COM_SUN_STAR_JAVA_JAVADISABLEDEXCEPTION_HPP_ +#include <com/sun/star/java/JavaDisabledException.hpp> +#endif + + namespace stoc_javavm { @@ -120,12 +125,32 @@ SAL_CALL InteractionRequest::getContinuations( ) throw (RuntimeException) MutexGuard guard(javavm_getMutex()); if( ! m_pseqContinuations) { +#ifdef LINUX + // Only if java is disabled we allow retry + if( m_anyRequest.getValueType() == getCppuType( (JavaDisabledException*)0)) + { + Reference<XInteractionContinuation> arObjs[2]; + arObjs[0]= Reference< XInteractionContinuation >( + static_cast<XWeak*> (new InteractionRetry(m_xJVM, m_pJVM)), UNO_QUERY); + arObjs[1]= Reference< XInteractionContinuation> ( + static_cast<XWeak*> (new InteractionAbort(m_xJVM, m_pJVM)), UNO_QUERY); + m_seqContinuations= Sequence< Reference< XInteractionContinuation> >( arObjs, 2); + } + else + { + Reference<XInteractionContinuation> arObjs[1]; + arObjs[0]= Reference< XInteractionContinuation> ( + static_cast<XWeak*> (new InteractionAbort(m_xJVM, m_pJVM)), UNO_QUERY); + m_seqContinuations= Sequence< Reference< XInteractionContinuation> >( arObjs, 1); + } +#else Reference<XInteractionContinuation> arObjs[2]; arObjs[0]= Reference< XInteractionContinuation >( static_cast<XWeak*> (new InteractionRetry(m_xJVM, m_pJVM)), UNO_QUERY); arObjs[1]= Reference< XInteractionContinuation> ( static_cast<XWeak*> (new InteractionAbort(m_xJVM, m_pJVM)), UNO_QUERY); m_seqContinuations= Sequence< Reference< XInteractionContinuation> >( arObjs, 2); +#endif } } return m_seqContinuations; |