Is it possible to catch ConnectionException in PublishingCacheStore

Hi All,
We are using 3 clusters of coherence; where data flow is always one way, i.e Master Cache writes to 2 other redundant caches (these caches are read only.. No writes are expected in these things). We are using PublishingCacheStore along with EventDistribution pattern.
We have written our own CacheStore which extends PublishingCacheStore (of Push Replication Pattern). Everything works fine. In case of failover, i.e. if there is a connectionException to remote cluster we are not able to catch that exception. However we could see the exception in the system console.
Please let me know if anyone has any idea how to do it.
CacheStore Implementation:
==================
@Override
     public void store(BinaryEntry entry) {
          if(logger.isDebugEnabled()) logger.debug("Entry >> store entry "+entry+" for channelName "+channelName+" & cacheName "+cacheName);
          try {
               super.store(entry);
          }catch (ConnectionException e) {
               logger.error("ConnectionException occured while store (replicating) the data to channelName "+channelName+" for cacheName "+cacheName,e);
//Some business logic needs to be added on Exception
               //Throwing back the exception to make sure that the replicated failure data is requeued again.
               throw new RuntimeException(e);
          catch (Exception e) {
               logger.error("Exception occured while store (replicating) the data to channelName "+channelName+" for cacheName "+cacheName,e);
               //Some business logic needs to be added on Exception
               //Throwing back the exception to make sure that the replicated failure data is requeued again.
               throw new RuntimeException(e);
Coherence cache Config.xml
=================
<cache-mapping>
     <cache-name>TEST</cache-name>
          <scheme-name>CacheDB</scheme-name>
               <event:distributor>
                    <event:distributor-name>{cache-name}</event:distributor-name>
                    <event:distributor-external-name>{site-name}-{cluster-name}-{cache-name}</event:distributor-external-name>
                    <event:distributor-scheme>
                         <event:coherence-based-distributor-scheme />
                    </event:distributor-scheme>
                    <event:distribution-channels>
                         <event:distribution-channel>
                              <event:channel-name>Active Publisher 1</event:channel-name>
                              <event:starting-mode system-property="channel.starting.mode">enabled</event:starting-mode>
<event:restart-delay>12000</event:restart-delay>
                              <event:channel-scheme>
                                   <event:remote-cluster-channel-scheme>
                                        <event:remote-invocation-service-name>remote-site1</event:remote-invocation-service-name>
                                        <event:remote-channel-scheme>
                                             <event:local-cache-channel-scheme>
                                                  <event:target-cache-name>TEST</event:target-cache-name>
                                             </event:local-cache-channel-scheme>
                                        </event:remote-channel-scheme>
                                   </event:remote-cluster-channel-scheme>
                              </event:channel-scheme>
                         </event:distribution-channel>
                         <event:distribution-channel>
                              <event:channel-name>Active Publisher 2</event:channel-name>
                              <event:starting-mode system-property="channel.starting.mode">enabled</event:starting-mode>
<event:restart-delay>12000</event:restart-delay>
                              <event:channel-scheme>
                                   <event:remote-cluster-channel-scheme>
                                        <event:remote-invocation-service-name>remote-site2</event:remote-invocation-service-name>
                                        <event:remote-channel-scheme>
                                             <event:local-cache-channel-scheme>
                                                  <event:target-cache-name>TEST</event:target-cache-name>
                                             </event:local-cache-channel-scheme>
                                        </event:remote-channel-scheme>
                                   </event:remote-cluster-channel-scheme>
                              </event:channel-scheme>
                         </event:distribution-channel>
                    </event:distribution-channels>
               </event:distributor>
          </cache-mapping>
</caching-scheme-mapping>
     <!--
               The following scheme is required for each remote-site when using a
               RemoteInvocationPublisher
          -->
     <remote-invocation-scheme>
     <service-name>remote-site1</service-name>
               <initiator-config>
                    <tcp-initiator>
                         <remote-addresses>
                              <socket-address>
                                   <address>localhost</address>
                                   <port>20001</port>
                              </socket-address>
                         </remote-addresses>
                         <connect-timeout>2s</connect-timeout>
                    </tcp-initiator>
                    <outgoing-message-handler>
                         <request-timeout>5s</request-timeout>
                    </outgoing-message-handler>
               </initiator-config>
          </remote-invocation-scheme>
          <remote-invocation-scheme>
               <service-name>remote-site2</service-name>
               <initiator-config>
                    <tcp-initiator>
                         <remote-addresses>
                              <socket-address>
                                   <address>localhost</address>
                                   <port>20002</port>
                              </socket-address>
                         </remote-addresses>
                         <connect-timeout>2s</connect-timeout>
                    </tcp-initiator>
                    <outgoing-message-handler>
                         <request-timeout>5s</request-timeout>
                    </outgoing-message-handler>
               </initiator-config>
          </remote-invocation-scheme>
          <distributed-scheme>
               <scheme-name>UserCacheDB</scheme-name>
               <service-name>DistributedCache</service-name>
               <serializer>
                    <class-name>com.tangosol.io.pof.ConfigurablePofContext</class-name>
                    <init-params>
                         <init-param>
                              <param-type>String</param-type>
                              <param-value>pof-config.xml</param-value>
                         </init-param>
                    </init-params>
               </serializer>
               <backing-map-scheme>
<read-write-backing-map-scheme>
<internal-cache-scheme>
<local-scheme>
</local-scheme>
</internal-cache-scheme>
<cachestore-scheme>
<class-scheme>
<class-name>au.com.vha.cpg.cachestore.publishing.CPGPublishingCacheStore</class-name>
<init-params>
<init-param>
<param-type>java.lang.String</param-type>
<param-value>{cache-name}</param-value>
</init-param>
                                        <init-param>
<param-type>java.lang.String</param-type>
<param-value>TEST</param-value>
</init-param>
</init-params>
</class-scheme>
</cachestore-scheme>
</read-write-backing-map-scheme>
</backing-map-scheme>
               <listener />
               <autostart>true</autostart>
          </distributed-scheme>

Hi,
As it's possible many things could fail - eg: one site may fail but the other may still remain working - it's best to let the PublishingCacheStore do it's own recovery. If you'd like to additionally use a CacheStore with Push Replication you can configure a separate Event Channel for the CacheStore using a CacheStore Event Channel.
The configuration options are here:
http://tinyurl.com/aporpcx
The source code (for a test) is available here:
http://tinyurl.com/axse83s
-- Brian
Brian Oliver | Architect | Oracle Coherence 

Similar Messages

  • Possible to catch parameters exceptions in the program ?

    Hi,
    Oracle 10g r2.
    I have some procedures/functions like :
    function insert_op (op_name in varchar2, op_date in date, op_length in number) is
    begin
    end;If I call for example :
    insert_op('test','02/05/2010','hehe')I will get an error (invalid number). Normal.
    My qyestion is, is it possible to catch that exception in the function ?
    The fact is that my function is called from an input button in my apex application, so if user enter wrong values in the form, I can't catch the error except using Javascript.
    Or should I pass all my parameters as varchar2, and then make functions to ckeck if it is valid numbers, dates, etc... :/
    Thanks.
    Yann.

    function insert_op(op_length in number) return varchar2 is
    temp number;
    begin
    temp := TO_NUMBER(op_length);
    return 'ok it is a number';
    exception
    when others then return 'not a number';
    end;Define the op_length as varchar2
    create or replace function insert_op(op_length in varchar2) return varchar2 is
    temp number;
    begin
       temp := TO_NUMBER(op_length);
       return 'ok it is a number';
    exception
    when others then return 'not a number';
    end;And further most important thing is dont use WHEN OTHERS. Use the specific exception. In this case VALUE_ERROR.
    I have done such thing in the past. Here is that code.
    create or replace function is_number(pVal in varchar2) return number
    as
       lNum number;
    begin
       lNum := to_number(pVal);
       return 1;
    exception
       when value_error then
               return 0;
    end;Edited by: Karthick_Arp on Mar 1, 2011 5:26 AM

  • Possible to catch all XI error message?

    Is it possible to catch all XI errror  and save it, including abap proxy runtime, j2ee adapters.
    anybody give me a clue?

    Hi Shen Peng,
    Please refer to below table for logs. Ideally you are not recommendated to make any changes to these tables.
    If you are looking to show all possible errors to your customer then, prepare a report based on the Early Watch Alert report and show it your customer at high level and if you try to show every alert/log that generated in the system to the customer then you it will be high task for you to explain each and every entry.....I rather suggest you give the high level report.
    Because many alerts/logs are temporary and not that critical to explain to the customer unless it's impacting the business.
    ABAP -Syslog entries
    TSL1D and TSL1T - syslog entries
    Java related log files
    XI_AF_MSG_AUDIT  audit log entries
    BC_MSG_AUDIT  PI 7.1 audit log entries (**) 
    SXMSALERTLOGGER  XI alerts log 
    I hope this info helps you.
    Regards
    Sekhar

  • ALV-Grid:  Is it possible to catch "LOCAL Function Codes" in any Event ??

    Hi,
    is it possible that i can catch a "Local Function Code" in ALV Grid with an Event??
    For example if you click to an Grid Button on the toolbar than it must call an Event!
    ..........BUTTON: Local APPEND (existing in ALV Toolbar)
    Function Code: '&LOCAL&APPEND'
    My Idea is:
    --- IF i click to the Button "Local APPEND" in the ALV toolbar, than it must after this command give me an Message( "It was Successfull" ).
    But the "Local Function Codes" dont called the Event "User_command" OR "After_user_command" is there any other Event for this "Local Function Codes"???
    Have anyone an idea?
    Thanks in forward.
    Ersin

    Hi,
    See following thread.
    http://scn.sap.com/thread/715996
    Thanks
    Santosh

  • Is that possible to catch exception of a form

    Hi,
    As we know, in ABAP exception handling can be at least 2 ways:
    1. For class exception:
    try
    catch cl_ex into ex.
    endcatch.
    2. For function module:
    call function 'function'
      exceptions
       ex  = 1
       others = 99.
    3. is it possible to capture non_class exception from a form?
    Thanks and regards,
    Said

    This link may help you
    http://help.sap.com/saphelp_nw04/helpdata/en/83/636d1712fc11d5991e00508b5d5211/content.htm

  • HtmlLoader - is it possible to catch/redirect page content? like a Local cache?

    Here's the scenario, I have a kiosk app I'm working on, and am loading html pages within it using the HTMLLoader class. I'm curious if it is possibale to catch requests mainly for video and images from the html page, and redirect the request.
    Essentially what i want is a way to set up a local cache of images and video, and possibly data, and have the parent AIR app manage it. As example, the content is managed via an online CMS, and when the kiosk runs, I'd like it to cache all the images/videos it needs locally for playback, and add any new images/content as it changes.
    I have complete control over both ends, so if access/permissions/crossdomain files need to happen, that's no problem.
    Thanks in advance!

    here is a nice piece of code that might get you started!
    http://cookbooks.adobe.com/post_Caching_Images_to_disk_after_first_time_they_are_l-10784.h tml

  • Is it possible to catch Ack 997 in orchestration ?

    it is possible that I could catch the ACK 997 message in an orchestration which receiving an inbound X12 210?
    It seems that I only have a change to create a receive port and filter it to get Ack 997 after deploy the project.
    If I could, I can manipulate it.

    What do is not helpful?
    You can reference the Microsoft.BizTalk.Edi.BaseArtifacts and you can see the schema, or you can put a send port
    filter where BTS.MessageType="http://schemas.microsoft.com/Edi/X12#X12_997_Root"
    If my explainations don't make sense, please explain how it doesn't make sense and this free technical support will assist
    as we can.
    We don't know where you are development wise, so help us help you...
    Eric Stott [http://blog.biztalk-info.com] - Mark as Answer if this reply does.

  • Is it possible to catch 400 rows exceeded message( system generated )

    Hi all,
    I want to catch the exception throw by the system when the no of rows in VO exceeds the profile value say 400, and want to display a custom message or a popup window.
    Thanks
    Babu

    in that case..
    First get some unique identifier for the Exception (Lets use error code)
    How??...this way..
    Surrond the whole processFormRequest code with try catch block
    (catch OAExceptiopn e).
    throw new OAException ("Original Exception error code="+e.getErrorCode());
    this will print the error code as an identifier to the original exception.Say it prints something like "Original Exception error code=CodeXX-00"
    Now we have the error code, hence now you can modify catch block as
    (catch OAExceptiopn e).
    if("CodeXX-00".equals(e.getErrorCode()))
    throw new OAException (""Here comes your custom message");
    else
    throw e;
    Now in this approach, you may like to use some other identifier like message Text as to identify that this exception has occured.
    Also if OAException is not caught, try to use the base class Exception.

  • Is it possible to catch Unix signals globally?

    I'm inquiring mostly about signals like EXCBADACCESS, etc?

    Thanks. And, no, I'm not trying to recover from it. I'm trying to log it for debugging purposes.
    And I forgot to mention - this is for iOS and not for Mac app.
    Anyway, I'm still struggling to catch it. Here's where I am so far. Correct me if I'm wrong:
    1. I add the code you gave me into the main() function, right?
    #include <execinfo.h>
    void signal_handler (int signum);
    int main(int argc, char *argv[]) {
    for (int i = SIGHUP; i <= SIGUSR2; i++){
    signal(i, signal_handler);
    NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
    int retVal = UIApplicationMain(argc, argv, nil, nil);
    [pool release];
    return retVal;
    void signal_handler (int signum)
    NSLog(@"### Signal caught ####");
    2. And then to trigger a memory fault:
    int v = strlen((const char*)1);
    static int e = 0;
    e += v;
    In the code above the signal_handler() is never invoked. Instead I get an app crash in the console window only. Any idea why?

  • Is It possible to catch Discussions thread in Webi through url

    Hi All,
    i open the webi document through asp link . Now i need the option of 'Discussions' in the same link is
    possible through hyperlink.if yes please give me the URL.
    Thanks in Advance

    <a href="http://businessobjects.bpop.com/wiasp/scripts/openDocument.asp? &iDocID = XXX
    &sDocName=XXXXXXX &sType=rep/wid&sRepoType=Corporate\">"object name</a>
    Edited by: Nagoorbasha Shaik on Apr 22, 2009 9:05 PM

  • Is it possible to catch ALT or ALT_GR pressed event?

    I want to pass focus to the "File" menu when ALT or ALT_GR is pressed, but KeyEvent considers it as a modifier only. Please help me.
    Oleg

    Have you tried to check for VK_ALT_GRAPH ?

  • Is it possible to catch a PowerShell script output when an exit code is setted?

    Hi,
    i'm using TEO 2.1.2 with the hotfixes from 1 to 12 already installed and i have a problem using the "Execute Windows PowerShell Script" in reading the output of a PowerShell script if an exit code is expressly setted . For example if i try to execute a script like:
    the output given by the activity is only 0 (like the exit code).
    This is a problem if i use a script with multiple exit codes corrisponding to different kind of situations and different outputs like the following:
    if($flag -eq "0")
       Write-output "Hello"
       exit 0
    elseif ($flag -eq "1")
       Write-output "Error 1"
       exit 1
    else
      Write-output "Error 2"
      exit 2
    or if i call an executable which exit codes i want to identify by a readable description.
    Anyone knows a way to solve this issue?
    Thanks a lot,
    bye.
    Giulio

    Thanks Shaun,
    i was already looking toward this kind of approch, but i was also curious if there was a different way of doing this.
    Anyway just a little annotation about your line of code, in Tidal 2.1.2 at least, Write-host doesn't work right, echo or Write-Output are fine but Write-host seems to be ignored. To the following script:
    the output is
    Maybe i'm missing something. Regarding an upgrade, as a devoloper i'd really like to try the improvement of the new version but this is not a decision I can make.
    Thank you,
    bye.
    Giulio

  • How to CATCH error from call to standard SAP Function Module

    Please, is it possible to catch the following error with the TRY CATCH ENDTRY construct?
    From a custom program, am calling CS_BOM_EXPL_MAT_V2.
    Several nested calls in, Form STL_DATEN_HOLEN (LCSS4F1I) calls FM CS_ALT_SELECT_MAT. 
    However, that call is missing the CALL_INVALID Exception. 
    CS_ALT_SELECT_MAT is raising CALL_INVALID, but since it was not included in the FM call, the RAISE_EXCEPTION runtime error is issued.
    I added a TRY CATCH ENDTRY construct around the call in the custom program using CATCH cx_root, but the program is still short dumping.
    All the research I have done has been misleading...some articles indicate all errors should be caught, some indicate only catchable runtime errors can be caught, others are not quite clear.
    So, I would like to find out if, in this scenario, it is even possible to catch this error and avoid the short dump.
    I will open a message to see about having the SAP code fixed as soon as I get authorization to do so, (as well as fix the data causing the issue in the first place), but in the meantime, I would like to handle it in my code if possible.
    ECC 6.0
    Thanks for any information!
    Kind Regards,
    Deb
    Edited by: Debra Garner on Jan 26, 2012 5:19 PM

    Hi Debra,
    You cannot catch non class based exceptions using the TRY/ENDTRY.  You might also find no luck with help from SAP since the FM in question 'CS_BOM_EXPL_MAT_V2' is not released for customer use.  The best bet is to examine why the error is occurring and figure out what needs to be done to fix it and/or avoid it in the future.
    Regards,
    Ryan Crosby

  • Catching System Error Message in Abap Proxy.

    Hi all,
        I want to know whether it is possible to catch the system error message from SXMB_MONI in proxy scenario's.
        The error i am getting is :
    <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    - <!--  Call Adapter
      -->
    - <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="1">
      <SAP:Category>XIServer</SAP:Category>
      <SAP:Code area="INTERNAL">HTTP_RESP_STATUS_CODE_NOT_OK</SAP:Code>
      <SAP:P1>403</SAP:P1>
      <SAP:P2>Forbidden</SAP:P2>
      <SAP:P3 />
      <SAP:P4 />
      <SAP:AdditionalText>Service is not active</SAP:AdditionalText>
      <SAP:ApplicationFaultMessage namespace="" />
      <SAP:Stack>HTTP response contains status code 403 with the description Forbidden Error when sending by HTTP (error code: 403, error text: Forbidden)</SAP:Stack>
      <SAP:Retry>N</SAP:Retry>
      </SAP:Error>
    Is it possble to catch the above message text.
    Regards,
    Keith

    Hi Keith,
    Check this forums also should be definitely help u..
    Error message handling in Integration Process
    and
    http://help.sap.com/saphelp_nw04/helpdata/en/dd/b7623c6369f454e10000000a114084/content.htm
    also refer
    Check this weblog once ... sure it will give u an idea..
    /people/sap.user72/blog/2006/01/16/xi-propagation-of-meaningful-error-information-to-soap-client
    and also go through this
    /people/alessandro.guarneri/blog/2006/01/26/throwing-smart-exceptions-in-xi-graphical-mapping
    Regards,
    Sridhar

  • Catching the exception thrown in a java class on a JSP front end

    I have a web service created in JAVA.. The modules throw certain exceptions and i am having auto generated JSP created from the WSDL's , which i can obviously edit. i want to catch these exceptions in this JSP page.. Any clue how to do this?
    Thanks.

    Nee333 wrote:
    I have a web service created in JAVA.. The modules throw certain exceptions and i am having auto generated JSP created from the WSDL's , which i can obviously edit. i want to catch these exceptions in this JSP page.. Any clue how to do this? It is not possible to catch the Exception in a JSP. You can however put any logging or even an if statement into your JSP to display the error or control the flow based on the error.

Maybe you are looking for

  • Artwork for ..... could not be found. An unknown error occurred (-609).

    I've installed both 7.5 and 7.6 and with either version for some reason I can no longer get the album artwork to any of my albums, when trying to get them the following message appears: Artwork for ..... could not be found. An unknown error occurred

  • Free Good Configuration / Customization

    Hi SAP Gurus Good evening i have a issue. I want to manage free goods ...... we have two catagories.... Local Indian Free Goods and Import Free Goods the case is like this Free Goods Local India. I don't pay and tax or duty over it....but i must be a

  • Not Capturing Error

    I'm trying to capture HDV off a mini tape on a new JVC GY HD200 using Final Cut Studio 2. I've downloaded the updates for Final Cut. FC recognizes the camera, will control it, will allow an in point edit and an out edit point. When I click the Log Cl

  • Apple TV connecting to A/V (Niles central system)

    We have centralized system w/switch that we feed all A/V too and we want to add the apple TV & remove our DVD,CD, etc? Can we do this?

  • Screen Field  Modification of VA01

    Hi, I am giving order type in VA01 Tcode and then Clicking on 'Create with Reference' .Then a Pop Up is getting generated. In this i am giving Contract already created (using VA41 Tcode) and then clicking on 'Item Selection' button .Now it's going to