Tracing in a Custom Biztalk Adapter

Hi,
we have developed a custom adapter in BizTalk for BTS 2013  using the BizTalk Adapter Framework(BAF) approach.
I want to understand how we can implement some tracing in the Adapter code.
Essentially, once deployed to production, if the adapter fails for some reason, I would like to enable a switch to trigger tracing.
Has anyone done anything on this lines?
please assist.
regards,
MS

You can consider implement BizTalk CAT Instrumentation Framework Controller tracing code in your custom adapter.
Microsoft product team uses this in BizTalk extensively. CAT has been used virtually by all major infrastructure components inside the BizTalk runtime, including
EPM, transport adapters, Message Agent, etc.
Once it’s been implement in your code, it provides the full operational flexibility enables switching the tracing on and off as well as changing the trace level
dynamically, making it easy to perform detailed tracing in production environments without requiring reboots or application restarts.
Performance wise, there is no other tracing component can beat this as of now.
Read more about this component from MSDN blog:
Best Practices for Instrumenting High Performance
BizTalk Solutions
Download the code from CodePlex:
http://btscatifcontroller.codeplex.com/
If this answers your question please mark it accordingly. If this post is helpful, please vote as helpful by clicking the upward arrow mark next to my reply.

Similar Messages

  • Biztalk custom File Adapter

    Hi,
    Recently i have faced this below issue. please guide me if any one already faced similar issue. i am using Biztalk server 2013
    "Could not stop the BizTalk Service BizTalk Group : BizTalkServerApplication 
    service on Local Computer. 
    Error 1053: The service did not respond to the stop or control request in a 
    timely fashion
    when i checked event log, i am getting like
    "A timeout was reached (30000 milliseconds) while waiting for the BizTalk Service BizTalk
    Group "
    this is came after i deployed the custom file adapter.
    Actually i took the sdk samples[File Adapter] from biztalk server location path , for doing zero byte file receving process.
    I made few lines of code for promoting few properties.
    then, i used registry file to register the assemblies.
    Now i am able to receive the zero byte files and send the same file to some other location vai send port. It is woking perfectly. 
    but when i tried to restart the host instance , i am getting the above error. i am not sure why it is coming.
    i am sure about that i am getting this error if i am used custom file adaper. since if i run other  biztalk application , i dont have any issue. but if i run , the custom file adapter application . i am able to recreate this issue.
    Also, i debugged, and find out which place i am getting
    this.batch.SubmitMessage(file.Message, file.UserData); this is the method call to push the msg to biztalk db. I think some references object are not removed. when i verified the method call, it goes several event handler function. i am unable to follow that.
    Can any one help me is there any this i need to do in custom file adapter?

    Hi,
    No.it is not hanging in debugger. I am able to process the message . after that stopped the application as well, that means all the received locations are disabled. 
    but when i tried to restart the host instance, Host instance not stopping even when the application was stopped at that time.
    Also i find out one more step. if i just start and stop the application . there is no issue while restarting host instance.
    but after started the app, i tried to put one file in received location [custom file adapter], then the file is picked and the message is send to messagebox DB and send to send port. now i stopped the app, and try to restart the host instance , that time
    i am getting error.
    but if i wait for 1 more minute , service will automatically started. i don't understand this behavior.
    These are the exact below steps i did that in custom file adapter. i followed this url to do the custom file adapter http://ninocrudele.me/2012/07/05/biztalk-and-zero-byte-file/
    1. I took the SDK file adapter samples[runtime, design time and adapter management] in Biztalk installation path.
    2. add few lines of code in PickUpFilesAndSubmit
    // If we couldn’t lock the file, just move onto the next file
    IBaseMessage msg = CreateMessage(fileName, renamedFileName);
    //new code
    MemoryStream ms = new MemoryStream();
    msg.BodyPart.Data.CopyTo(ms);
    msg.BodyPart.Data.Position = 0;
    //new code end
    if ( null == msg )
    continue;
    if ( null == renamedFileName )
    files.Add(new BatchMessage(msg, fileName, BatchOperationType.Submit));
    else
    files.Add(new BatchMessage(msg, renamedFileName, BatchOperationType.Submit));
    //new code
    if (ms.CanSeek)
    ms.Position = 0;
    msg.BodyPart.Data = ms;
    //new code end
    3. build the 3 dlls.
    4. make the path change in the provided registry file and add the entry to the registry.
    5. add the adapter in admin console.
    6. create one application , create one receive port and send port. In the receive port, i used the custom file adapter.
    7. start the application and place one file in receive port . now the file is received and send to send port.
    8. now i  am trying to restart the host instance. that time i am getting the error which i above mentioned. but if i wait for 1 more minute , service will automatically started. i dont understand this behavior.
    Please help me , i facing this issue last few days . i tried maximum .but no clue.  it would be great if you guys provide if i need to check some thing else in the code part .
    Thanks
    Vinoth

  • WCF-Custom Biztalk 2013 - Access to SQL Server 2014 Database

    Hi,
    i don't see nowhere of capability from the Biztalk adapter to access differente version of Sql server.
    I want to send ou receive information with a WCF-Custom from SQL Server 2014, i'm in Biztalk 2013 (not R2 ) it's possible ?
    Do you have a link or a list of version autorized to accessed by the wcf-custom Sql binging ?
    Thanks a lot

    Hi, I can suppose that the main problem for Joao is not if it works in general or not.
    The real problem is that he is not sure if this configuration is officially supported by Microsoft.
    If you are developing an integration project for a client you need to have this guarantee. If not, you can have an unsupported scenario, and if something fails you could have a big problem with your client.
    If I were you, I would talk with the client account manager about this.
    Regards.

  • How to install custom Resource Adapter

    Hi I have writen the java class for the Custome Resource adapter and I loaded the .class file into web-inf classes folder.I followed the installation steps given in the deployement document.In that I am not understanding one step i.e "Install .class file and help file into IDM" How can we do this and How to get the particular resource under Managed Resources tabe of Configure tab./its very urgent for me any kind of help is appriciable.

    Ok, since it is urgent, do it the way Sun/Waveset inserts the adapters.
    1.) Alter your java code to have
    package com.waveset.adapter;
    As your package line.
    2.) Compile the adapter to a class file.
    3.) Grab the idm.jar file from $WSHOME/WEB-INF/lib and copy it to e.g /tmp
    4.) unjar it. jar -vxf idm.jar
    5.) copy the your adapter class file to /tmp/com/waveset/adapter
    6.) jar the archive. jar -cvf idm.jar /tmp/com
    7.) Make a backup of the original idm.jar, and copy the new to the old position replacing the old jar-file. Bounce your app-server.
    8.) Log in as configurator or an administrator with equal capabilities. And add the custom adapter using the previous procedure... although, use the adaper class path
    com.waveset.adapter.YourCustomAdapter
    9.) Go to debug pages and put tracing on the same class file, and tail -f the app-server std out.
    10.) try to configure the adapter. Note any eventual error messages. Post error messages on the forum along with the std out log.
    If your adapter code works, it should work... if not your problems are elsewhere.
    Please not that this set up is not recommended for production environment and if you apply service packs etc this fix will break!

  • Runtime Error Custom Module Adapter 7.31

    Hi experts.
    We've developed a custom module adapter to be used in HTTP_AAE sender adapter. The deployement is successfull, the module is started but we are facing this error at runtime:
    Error in processing caused by: com.sap.aii.adapter.http.api.HttpAdapterException: ERROR_IN_MODULECHAIN, null
    ¿Any idea what can be happening?
    We are working with version 7.31 SP 10 Java only stack installation.
    Thanks a lot.
    Kind regards.
    Christian.

    Hi Amit.
    Thank u so much but your response.
    Regarding your quesion, yes I have done it.
    Regards.
    Christian.

  • Reg :: Exception in custom java adapter module in sap pi

    Hi Experts,
                  I have included custom  java adapter module in SAP PI. I get the below error in sender communication channel  monitoring.
    Error: javax.ejb.TransactionRolledbackLocalException: nested exception is: java.lang.RuntimeException: java.lang.NoClassDefFoundError: org/apache/xml/utils/URI$MalformedURIException; nested exception is: javax.ejb.EJBException: nested exception is: java.lang.RuntimeException: java.lang.NoClassDefFoundError: org/apache/xml/utils/URI$MalformedURIException; nested exception is: javax.ejb.EJBTransactionRolledbackException: nested exception is: java.lang.RuntimeException: java.lang.NoClassDefFoundError: org/apache/xml/utils/URI$MalformedURIException; nested exception is: javax.ejb.EJBException: nested exception is: java.lang.RuntimeException: java.lang.NoClassDefFoundError: org/apache/xml/utils/URI$MalformedURIException
    I have included in External jar files in EJB project  also..Will that cause the above exception?
    Kindly suggest your solution.
    Thanks
    Priya

    Hi !
    have a look
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f013e82c-e56e-2910-c3ae-c602a67b918e
    and this thread also
    Throw Error in Module Adapter EJB
    Thanks!

  • Custom JCA Adapter / Application Error - Message.setErrorInfo() ??

    Hi All,
    I was looking for how to create a sensible Application Error in a custom JCA adapter and was excited to find the following page in the PCK info on Adapter Development:
    http://help.sap.com/saphelp_nw04/helpdata/en/3c/53d6409ff68631e10000000a1550b0/frameset.htm
    The part of interest being:
    <i>
    The following methods are available to enable you to read error information in the form of an ErrorInfo object from the message, or to set the error information in a message.
    Message.getErrorInfo()
    Message.setErrorInfo()
    If the synchronous response message is an application-error message instead of an application response, it must call setErrorInfo(myErrorInfo) for receiver adapters.</i>
    However, I can't find these methods, or indeed the "ErrorInfo" object anywhere in the AF classes - does anyone know it's whereabouts? Or is the above page just out of date? If so, what is the new approach for creating Application Level Errors in a custom JCA Resource adapter (not Exceptions - I can do that)
    Many thanks,
    Chris

    Well, you can get the latest jars from the SMP (Service Marketplace) directly.  These jars are in the <i>XI ADAPTER FRAMEWORK CORE 3.0</i> component.  Basically, http://service.sap.com/swdc  then Support Packages and Patches->SAP NetWeaver->SAP NETWEAVER->SAP NETWEAVER 04->Entry by Component->J2EE Adapter Engine (PI/XI).   There you'll see the XI ADAPTER FRAMEWORK CORE 3.0 link.
    OR here is the direct link for the SP19 (latest) of <a href="https://smpdl.sap-ag.de/~swdc/012002523100009492712006D/SAPXIAFC19P_4-20000272.sca?_ACTION=DL_DIRECT">SAPXIAFC19P_4-20000272.sca</a>
    Within this is <i>aii_af_lib.sda</i> which has the jars.  You can use winzip or winrar to open .sca, .sda files.
    Regards,
    Jin

  • CEP Custom File Adapter

    Good Day!
    I'm new to CEP. I would like to ask how can I develop a custom file adapter wherein it tries to get only new lines added into the file.
    I'm trying also to integrate this with BAM for reporting. Any tutorials out there which I can refer upon?
    Thanks!
    Regards,
    Jeff

    Hi Jeff,
    You create your qwn adapter by creating a bean or an event bean.
    If your adapter needs to send events to the EPN (for example the new lines that you read from the file) then you need to create an event bean.
    Your event bean will needs implement the StreamSource API. If you want to read the file periodically then you will need to create a loop. One way to do this is using the RunnableBean API.
    So your adapter code should look something like that:
    public class FileAdapter implements StreamSource, RunnableBean{
        StreamSender sender;
        boolean suspendFlag = false;
        @Override
        public void setEventSender(StreamSender sender) {
            this.sender = sender;
        @Override
        public void run() {
            while(!getSuspendFlag()){
                // read the file
                // implement your logic
                // create an event instance
                sender.sendInsertEvent(event);
        @Override
        public synchronized void suspend() throws Exception {
            suspendFlag = true;
        private synchronized boolean getSuspendFlag(){
            return suspendFlag;
    As for BAM:
    One way is to put the events that your EPN produces to a queue. It is very common practice for the BAM to read messages from a queue. Since BAM is deployed on weblogic and since weblogic can also act as a JMS server, you can put the queue on the BAM weblogic.
    However, if this queue needs to be highly available, or if the load on it is going to be very high, it recommended to put it on separate weblogic or weblogic cluster.
    Hope this helps,
    Regards

  • Custom JCA Adapter integration with BPEL

    The stock FTP Adapter provided with BPEL does not have a feature I require, so I am creating a custom JCA FTP adapter that does only one thing: when it is invoked, it polls a directory for any existing files, and then returns the number of files in that directory.
    The Adapter Developer Cookbook ( http://www.oracle.com/technology/products/integration/adapters/pdf/Adapter%20Development%20cookbook.pdf ) is about as clear as mud, and hasn't been updated for 10.1.3.
    Are there any other resources that explain how you go from having your .java source files for your JCA adapter to having a working custom adapter in BPEL?

    Hello Tlwi,
    I guess you already figured out of writing custom JCA adapter, do you mind sharing your thoughs or document you may have. I tried to follow the cookbook, but was really looking for sample template code which I can change to make my own adapter.
    Thanks,
    Chintan

  • Custom webdav adapter

    Hello everybody!
    I found that Java Proxy (I posted it here) is not so useful such as File Adapter. So, I'm planing to make custom webdav adapter. However, I've never try to do it before. I red help about adapter development. But, it still not so clear. Could anybody, please, give some advices or examples how to make adapters?

    Thanks Ajay,
    we already have Oracle ERP Connector that is provisioning to oracle ERP resource,we have to write another connector that will help to check ITResource and user information filed in OIM for that we r writing java task, but we r facing problem to access these attribute for this we r hadcodeing ProcessDefination name and access from com.thortech.xl.vo.workflow.WorkflowDefinition getWorkflowDefinition(String workflowDefName) method.
    This method will retrieve the definition of a workflow based on the provided workflow definition key. and don't want to hardcode workflowDefName.

  • BizTalk adapter

    Hi all,
    I try to use WLI as B2B integrator in pilot project, but not found information
    about WLI and MS BizTalk server integration. There are main problems:
    How connect MS BizTalk server and BEA WLI (integrator) ?
    Does WLI include BizTalk adapter ?
    I You know, please help my.
    Thanks
    alex

    I've not tried this yet but I though the adapter pack was very specific about the version of oracle client/odp.net you had installed for it work.  I can give this a go I guess as I've nothing to lose but just wanted to get thoughts from community
    first.
    Today I’ve been doing some reading online and the content I've read suggests that the latest version of the oracle database 11.2 is supported in v2.0 of the adapter pack.  However if anyone can tell me different I'd be very glad.
    According to this forum it only supports 11.1 and not 11.2
    http://social.msdn.microsoft.com/Forums/en-US/biztalkr2adapters/thread/4dda77bf-6e77-461f-9615-16882d439f88
    According to the official Installation Guide which I found online it is not supported.
    http://download.microsoft.com/download/0/E/E/0EE48CD7-206F-4F14-9E68-CDA91A5A9EBE/InstallationGuide.htm

  • Biztalk Adapter Pack Eval license uninstall, install licensed version.

    I need to know the proper way to uninstall the eval Biztalk Adapter pack and install the licensed version.
    Is it just uninstall the current version and install the new one?

    Refer: How
    to upgrade trial version of BizTalk Adapter Pack 2.0 to the licensed version
    Steps are:
    Stop BizTalk services and SSO Service
    Take Backup of the BizTalk databases
    Stop SQL server agent
    Uninstall Evaluation version of BizTalk Adapter Pack (This clears all registry entries from the environment)
    Uninstall WCF LOB Adapter SDK
    Install WCF LOB Adapter SDK
    Install Licensed version of the BizTalk Adapter Pack
    Start BizTalk services and SSO Service
    Start SQL server agent
    Regards,
    Rachit

  • Does BizTalk adapter pack 2010 support SAP ECC6 EHP5?

    SAP Adapter BizTalk Adapter Pack 2.0:
    Supported server versions: SAP ECC 6.0 Non-Unicode, SAP ECC 6.0 Unicode, SAP ECC 5.0 Non-Unicode, SAP ECC 5.0 Unicode, SAP R/3 4.7 Non-Unicode,
    SAP R/3 4.7 Unicode, SAP R/3 4.6c Non-Unicode
    SAP Adapter BizTalk Adapter Pack 2010:
    Supported server versions: SAP ECC 6.0 Unicode, SAP ECC 5.0 Non-Unicode, SAP ECC 5.0 Unicode, SAP R/3 4.7 Non-Unicode, SAP R/3 4.7 Unicode, SAP
    R/3 4.6c Non-Unicode, SAP ERP 6.0 with EHP 4.0
    None specifically says it supports ECC 6.0 EHP5. But, I was able to find several posts that they are integrating with SAP ECC 6 EHP5 using BizTalk adapter. However, I would like to make sure whether Microsoft officially supports or not in case of technical
    issue occurs. 
    Does anyone have an answer?

    I appreciate your response but I'm afraid that the information you have given is what I looked up before and thought they can't be an answer. As I already have stated in my question, I found several posts saying that they are integrating with ECC 6.0 EHP5
    with BizTalk Adapter. With that, I can assume the BizTalk Adapter would work with EHP5 of ECC 6.0 as EHP is just an EnHancement Package. However, it does not mean Microsoft will support it when there is a technical issue unless it is stated so. So, what I
    want to confirm here is more about liability. I cannot suggest my client to use BizTalk based on assumption.
    To save anyone else's time, following are SAP versions supported by each BizTalk Adapter pack. None specifically mentions EHP 5. Can anyone from Microsoft or partner confirm this?? 
    SAP Adapter BizTalk Adapter Pack 2.0:
    Supported server versions:
    SAP ECC 6.0 Non-Unicode, SAP ECC 6.0 Unicode, SAP ECC 5.0 Non-Unicode, SAP ECC 5.0 Unicode, SAP R/3 4.7 Non-Unicode, SAP R/3 4.7 Unicode, SAP R/3 4.6c Non-Unicode
    SAP Adapter BizTalk Adapter Pack 2010:
    Supported server versions:
    SAP ECC 6.0 Unicode, SAP ECC 5.0 Non-Unicode, SAP ECC 5.0 Unicode, SAP R/3 4.7 Non-Unicode, SAP R/3 4.7 Unicode, SAP R/3 4.6c Non-Unicode, SAP ERP 6.0 with EHP 4.0
    SAP Adapter BizTalk Adapter Pack 2013:
    Supported server versions: SAP 7.2, SAP 7.0, SAP ERP 6.0 with EHP 4.0, SAP ECC 6.0 Unicode

  • BizTalk Adapter Pack support for Oracle Database 11.2

    Hi All,
    Is there a BizTalk Adapter Pack release that officially supports Oracle Database 11.2.0.3
    Thanks
    Steve

    Hi,
    The BizTalk 2010 adapter pack for the Orace adapter also supports 11.2
    See also:
    BizTalkServer 2010 Oracle 11g Release2
    http://social.msdn.microsoft.com/Forums/en-US/508063f5-b370-406c-a703-842db787b2cf/biztalkserver-2010-oracle-11g-release2?forum=biztalkr2adapters
    Kind regards,
    Tomasso Groenendijk
    Blog 
    |  Twitter
    MCTS BizTalk Server 2006, 2010
    If this answers your question please mark it accordingly

  • Component Service microsoft.biztalk.adapter.sql for BizTalk Server 2009

    Hello All,
    We have a production server which has 2 hosts used for receiving data. When I use these hosts for SQL adapter I am getting an error that "the receive location is shutting down. Details: The error threshold has been exceeded. The receive location is
    shutting down"
    I did some analysis and can see that the component service "microsoft.biztalk.adapter.sql " is missing on my receive server. Can this be the reason for this?

    Hi,
    Please check DTC connectivity between the two servers using DTCPing and DTCTester. That at the very least should make things easier to diagnose.
    http://www.microsoft.com/downloads/details.aspx?FamilyID=5e325025-4dcd-4658-a549-1d549ac17644&DisplayLang=en
    http://support.microsoft.com/default.aspx?scid=kb;en-us;293799
    http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q306843
    Make sure that "Distributed Transaction Coordinator" service is running on both biztalk and SQL server.
    Rachit

Maybe you are looking for

  • Can I install a SECOND HARD DRIVE (ssd) on my x220i

    For some reason I'm having problems finding the answer to this.  I would like to install an ssd, but I would like to keep the existing hard drive for space.  Is the a way to install a second hard drive (an ssd) into the x220i? Thanks for any input!

  • Royalty free music that doesn't suck

    I'm not a music composer (and I don't play one on TV) but I am someone who needs music for projects sometimes, mainly video modules for conference openers. The big problem is that, more often than not, my clients aren't willing to pay for an audio en

  • How do I add a new device to my icloud if it was stolen?  I need to track it

    How do I add a new device to my icloud.  My Ipad was stolen and I need to track it

  • How to get an open file dialog in Forms 9i?

    Although in online help I can find the get_file_name function just like it was in Forms 6.0, at runtime this wonderful function doesn't seem to do anything. Furthermore, there is no more d2kwutil.pll, nor d2kwutil.dll. How could I get an open file di

  • ODBC failure at siebel database configuration

    Hi all, I am installing siebel 7.8.2 in my system. I am using oracle 10g... I have installed siebel gateway name server . After siebel server installation and configuration, I was checking for ODBC connectivity as given in manual but i am getting the