Call in process VM from new Thread

Hi!
I have a c++-Project that creates a jvm in the main-Thread. Then a new thread is created. In the new thread I'm calling a Java-function ( packageFoo.ClassFoo.fooFunction() in foo.jar).
The function (fooFunction) is executed correctly until a point where an other class of an other package (in an other jar-file) (packageBar.ClassBar in bar.jar) is to be created. Here a ClassNotFoundException is thrown ("ClassNotFoundException: packageBar/ClassBar").
The ClassNotFoundException is not thrown if I call fooFunction out of the thread where the JVM is created.
The new Thread is registered with AttachCurrentThread and System.getProperty("java.class.path"), called directly before the exception is thrown, seems to be ok.

hi once again.
after some hours of searching:
The problem does't depend on classpath etc. but on jndi:
I can instance packageBar.classBar without problems directly. But classFoo.fooFunction uses JNDI.
I also found a bug-report:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4307751
and a discussion whit a similar problem
http://forum.java.sun.com/thread.jspa?forumID=40&threadID=432365
where it is said that the context classloader should be reset to solve the problem.
Well, I dont know to what to reset the classloader. I tried to save the classloader from thread A and set it in thread B but it didnt work so surely I did something wrong. Can somebody help me?

Similar Messages

  • How to call a sequence in a new thread from C++ dll

    Here is what I am trying to do:
    I implemented a dll that monitors network traffic, and it also supports message handlers that can be triggered when a specific message has been received. Essentially the receipt of a message is like an event causing additional code to be executed. What I need to do is have the message handler in the dll call/execute a sequence (either is the same sequence file that originally called the dll, or in a different sequence file). Also I want the sequence to be executed within the same execution object for the purpose of result collection and report generation. I am expecting the dll to have to launch a new thread to call a sequence because of the asynchronous nature of the message received event.
    There are easier ways to achieve the same result, but one of my goals is to make it easy for a test developer to configure a message handler, by having only one step in their sequence to configure the message handler. I want the rest to be transparent to the user.
    I am unsure about how to implement this feature, so I am asking for any examples, ideas, comments before I start trying things out.

    Assuming that I understand your question correctly, it would seem to be the best way to do this would be to pass the Execution object to the DLL (either through a direct pass of the Execution object or passing the sequence context, from which you can get the Execution).  Then simply call Execution.NewThread, specifying the SequenceFile object (accessible from Engine.GetSequenceFileEx) and then passing the Thread object out as an output.  Your sequence file in which your DLL is called could then simply have a Wait step which is configured to wait on that Thread object.  What happens in this case is that the results are collected for that thread (which is being executed asynchronously) and returned as the results for the Wait step.
    Although you are probably not using LabVIEW, I have attached an example of this in LabVIEW that might be helpful just for seeing the flow.
    Thanks,
    Andy McRorie
    NI R&D
    Attachments:
    thread_test.seq ‏32 KB
    testthread.vi ‏19 KB

  • Why can't I make call to parse HTML from inside Thread?

    This is driving me crazy. With a defined HTMLEditorKit.ParserCallback object "callback", I am attempting to parse an HTML document retrieved from a URL by using:
    new ParserDelegator().parse(new InputStreamReader(url.openStream( )), callback, true);
    It doesn't work if I initiate the call in any way from within the run method of a Thread subclass (the way I'd like to do it). If I make the call in the constructor of the Thread subclass, however, it runs fine. I know it must have something to do with the fact that parse runs in a Thread of it's own - but the way to fix it isn't apparent to me.
    I would appreciate some words from people who might know what's happening here... THANKS in advance.

    Don't bother - figured it out - thanks.

  • Aperture processing images from new Canon 5D mark II

    Hi, I'm wondering if anyone has attempted to process images from the new 5D mark II with aperture. It's my understanding that aperture cannot process the images as of yet.
    Also, does anyone know if there is or if there will be a plug in available for aperture to process the images?
    Thanks,
    Trish

    http://discussions.apple.com/thread.jspa?threadID=1809782&tstart=0

  • Calling a sequence in a new thread with different values

    I have a sequence that I want to call that runs in parallel (seperate thread). The question I have is that I want to run this sequence from a lot of different places, but with different values of the variables going into the steps inside the sequence.
    If I change the values inside the sequence (running on seperate thread), then I will have to duplicate this sequence over and over. What I really want to be able to do is run a step in a seperate thread, and not wait for it to complete. Is this possible? Or a method of passing step values into a seperate thread. I don't want to use globals unless I really have to.

    Hi ADL,
    I have attached an example which I hope will illustrate an answer to your question.
    Regards
    Ray Farmer
    Regards
    Ray Farmer
    Attachments:
    Sequence_File.seq ‏34 KB

  • Problem when calling BPEL process (WS) from APEX

    I am trying to add a web service call to a BPEL process I have created (tried a few others aswell), but every time I try to add the WDSL file I get the following error:
    *1 error has occurred*
    The WSDL document contains multiple SOAP bindings. Application Express only supports WSDL's with one SOAP binding. Click Create Web Service Reference Manually to continue creating a reference for this service.
    It is a simple BPEL process which works fine when called from the BPEL Console, however I have no success when calling it from APEX.
    Am I doing something wrong, or is there a bug in BPEL/APEX?
    Oracle BPEL Console v10.1.3.1.0
    Apex: 3.2
    The WDSL looks like this:
    <definitions name="BPELProcess9" targetNamespace="http://xmlns.oracle.com/BPELProcess9">

    <types>

    <schema>
    <import namespace="http://xmlns.oracle.com/BPELProcess9" schemaLocation="BPELProcess9.xsd"/>
    </schema>

    <schema>
    <import namespace="http://schemas.xmlsoap.org/ws/2003/03/addressing" schemaLocation="http://xxx:8888/orabpel/xmllib/ws-addressing.xsd"/>
    </schema>
    </types>

    <message name="BPELProcess9ResponseMessage">
    <part name="payload" element="tns:BPELProcess9ProcessResponse"/>
    </message>

    <message name="BPELProcess9RequestMessage">
    <part name="payload" element="tns:BPELProcess9ProcessRequest"/>
    </message>

    <message name="WSAReplyToHeader">
    <part name="ReplyTo" element="wsa:ReplyTo"/>
    </message>

    <message name="WSARelatesToHeader">
    <part name="RelatesTo" element="wsa:RelatesTo"/>
    </message>

    <message name="WSAMessageIDHeader">
    <part name="MessageID" element="wsa:MessageID"/>
    </message>

    <portType name="BPELProcess9Callback">

    <operation name="onResult">
    <input message="tns:BPELProcess9ResponseMessage"/>
    </operation>
    </portType>

    <portType name="BPELProcess9">

    <operation name="initiate">
    <input message="tns:BPELProcess9RequestMessage"/>
    </operation>
    </portType>

    <binding name="BPELProcess9Binding" type="tns:BPELProcess9">
    <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>

    <operation name="initiate">
    <soap:operation style="document" soapAction="initiate"/>

    <input>
    <soap:header message="tns:WSAReplyToHeader" part="ReplyTo" use="literal" encodingStyle=""/>
    <soap:header message="tns:WSAMessageIDHeader" part="MessageID" use="literal" encodingStyle=""/>
    <soap:body use="literal"/>
    </input>
    </operation>
    </binding>

    <binding name="BPELProcess9CallbackBinding" type="tns:BPELProcess9Callback">
    <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>

    <operation name="onResult">
    <soap:operation style="document" soapAction="onResult"/>

    <input>
    <soap:header message="tns:WSARelatesToHeader" part="RelatesTo" use="literal" encodingStyle=""/>
    <soap:body use="literal"/>
    </input>
    </operation>
    </binding>

    <service name="BPELProcess9">

    <port name="BPELProcess9Port" binding="tns:BPELProcess9Binding">
    <soap:address location="http://xxxx:8888/orabpel/default/BPELProcess9/1.1"/>
    </port>
    </service>

    <service name="BPELProcess9CallbackService">

    <port name="BPELProcess9CallbackPort" binding="tns:BPELProcess9CallbackBinding">
    <soap:address location="http://set.by.caller"/>
    </port>
    </service>

    <plnk:partnerLinkType name="BPELProcess9">

    <plnk:role name="BPELProcess9Requester">
    <plnk:portType name="tns:BPELProcess9Callback"/>
    </plnk:role>

    <plnk:role name="BPELProcess9Provider">
    <plnk:portType name="tns:BPELProcess9"/>
    </plnk:role>
    </plnk:partnerLinkType>
    </definitions>

    Allow me to reply to my own thread, for the benefit of any others who might want to invoke a BPEL WS from APEX facing the same problem:
    Apex does not seem to like asynchronous BPEL processes so the trick is to make a synchronous BPEL process call the asynchronous BPEL process.

  • Calling BW Process chain from Visual Composer

    Hi Gurus,
    i have a question. Does anyone testet to call an ABAP program or a process chain in BW (via ABAP) through a button in visual composer?
    Regards,
    Adem

    Hi Adem,
    this is possible, you must write an RFC function module,
    which calls a function module of the function group
    RSSM_PROCESS.
    For example you want to start a attribute change run you have to call the function module RSSM_PROCESS_ATTRIBCHANGE
    from your RFC function module.
    Best Regards,
    Marcel

  • How to call OWB Process Flow from APEX?

    Hello.
    I was wondering if there is a way that I can have a OWB process flow kick off from a button in APEX? I know you can have APEX perform PL/SQL upon being clicked, so I am wondering if there is a way that I can do the same for a process flow? We are looking to have a manual kick off for a job and we are trying to use APEX for this. Any information would be great!
    Thank you

    Hi,
    Using SOAP ?if there is a way ... please provide some examples.
    I finished my EDQ process, and now i am trying to find how to call it from APEX
    My web service WSDL is
    <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
      <soap:Header/>
      <soap:Body>
        <dn:request xmlns:dn="http://www.datanomic.com/ws" id="?">
          <dn:record>
            <dn:ID>?</dn:ID>
          </dn:record>
        </dn:request>
      </soap:Body>
    </soap:Envelope>You did not state your Apex version. If you are on 4.x then see
    Creating a Web Service Reference Based on a WSDL
    Cheers,

  • Calling 2 processes simultaneously from a single process

    Hi,
    I have 3 processes.
    Process1
    Process2
    Process3
    I have to call Process2 and Process3 simultaneously from Process1
    The code I am having is as follows,
    ==========================================================
    PROCEDURE RELATIONSHIP_CODE_CHECK
    p_Cart_Id               IN          misibe_ext_quote_details.QUOTE_HEADER_ID%TYPE,
    p_Rel_Code_EndUser          OUT          misibe_ext_quote_details.RELATIONSHIP_CODE%TYPE
    p_Rel_Code_Reseller          OUT          misibe_ext_quote_details.RELATIONSHIP_CODE%TYPE
    ) IS
    v_Relationship_Code          misibe_ext_quote_details.RELATIONSHIP_CODE%TYPE;
    CURSOR v_Cust_Val_Cur IS
         SELECT
              RELATIONSHIP_CODE
         FROM
              MISIBE_EXT_QUOTE_DETAILS
         WHERE
              QUOTE_HEADER_ID = p_Cart_Id;
    BEGIN
    FOR v_Cust_Val_Cur_Data in v_Cust_Val_Cur LOOP
         IF v_Cust_Val_Cur_Data.RELATIONSHIP_CODE = 'RESELLER' THEN
              p_Rel_Code_Reseller := 'RESELLER';
         ELSIF v_Cust_Val_Cur_Data.RELATIONSHIP_CODE = 'ENDUSER' THEN          
              p_Rel_Code_EndUser := 'ENDUSER';
         END IF;
    END LOOP;
    EXCEPTION
    WHEN OTHERS THEN
    RAISE_APPLICATION_ERROR (-20007, SQLERRM);
    ROLLBACK;
    END RELATIONSHIP_CODE_CHECK;
    ===========================================================
    Another procedure and calling the first one in that.
    PROCEDURE DATA_CHECK_FOR_MPROCESS
         ITEMTYPE          IN          VARCHAR2,
         ITEMKEY          IN          VARCHAR2,
         ACTID               IN          NUMBER,
         FUNCMODE          IN          VARCHAR2,
         RESULTOUT          OUT          VARCHAR2
    ) IS
    v_Rel_Code_EndUser          misibe_ext_quote_details.RELATIONSHIP_CODE%TYPE;
    v_Rel_Code_Reseller          misibe_ext_quote_details.RELATIONSHIP_CODE%TYPE;
    v_Cart_Id               misibe_ext_quote_details.QUOTE_HEADER_ID%TYPE;
    BEGIN
    v_Cart_Id := WF_ENGINE.GetItemAttrText ( itemtype => itemtype, itemkey => itemkey, aname => 'CART_ID');
    RELATIONSHIP_CODE_CHECK(v_Cart_Id,v_Rel_Code_EndUser,v_Rel_Code_Reseller);
         IF v_Rel_Code_EndUser = 'ENDUSER' THEN
              resultout := WF_ENGINE.ENG_COMPLETED||':'||'ENDUSER';
    ELSIF v_Rel_Code_Reseller = 'RESELLER' THEN
    resultout :=WF_ENGINE.ENG_COMPLETED||':'||'RESELLER';
         END IF;
    EXCEPTION
    WHEN OTHERS THEN
    RAISE_APPLICATION_ERROR (-20007, SQLERRM);
    ROLLBACK;
    END DATA_CHECK_FOR_MPROCESS;
    ==========================================================
    So when I use "resultout" at a time only one lookup code can only be used and one process is only called.
    How to use "resultout" to make both the processes run at the same time?
    If it is not possible with "resultout" then what is the other alternative. Please let me know.
    Thanks,

    Hi Ashna,
    You have use three different forms for three buttons. But I think all are commented one.It will also work if you uncomment it.
    Else you can use only one Form without giving action in form tag. Use normal buttons instead of submit type buttons & call different JavaScript functions on onClick event for each button.
    Try this out.
    Ajay

  • Possible to call owb process flwo from trigger?

    Hi,
    We wish to have a trigger which calls a owb process flow.
    Is this possible?
    Anybody an example?
    Using Oracle 11.2.0.3
    Thanks
    Edited by: user5716448 on 12-Sep-2012 08:53

    Hi,
    Thanks but
    Tried this but got following error
    ORA-01919 - role OWB_D_OWBSYS does not exist.
    Even tried in the obsys schema
    Tried controcl centre owner as OWBSYS ( this is where the wb_rt_api_exec.run_task lives).
    declare
       v number;
    begin
      -- Test statements here
    v := POR_execute_code('OWF_LOCN', 'PROCESS', 'WAREHOUSE_PF/POR7/POR_PF', ',', ',');
    DBMS_OUTPUT.PUT_LINE(V);
    end;Also tried the api itself - can execute mapping fine but problem with process flow says task not found/check type name and location
    tried
    works
    DBMS_OUTPUT.PUT_LINE('Result: ' || TO_CHAR(owbsys.wb_rt_api_exec.run_task(
    'TERMSPRD_DECOM_LOCATION','PLSQLMAP','MAP_POR10', null, null, 1)));
    Not working
    DBMS_OUTPUT.PUT_LINE('Result: ' || TO_CHAR(owbsys.wb_rt_api_exec.run_task(
    'OWF_LOCN','ProcessFlow','POR_PF', null, null, 1)));
    Tried WAREHOUSE_PF/POR7/POR_PF and POR_7/POR_PF but still no joy.
    Any ideas?
    Thanks fort your help so far

  • Unable to call  BPM process webserivce  from Proxy in  oracle Service bus

    I created business service in oracle service bus through BPM process WSDL. later Created proxy out of business service. In proxy service MessageFlow I created a route node with service as my BPM process business service. When i invoke proxy I am always getting the following error.
    Request :
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:proc="http://bea.com/albpm/Sapme_test_1/Process">
    <soapenv:Header/>
    <soapenv:Body>
    <proc:startSession>
    <password>Participant</password>
    <user>Participant</user>
    </proc:startSession>
    </soapenv:Body>
    </soapenv:Envelope>
    Response :
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
    <soapenv:Body>
    <soapenv:Fault>
    <faultcode>soapenv:Server</faultcode>
    <faultstring>BEA-380000: General runtime error: socket write error: Connection aborted by peer</faultstring>
    <detail>
    <con:fault xmlns:con="http://www.bea.com/wli/sb/context">
    <con:errorCode>BEA-380000</con:errorCode>
    <con:reason>General runtime error: socket write error: Connection aborted by peer</con:reason>
    <con:location>
    <con:node>RouteNode1</con:node>
    <con:path>request-pipeline</con:path>
    </con:location>
    </con:fault>
    </detail>
    </soapenv:Fault>
    </soapenv:Body>
    </soapenv:Envelope>
    I tried the same example with general webservice instead of BPM Process it is working fine.
    regards,
    pv

    Even Some times I am getting the following error
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
    <soapenv:Body>
    <soapenv:Fault>
    <faultcode>soapenv:Server</faultcode>
    <faultstring>BEA-380000: BAD REQUEST</faultstring>
    <detail>
    <con:fault xmlns:con="http://www.bea.com/wli/sb/context">
    <con:errorCode>BEA-380000</con:errorCode>
    <con:reason>BAD REQUEST</con:reason>
    <con:location>
    <con:node>RouteNode1</con:node>
    <con:path>response-pipeline</con:path>
    </con:location>
    </con:fault>
    </detail>
    </soapenv:Fault>
    </soapenv:Body>
    </soapenv:Envelope>
    regards,
    pv

  • WCF called from Sharepoint - thread abort exception

    Hello,
    we have an SP web part calling WCF service using simple http binding. SP and WCF are located on different servers in different countries, so not at the same machine. Using WCF we send/receive some files, which are processed at the WCF server site, parsed
    and stored to database. It takes some time, of course, but usually not more than minute or 2. On development server it works normally but on production server we are facing problems like
    System.Threading.ThreadAbortException: Thread was being aborted. at System.Net.UnsafeNclNativeMethods.OSSOCK.recv(IntPtr socketHandle, Byte* pinnedBuffer, Int32 len, SocketFlags socketFlags) at System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset,
    Int32 size, SocketFlags socketFlags, SocketError& errorCode) at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size) at System.Net.PooledStream.Read(Byte[] buffer, Int32 offset, Int32 size) at System.Net.Connection.SyncRead(HttpWebRequest
    request, Boolean userRetrievedStream, Boolean probeRead) at System.Net.ConnectStream.ProcessWriteCallDone(ConnectionReturnResult returnResult) at System.Net.HttpWebRequest.GetResponse() at System.ServiceModel.Channels.HttpChannelFactory`1.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan
    timeout) at System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout) at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
    at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation) at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message) at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData&
    msgData, Int32 type) at DHI.FRMP.Sharepoint.Tasks.MCSPConnector.IMCSPConnector.TaskUpdate(TaskUpdateRequest request) at DHI.FRMP.Sharepoint.Tasks.TaskEditSave.TaskEditSave.btnSaveChanges_Click(Object sender, ImageClickEventArgs e)
    or
    System.Threading.ThreadAbortException: Thread was being aborted. at System.Threading.WaitHandle.WaitOneNative(SafeHandle waitableSafeHandle, UInt32 millisecondsTimeout, Boolean hasThreadAffinity, Boolean exitContext) at System.Threading.WaitHandle.InternalWaitOne(SafeHandle
    waitableSafeHandle, Int64 millisecondsTimeout, Boolean hasThreadAffinity, Boolean exitContext) at System.Net.LazyAsyncResult.WaitForCompletion(Boolean snap) at System.Net.Connection.SubmitRequest(HttpWebRequest request, Boolean forcedsubmit) at System.Net.ServicePoint.SubmitRequest(HttpWebRequest
    request, String connName) at System.Net.HttpWebRequest.SubmitRequest(ServicePoint servicePoint) at System.Net.HttpWebRequest.GetRequestStream(TransportContext& context) at System.Net.HttpWebRequest.GetRequestStream() at System.ServiceModel.Channels.HttpOutput.WebRequestHttpOutput.GetOutputStream()
    at System.ServiceModel.Channels.HttpOutput.Send(TimeSpan timeout) at System.ServiceModel.Channels.HttpChannelFactory`1.HttpRequestChannel.HttpChannelRequest.SendRequest(Message message, TimeSpan timeout) at System.ServiceModel.Channels.RequestChannel.Request(Message
    message, TimeSpan timeout) at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout) at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage
    methodCall, ProxyOperationRuntime operation) at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message) at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type) at DHI.FRMP.Sharepoint.Tasks.MCSPConnector.IMCSPConnector.GetTaskCatchmentList(GetTaskCatchmentListRequest
    request) at DHI.FRMP.Sharepoint.Tasks.TaskAdd.ddlWaterRegion_SelectedIndexChanged(Object sender, EventArgs e)
    We have already checked that the client is properly closed and disposed. We also know that the web service call is processed correctly (from the logs).
    Streams are closed.
    Sharepoint timeout for long operation is set to 3600.
    WCF is hosted in windows service application, used .NET 4.0. WCF config:
    <system.serviceModel>
    <client />
    <bindings>
    <basicHttpBinding>
    <binding name="StreamedHTTP" closeTimeout="04:01:00" openTimeout="04:01:00"
    receiveTimeout="04:10:00" sendTimeout="04:01:00" maxBufferSize="2147483647"
    maxReceivedMessageSize="2147483647" messageEncoding="Mtom" transferMode="Streamed">
    <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647"
    maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
    </binding>
    </basicHttpBinding>
    </bindings>
    <services>
    <service name="DHI.FRMP.MCSPConnector.MCSPConnector">
    <endpoint address="" binding="basicHttpBinding" bindingConfiguration="StreamedHTTP"
    contract="DHI.FRMP.MCSPConnector.IMCSPConnector">
    <identity>
    <dns value="localhost" />
    </identity>
    </endpoint>
    <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
    </service>
    </services>
    <behaviors>
    <serviceBehaviors>
    <behavior>
    <!-- To avoid disclosing metadata information,
    set the values below to false before deployment -->
    <serviceMetadata httpGetEnabled="True" httpsGetEnabled="False"/>
    <!-- To receive exception details in faults for debugging purposes,
    set the value below to true. Set to false before deployment
    to avoid disclosing exception information -->
    <serviceDebug includeExceptionDetailInFaults="True"/>
    </behavior>
    </serviceBehaviors>
    </behaviors>
    Client creation code
    public static IMCSPConnectorChannel CreateWCFclient(out ChannelFactory<IMCSPConnectorChannel> factory)
    BasicHttpBinding myBinding = new BasicHttpBinding();
    TimeSpan timeOut = new TimeSpan(4, 1, 0);
    int maxSize = 2147483647;
    myBinding.CloseTimeout = timeOut;
    myBinding.OpenTimeout = timeOut;
    myBinding.ReceiveTimeout = timeOut;
    myBinding.SendTimeout = timeOut;
    myBinding.AllowCookies = false;
    myBinding.BypassProxyOnLocal = false;
    myBinding.HostNameComparisonMode = HostNameComparisonMode.StrongWildcard;
    myBinding.MaxBufferSize = maxSize;
    myBinding.MaxBufferPoolSize = maxSize;
    myBinding.MaxReceivedMessageSize = maxSize;
    myBinding.MessageEncoding = WSMessageEncoding.Mtom;
    myBinding.TextEncoding = System.Text.Encoding.UTF8;
    myBinding.TransferMode = TransferMode.Streamed;
    myBinding.UseDefaultWebProxy = true;
    myBinding.ReaderQuotas.MaxDepth = 128;
    myBinding.ReaderQuotas.MaxStringContentLength = maxSize;
    myBinding.ReaderQuotas.MaxArrayLength = maxSize;
    myBinding.ReaderQuotas.MaxBytesPerRead = maxSize;
    myBinding.ReaderQuotas.MaxNameTableCharCount = maxSize;
    ChannelFactory<IMCSPConnectorChannel> myFactory = null;
    //SPSecurity.RunWithElevatedPrivileges(delegate()
    var constants = new Settings(SPContext.Current.Site);//siteelev);
    string endpointAddress = constants.WcfUrl;
    EndpointAddress myEndpoint = new EndpointAddress(endpointAddress);
    myFactory = new ChannelFactory<IMCSPConnectorChannel>(myBinding, myEndpoint);
    IMCSPConnectorChannel channel = myFactory.CreateChannel();
    factory = myFactory;
    return channel;
    Client and factory are both disposed after each usage.
    this is the simplified code with some comments
    IMCSPConnectorChannel channel = CommonFunctions.CreateWCFclient();
    using (var proxy = channel.Wrap<IMCSPConnectorChannel>())
    var svcClient = proxy.BaseObject;
    try
    // do something - works ok
    if (success)
    //try update
    try
    //time consuming WCF method - sometimes 2 minutes, however it passes and in the WCF log is record about it just a second before it crashes back here
    svcClient.TaskUpdate(new TaskUpdateRequest(_taskID));
    catch (FaultException fe)
    //some processing here - not reached
    catch (Exception ue)
    //here it goes to - exception is caught and
    success = false;
    siteelev.WriteLogError(String.Format("Task '{0}' - task update fail on general exception: {1}", _taskID, ue.ToStringWithInnerExceptions()));
    //previos line is processesd, no more code exists after that
    //go back to folder if WCF returns success
    if (success)
    //not reached (success has been set to false when it crashed)
    else
    siteelev.WriteLogInfo("Some log text");
    //this is ALSO NOT reached!! why, I don't understand
    catch (Exception ee)
    // it goes to here!! why ? - the exception has been already handled!
    throw;;
    I don't understand why it goes to the second catch when the exception has been already hadled in previous catch and why it doesn't go into success=false block.
    Any idea what can be wrong?
    Many thanks
    Filip

    Hi,
    thanks for your reply. Now it seems that everything works (I'm still keepng my fingers crossed ;-)
    What we did:
    1) to the page I added 
    protected void Page_Load(object sender, EventArgs e)
                    this.Page.Server.ScriptTimeout = 3600;
    2) to WCF confing at server side we added 
     <serviceThrottling maxConcurrentCalls="100" maxConcurrentSessions="100"/>
    But if this is what helped, I don't know. The timeout had to be already set in cofig files, but this is only what the SP server administrator claimed, I haven't done it personally. This seems to be much clear
    for me.

  • How can I include the results are coming from a new thread, in the main sequence report?

    Hi,
    I have a main sequence which calls other sequence running in a new thread.
    I cannot see the results (limit test etc.) comming from that sequence.
    Is there any trick to it?
    Andras

    Hi again Andras.
    I got a reply from the technical support. I hope this help you.
    To include in main report the results of your test in another thread you must follow these steps:
    1.- Right click on the sequence call where you create the new thread. In "Specify Module" panel, just right "Run sequence in a new thread" press "Settings" button and disable "Automatically wait for the thread to complete..."
    2.- At the end of your main sequence add a new "synchronization - wait" step. Configure your wait, selecting in the upper ring tab "wait for thread".
    3.- Then select below "specify by sequence call" and pick over your thread name.
    With these changes your main sequence will add the results from your thread to your main sequence report.
    I hope it works for you. (but sadly it doesn't work for me)

  • Calling sequence in a new thread multiple times gives debug warning "reference not released properly"

    Hi,
    I am including steps inside a sequence which calls sub sequences in a new thread. After calling each sub sequence in a new thread, I am putting Wait step which is configured to wait for the respective sub seueqnce to complete its execution. When I include these steps (call a subsequence in a new thread and then configuring wait to complete it) once, it executes properly but when I includes these steps twice, I get debug warning when I close Teststand sequence editor. Due to this behaviour, when I run this sequence through operator interface (Simple OI), I get run time error R6025.
    I checked if there is any object reference which might not be released, but could not figure it out here. Please see attached sequence and the debug warning message.
    Used version: Teststand 4.0.1, LabVIEW 8.5, Windows XP
    Kindly help.
    Thanks in advance,
    Nirmal
    Attachments:
    Sequence_new_thread2.seq ‏37 KB
    Debug Warning2.JPG ‏34 KB

    Hi Nirmal,
    Thanks for the detailed instructions. I tried exactly what you said and I still do not see the leak. The problem is likely specific to something customized on that machine or in the very least does not happen every time or on all machines. I'd recommend trying to narrow down by eliminating the possibility of an unintended customization. If you can try installing a clean install of teststand on a clean machine and see if you can still reproduce the problem then that would help narrow things down a little. If you can't reproduce it on a clean install on a clean machine then I'd start looking at what's different on the machine you can reproduce it on. You could remove your config files to eliminate customizations to settings such as search directories. You could remove files from your components\User directory to eliminate the possibility of using those. Just a few ideas. Other people might have some other ones.
    -Doug

  • JNI calls only work if sent from main thread?!?

    Hi,
    I searched through the forum for a couple of hours now, and found that a lot of developers seem to have problems with JNI and threads. However, I couldn't find a solution to my problem so far...hope you can help!
    We need to send requests to a DDE Server from our Java application. For that reason, we implemented a very small DLL using Delphi, which calls the DDE Server and returns the result as a string. Using JNI, we call this DLL from Java.
    Everything works fine, as long as we call the DDE Server (via JNI and the DLL) from the main thread of the Java application. But everytime we call it from another Java thread, our DDL reports that it can't get a connection to the DDE Server. This is especially awkward if you want to make calls as a reaction to GUI events, since then the call is sent by the Event Dispatch Thread of the Java runtime.
    This does not seem to be a multi-threading problem, since we do never send multiple requests at the same time. It simply depends on the thread, from which the call is sent.
    Any hints are appreciated very much.
    Thanks!
    Thilo

    We are a step further now...thus the problem to be solved changed a little bit.
    The former assumption, that connecting to the DDE server does only work from the main thread was false. It only seemed like that, because we called System.loadLibrary() to in the main thread to load the DLL . In fact, the connection to the DDE server works from any thread - you just have to make sure that System.loadLibrary() is invoked in this same thread.
    This means: if System.loadLibrary() is invoked in the Event Dispatch Thread, we can call the DDE Server from this thread, which is what we primarily wanted to do. So our problem is solved.
    Anyway, I made some more tests to find out, what happens if I start multiple threads, with each of them calling System.loadLibrary(). The result was, that only the first thread is successful. This means: the first thread, which loads the DLL is the only thread that is able to connect to the DDE server. All other threads won't get a connection.
    What could be the reason for that?

Maybe you are looking for

  • Problems with adding a new row in my table

    Im an ADF beginner but I thought it would be simple to to do some basic CRUD stuff in ADF. Im now even struggling when i try to add a new row to my table. Seems that the primary key id is not set correctly... could someone help?

  • Problem with dynamic columns in the BEx report

    Hi Gurus, I am tryging to build some planning application using BI-IP and input ready queries. I'm facing issues with making the columns in the query 'dynamic'. The example is given below: - Lets say there are states and cities for which we have to p

  • Audio Input to Record Old Tape Cassettes?

    Hello, (Apologies in advance if this is the wrong forum.) I have a MacBook Pro. I have a lot audio cassettes that I would like to digitize. Does any body have suggestions on how to do that? Software apps that work well? I'm new to Apple/Mac and need

  • Profile not generated

    Hi all, In transaction PFCG,I have copied a SAP standard role (SAP_BC_USR_CUA_SETUP_CLIENT) to Z_SAP_BC_USR_CUA_SETUP_CLIENT. But in the authorization tab, when I am trying to generate the profiles..it says profiles not generated and it also created

  • Audio levels in logic

    Why is the recording level in Logic way lower then my preamp? If I send a signal into my analog preamp, it's way lower in logic and the wave for is way lower too.