DB Adapter polling as singleton process is not working as expected

Am using poller DB adapater to control the transaction per seconds to the downstream system and i want this poller process as singleton (One instance should be in running state at a time).
As suggested in oracle documents , below is the parameters configured in composite.xml file.
<service name="polling_Mange_Alert_Events"
  ui:wsdlLocation="polling_Mange_Alert_Events.wsdl">
<interface.wsdl interface="http://xmlns.oracle.com/pcbpel/adapter/db/Application1/int_app_manageAlerts/polling_Mange_Alert_Events#wsdl.interface(polling_Mange_Alert_Events_ptt)"/>
  <binding.jca config="polling_Mange_Alert_Events_db.jca">
  <property name="singleton">true</property>
  </binding.jca>
  <property name="jca.retry.count" type="xs:int" many="false" override="may">2147483647</property>
  <property name="jca.retry.interval" type="xs:int" many="false"
  override="may">1</property>
  <property name="jca.retry.backoff" type="xs:int" many="false"
  override="may">2</property>
  <property name="jca.retry.maxInterval" type="xs:string" many="false"
  override="may">120</property>
  </service>
Below is the JCA file parameters configured :
<adapter-config name="polling_Mange_Alert_Events" adapter="Database Adapter" wsdlLocation="polling_Mange_Alert_Events.wsdl" xmlns="http://platform.integration.oracle/blocks/adapter/fw/metadata">
  <connection-factory location="eis/DB/vff-int-fus" UIConnectionName="PT_APPINFRA" adapterRef=""/>
  <endpoint-activation portType="polling_Mange_Alert_Events_ptt" operation="receive">
    <activation-spec className="oracle.tip.adapter.db.DBActivationSpec">
      <property name="DescriptorName" value="polling_Mange_Alert_Events.ManageAlertEvents"/>
      <property name="QueryName" value="polling_Mange_Alert_EventsSelect"/>
      <property name="MappingsMetaDataURL" value="polling_Mange_Alert_Events-or-mappings.xml"/>
      <property name="PollingStrategy" value="LogicalDeletePollingStrategy"/>
      <property name="MarkReadColumn" value="TRANSACTION_STATUS"/>
      <property name="MarkReadValue" value="Processing"/>
      <property name="PollingInterval" value="10"/>
      <property name="MaxRaiseSize" value="5"/>
      <property name="MaxTransactionSize" value="5"/>
      <property name="NumberOfThreads" value="1"/>
      <property name="ReturnSingleResultSet" value="false"/>
      <property name="MarkUnreadValue" value="Pending"/>
    </activation-spec>
  </endpoint-activation>
</adapter-config>
This poller process is running on clustered environment (2 soa nodes) and it is not working as expected as singleton process.
Please advise to solve this issue ?

Hi,
1.Set Singleton property outside   <binding.jca> like this:
<binding.jca config="polling_Mange_Alert_Events_db.jca"/>
  <property name="singleton">true</property>
  <property name="jca.retry.count" type="xs:int" many="false" override="may">2147483647</property>
  <property name="jca.retry.interval" type="xs:int" many="false"
2.Also you can try setting these values in jca file:
<property name="RowsPerPollingInterval" value="100"/>
<property name="MaxTransactionSize" value="100"/>
3. try to increase the polling interval time.
Regards,
Anshul

Similar Messages

  • BizTalk 2009 SQL WCF Adapter Losing Messages? AKA TypedPolling Not Working

    Can anybody help me with this amazingly frustrating issue? Firstly, the basiscs. I'm using BizTalk 2009 Standard Edition hosted on Windows Server 2008 
    Standard (64 bit). The BizTalk databases are stored on a seperate server, running SQL Server 2008 on Windows Server 2008 Enterprise (64 bit).
    I have configured a WCF SQL adapter to poll (using TypedPolling) a SQL 2008 database which in turn activates a relatively simple orchestration. The problem
    is that the orchestration does not get executed at the specified polling intervals. I have several other similar polling adapters in my application that work
    as expected. Generally it will run correctly once or twice after enabling/disabling the receive location or restarting the host instance. But after that it
    is completely erratic. If I have it set to run every hour (3600 secs), it might complete succssfully once or twice a day at seemingly random times. On other
    days it might run seven or eight times during a day.
    I've spent heaps of time reading blogs and changing various settings on my receive location and have really run out of ideas. I've profiled SQL Server and it
    seems that the WCF SQL adapter does hit the database at each polling period as specified, using both the polledDataAvailableStatement and the
    pollingStatement. Data is always returned by these queries (a small amount - around 30 records), but they just don't seem to get to the message box. No
    errors are ever reported in the Event Log.
    I use a stored procedure for determining if data is available and for returning data. They are both effectively the same statement, one returns a count
    whilst the other returns the data. The queries are using cross server joins as you can see below. Although I do no updates, it seems that I have to run the
    receive location with AmbientTransactions turned on. Turning them off just results in a SQL Timeout exception. I don't understand why this is and would be
    grateful if someone could explain.
    Data Available (contained in a stored proc):
    SELECT  COUNT(*)
        FROM    [LMNZLSQL002\AX].[LMNZ_AX_LIVE].[dbo].[CRM_CUSTTRANS_ITG] WITH (NOLOCK)
        WHERE    (TRANSTYPE = 8 OR TRANSTYPE = 13)  
        AND SETTLEAMOUNTCUR > 0
        AND CUSTFEEINVOICETRANSACTION30005 IS NOT NULL
        AND CUSTFEEINVOICETRANSACTION30005 <> ''      
        AND CUSTFEEINVOICETRANSACTION30005 IN
            SELECT F.FeeId
            FROM [dbo].[Fees] F WITH (NOLOCK)      
            WHERE F.FeeStatus = 3        --Unpaid
            AND F.Payer IS NOT NULL
    Select Data (contained in a stored proc):
    SELECT  ACCOUNTNUM, CUSTFEEINVOICETRANSACTION30005, AMOUNTCUR, SETTLEAMOUNTCUR
        FROM    [LMNZLSQL002\AX].[LMNZ_AX_LIVE].[dbo].[CRM_CUSTTRANS_ITG] WITH (NOLOCK)
        WHERE    (TRANSTYPE = 8 OR TRANSTYPE = 13)  
        AND SETTLEAMOUNTCUR > 0
        AND CUSTFEEINVOICETRANSACTION30005 IS NOT NULL
        AND CUSTFEEINVOICETRANSACTION30005 <> ''      
        AND CUSTFEEINVOICETRANSACTION30005 IN
            SELECT F.FeeId
            FROM [dbo].[Fees] F WITH (NOLOCK)
            WHERE F.FeeStatus = 3        --Unpaid
            AND F.Payer IS NOT NULL
        ORDER BY ACCOUNTNUM,CUSTFEEINVOICETRANSACTION30005
    At one time I suspected that the issue may be related to database locking. So, as you can see, I've added NOLOCK locking hints to rule this out. I'm also
    using a Service Behaviour (SqlAdapterInboundTransactionBehaviour) declaring a transaction level of ReadUncommitted. Obviousy I'd like to move away from the
    possibility of dirty reads. Also, I've checked the SQL activity monitors when I expect the process to run and can see no locks holding it up. Also, I can
    freely execute the stored procedures from SQL Management Studio at these times.
    I'm not too experienced at monitoring BizTalk, but I wondered if some kind of throttling was occuring. So I've moved the receive location (and the
    orchestration that doesn't always get initiated) to its own host instance and have done some monitoring via the performance counters in perfmon. I haven't
    spotted any thottling going on, but maybe I wasn't looking at the correct counters (mainly used the Message Agent items).
    Here's a summary of the receive location properties:
    Transport: WCF-Custom
    Receive Handler: AXPaymentsToFeesEngine (this host instance only hosts this receive location and the orchestration it should be activating).
    Receive pipeline: XmlReceive
    General tab:
    EndpointAddress: mssql://lmnzlsql003/CRM/FeesEngine?InboundId=PaidInAXUnpaidInFeesEngine
    Endpoint Identity - all default values
    Binding Tab:
    Binding Type: sqlBinding
    allowIdentityInsert: False
    batchSize: 20
    chunkSize: 4194304  
    enableBizTalkCompatibilityMode: True
    enablePerformanceCounters: False
    encrypt: False
    inboundOperationType: TypedPolling
    maxConnectionPoolSize: 100
    notificationStatement: Not specified
    notifyListenersOnStart: True
    polledDataAvailableStatement: EXEC [dbo].[bts_PollForAXFeePaymentsNotPresentInFeesEngine_IsDataAvailable]
    polledIntervalInSeconds: 3600
    pollingStatement: EXEC [dbo].[bts_GetFeesMarkedUnpaidThatHaveBeenPaidInAX]
    pollWhileDataFound: False
    UseAmbientTransaction: True
    useDatabaseNameInXsdNamespace: False
    workstationId: Not specified
    xmlStoredProcedureRootNodeName: Not specified
    xmlStoredProcedureRootNodeNamespace: Not specified
    All timeouts: 5 mins.
    Behaviour Tab
    ServiceBehaviour - sqlAdapterInboundTransactionBehaviour, ReadUncommitted, timeout mins
    Other Tab:
    Credentials: None
    Preserve message order: False
    Mesages Tab:
    Inbound BizTalk message body: Body
    Error handling: All disabled
    Thanks in advance,
    Mark

    Thanks everyone for your input on this. None of the suggestions actually seemed to solve our specific issue, and we ended up raising a support call with Microsoft. They got us to use some tracing tools that are not publically available and it turns out that
    there was a problem with the underlying WCF commnications channel, which was not visible via the usual windows event logs. They suggested a solution that, although very counter-intuitive, seems to have resolved our problem; set the ReceiveTimeout property
    of the receive adapter to <!-- /* Font Definitions */ @font-face {font-family:SimSun; panose-1:2 1 6 0 3 1 1 1 1 1; mso-font-alt:宋体; mso-font-charset:134; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:3 680460288 22 0 262145
    0;} @font-face {font-family:"Cambria Math"; panose-1:2 4 5 3 5 4 6 3 2 4; mso-font-alt:"Calisto MT"; mso-font-charset:0; mso-generic-font-family:roman; mso-font-pitch:variable; mso-font-signature:-1610611985 1107304683 0 0 159 0;} @font-face
    {font-family:Calibri; panose-1:2 15 5 2 2 2 4 3 2 4; mso-font-alt:"Arial Rounded MT Bold"; mso-font-charset:0; mso-generic-font-family:swiss; mso-font-pitch:variable; mso-font-signature:-1610611985 1073750139 0 0 159 0;} @font-face {font-family:"\@SimSun";
    panose-1:2 1 6 0 3 1 1 1 1 1; mso-font-charset:134; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:3 680460288 22 0 262145 0;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-unhide:no; mso-style-qformat:yes;
    mso-style-parent:""; margin:0cm; margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:12.0pt; font-family:"Times New Roman","serif"; mso-fareast-font-family:SimSun; mso-fareast-language:ZH-CN;} .MsoChpDefault {mso-style-type:export-only;
    mso-default-props:yes; font-size:10.0pt; mso-ansi-font-size:10.0pt; mso-bidi-font-size:10.0pt;} @page WordSection1 {size:612.0pt 792.0pt; margin:72.0pt 72.0pt 72.0pt 72.0pt; mso-header-margin:36.0pt; mso-footer-margin:36.0pt; mso-paper-source:0;} div.WordSection1
    {page:WordSection1;} -->
    24.20:31:23.6470000 and restart the service host.
    Here's the underlying exception:
    <!-- /* Font Definitions */ @font-face {font-family:SimSun; panose-1:2 1 6 0 3 1 1 1 1 1; mso-font-alt:宋体; mso-font-charset:134; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:3 680460288 22 0 262145 0;} @font-face {font-family:"Cambria
    Math"; panose-1:2 4 5 3 5 4 6 3 2 4; mso-font-alt:"Calisto MT"; mso-font-charset:0; mso-generic-font-family:roman; mso-font-pitch:variable; mso-font-signature:-1610611985 1107304683 0 0 159 0;} @font-face {font-family:Calibri; panose-1:2 15
    5 2 2 2 4 3 2 4; mso-font-alt:"Arial Rounded MT Bold"; mso-font-charset:0; mso-generic-font-family:swiss; mso-font-pitch:variable; mso-font-signature:-1610611985 1073750139 0 0 159 0;} @font-face {font-family:"\@SimSun"; panose-1:2 1 6
    0 3 1 1 1 1 1; mso-font-charset:134; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:3 680460288 22 0 262145 0;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-unhide:no; mso-style-qformat:yes; mso-style-parent:"";
    margin:0cm; margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:12.0pt; font-family:"Times New Roman","serif"; mso-fareast-font-family:SimSun; mso-fareast-language:ZH-CN;} .MsoChpDefault {mso-style-type:export-only; mso-default-props:yes;
    font-size:10.0pt; mso-ansi-font-size:10.0pt; mso-bidi-font-size:10.0pt;} @page WordSection1 {size:612.0pt 792.0pt; margin:72.0pt 72.0pt 72.0pt 72.0pt; mso-header-margin:36.0pt; mso-footer-margin:36.0pt; mso-paper-source:0;} div.WordSection1 {page:WordSection1;}
    -->
    [0]1E2C.21C4::07/07/2010-4:52:25.804 [CSharp]:[Wcf] BtsErrorHandler.HandleError called with Exception: System.ServiceModel.CommunicationObjectAbortedException:
    The communication object, System.ServiceModel.Channels.ServiceChannel, cannot be used for communication because it has been Aborted.
       at System.ServiceModel.Channels.CommunicationObject.ThrowIfDisposedOrImmutable()
       at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
       at System.ServiceModel.Channels.CommunicationObject.Open()
       at System.ServiceModel.Dispatcher.ChannelHandler.InitializeServiceChannel(ServiceChannel channel)
       at System.ServiceModel.Dispatcher.ChannelHandler.GetSessionChannel(Message message, EndpointDispatcher& endpoint, Boolean& addressMatched)
       at System.ServiceModel.Dispatcher.ChannelHandler.EnsureChannelAndEndpoint(RequestContext request)
       at System.ServiceModel.Dispatcher.ChannelHandler.TryRetrievingInstanceContext(RequestContext request).

  • Update process does not work on Tabular Form

    Hello,
    I have 2 tabular forms on one page, which are using manual update processes.
    First form is created using wizard, and therefore works perfectly.
    The update process is as follows:
    DECLARE
      lc_string VARCHAR2(4000);
    BEGIN
      FOR i IN 1..APEX_APPLICATION.G_f01.COUNT
      LOOP
         lc_string := lc_string|| '[' ||APEX_APPLICATION.G_f*03*(i) || '|' || APEX_APPLICATION.G_f*04*(i) || ']';
      END LOOP;
      --Database processing using the concatenated string here
    END;Second form is created manually, using the following code:
    SELECT apex_item.checkbox (30,
                               '#ROWNUM#',
                               'onclick="highlight_row(this,' || '#ROWNUM#'|| ')"',
                               NULL,
                               'f30_' || '#ROWNUM#'
                              ) delete_checkbox,
           CATALOG_ID,
              apex_item.hidden (31, CATALOG_ID)
           || apex_item.text (32,
                              LANG,
                              80,
                              100,
                              'style="width:100px"',
                              'f32_' || '#ROWNUM#'
           || apex_item.hidden (33, wwv_flow_item.md5 (LANG, DESCRIPTION)) LANG,
           apex_item.text (34,
                           DESCRIPTION,
                           80,
                           100,
                           'style="width:255px"',
                           'f34_' || '#ROWNUM#'
                          ) DESCRIPTION
      FROM V_CATALOGS
    UNION ALL
    SELECT     apex_item.checkbox
                              (30,
                               TO_NUMBER(9900 + LEVEL),
                               'onclick="highlight_row(this,' || '#ROWNUM#' || ')"',
                               NULL,
                               'f30_' || TO_NUMBER (9900 + LEVEL)
                              ) delete_checkbox,
               NULL,
                  apex_item.hidden (31, NULL)
               || apex_item.text (32,
                                  NULL,
                                  80,
                                  100,
                                  'style="width:100px"',
                                  'f32_' || TO_NUMBER (9900 + LEVEL)
               || apex_item.hidden (33, NULL) LANG,
               apex_item.text
                                               (34,
                                                NULL,
                                                80,
                                                100,
                                                'style="width:255px" '  ,
                                                'f34_'
                                                || TO_NUMBER (9900 + LEVEL)
                                               ) DESCRIPTION
          FROM DUAL
         WHERE :P18_TEMP = 'ADD_ROWS1'
    CONNECT BY LEVEL <= 1However, the update process does not work on this form.
    I created it using the first one as an example, but with the id's of the second form:
    DECLARE
      lc_string VARCHAR2(4000);
    BEGIN
      FOR i IN 1..APEX_APPLICATION.G_f*30*.COUNT
      LOOP
         lc_string := lc_string|| '[' ||APEX_APPLICATION.G_f*32*(i) || '|' || APEX_APPLICATION.G_f*34*(i) || ']';
      END LOOP;
      --Database processing using the concatenated string here
    END;Also, both forms are opening in a modal pop-up dialog window.
    I use a Dialog Region plug-in for that.
    Please advise, what is causing a problem with update?

    Sloger,
    if this is your tabular form
    SELECT apex_item.checkbox (30,
    ...and this is your update statement
    FOR i IN 1..APEX_APPLICATION.G_f*30*.COUNT
    ...Then you will only ever update records that have been checked. Unchecked checkboxes are not passed back in the global array. You need to have a hidden column with the ID's for the record and loop through that when you are updating/inserting. That is why the built in tabular form has a MRU and a MRD. the MRU loops through the hidden ID column. The MRD loops through the checkbox.
    Thanks,
    Tyson Jouglet

  • Batch process does not work in one service, but worked in another.

    Hi Fellows,
    We have here a batch process with a code encrypted, that runs daily in a production environment.
    Tonight this batch process did not work.
    It is expected that this process runs in about 20 seconds, but tonight this process used about 3 hours and did not finished.
    We checked if it was concurrency, killed some sessions and tried again, and nothing has changed.
    And then someone changed the service that this process uses, it was 'bat' and changed to 'dba'. And it worked succesfully in 11 seconds.
    Here is the tnsnames that the batch process uses:
    bat =
    (DESCRIPTION =
    (LOAD_BALANCE = OFF)
    (FAILOVER=ON)
    (ADDRESS = (PROTOCOL = TCP)(HOST = 10.10.x.x1)(PORT = 1521))
    (ADDRESS = (PROTOCOL = TCP)(HOST = 10.10.x.x2)(PORT = 1521))
    (ADDRESS = (PROTOCOL = TCP)(HOST = 10.10.x.x3)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = bat)
    (FAILOVER_MODE =
    (BACKUP = dba)
    (TYPE = NONE)
    (METHOD = BASIC)
    (RETRIES = 20)
    (DELAY = 5)
    dba =
    (DESCRIPTION =
    (LOAD_BALANCE = OFF)
    (ADDRESS = (PROTOCOL = TCP)(HOST = 10.10.x.x1)(PORT = 1521))
    (ADDRESS = (PROTOCOL = TCP)(HOST = 10.10.x.x2)(PORT = 1521))
    (ADDRESS = (PROTOCOL = TCP)(HOST = 10.10.x.x3)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = dba)
    Do you guys know what could be the reason?
    Thanks in advance.

    We set the service which the app should connect.
    These services are set in srvctl:
    ora.cms.bat.cms1.srv ONLINE ONLINE on fastora1
    ora.cms.bat.cms2.srv ONLINE ONLINE on fastora2
    ora.cms.bat.cms3.srv ONLINE ONLINE on fastora3
    ora.cms.bat.cs ONLINE ONLINE on fastora1
    ora.cms.cms1.inst ONLINE ONLINE on fastora1
    ora.cms.cms2.inst ONLINE ONLINE on fastora2
    ora.cms.cms3.inst ONLINE ONLINE on fastora3
    ora.cms.cmsuser.cms1.srv ONLINE ONLINE on fastora1
    ora.cms.cmsuser.cms3.srv ONLINE ONLINE on fastora3
    ora.cms.cmsuser.cs ONLINE ONLINE on fastora1
    ora.cms.db ONLINE ONLINE on fastora1
    ora.cms.dba.cms1.srv ONLINE ONLINE on fastora1
    ora.cms.dba.cms2.srv ONLINE ONLINE on fastora2
    ora.cms.dba.cms3.srv ONLINE ONLINE on fastora3
    The batch process connects to a service [ bat ], but it hangs and don't finish. But when we change the service do dba is just pass in some seconds and finish succesfully.
    Connected to DB [issr@bat  ]
    PAYware CMS Version 8.0 - Module : E352 Release : 000000002
    Program: /cms/cmsissr/CMS/bin/issuer/mepcs352
    Release: 2
    PARAMETERS OK !!!
    NUMBER OF PROC.: 000001
    Number of transactions : +000047570
    Number of parallel processes: 000001
    Transactions by process: 000000000000047570
    Transactions Processed: 000010000

  • "Ask to buy" and "Sign in to Approve" process is not working

    Last weekend I setup Family Sharing for the first time, but the "Ask to buy" and "Sign in to Approve" process is not working. I am the Family Organizer and I created an account for my child under 13 with "Ask to buy" enabled. My child can go in to the App Store, click "Buy" for a desired app and I get a notification on my iPhone 5s... as expected. When I open the Notification I have the option to Decline or Approve. If I select Approve, a box pops up asking me to enter the password for my child's iCloud account to complete the request. (It seems odd to me that I'd have to enter his password instead of my own, but whatever.) So I enter his password and the box goes away for a second and then comes right back like I typed it wrong or something. I enter it again and again and always the same box comes back and the request is never completed. We've tried this several times over several days and always see the same behavior. I have also tried entering my password instead of his (since that makes more sense to me) but I encounter the same problem.
    I have verified that I am signed in to my iCloud account and my iTunes account on my iPhone 5s. I have also verified that my son is logged in with his iCloud/iTunes account on his iPod touch, so why isn't this working? Additionally, if I disable "Ask to Buy" then I can successfully install apps on his iPod from the iPod itself.
    Is it normal for the "Sign in to Approve" box to show his iCloud address instead of mine? And if so, why doesn't it complete when I enter his password? Am I missing something completely? This is driving me crazy.

    Hi ,
    When you click your link "Click here", the SharePoint web page with anchor will not work until refresh the page, if it's the case, you can add the javascript code to refresh the page automatically as workaround per the following similar post.
    http://social.msdn.microsoft.com/Forums/sharepoint/en-US/f7eab808-da8a-44fd-9933-f9b992f5affc/sharepoint-anchor-tags?forum=sharepointgeneralprevious
    http://yalla.itgroove.net/2012/05/anchor-links-tags-in-sharepoint-2010/
    <script type="text/javascript">
    setTimeout(Reload,2000);
    function Reload()
    window.location.hash=self.document.location.hash.substring(1);
    </script>
    Thanks,
    Daniel Yang
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact [email protected] 
    Daniel Yang
    TechNet Community Support

  • Namespaces not working as expected

    Hi, I've got problems with namespaces not working as expected. When I isolate a process into a new network and mount namespace, a newly mounted file system will be visible to all processes.
    Steps to reproduce:
    $ sudo unshare -mn bash
    bash# mount -t sysfs sysfs /sys
    bash# exit
    $ cat /proc/mounts
    Result:
    /proc/mounts will contain a new line for sysfs. This means the /sys/fs/cgroups directory will appear to be empty as the new sysfs is mounted over the old However you can undo it by
    sudo umount /sys
    Expected result:
    The /sys directory will only be new inside the bash process started using unshare and not anymore once you exit bash.
    Did I understand something wrong? Or might this be a bug in the kernel?
    Note that when using
    unshare -m bash
    without isolating the network namespace it will refuse to mount sysfs as it is already mounted or busy. Strange.

    Hello, because sysfs is shared, see unshare(1) for more details.

  • Silverlight 5 binding on a property with logic in its setter does not work as expected when debug is attached

    My problem is pretty easy to reproduce.
    I created a project from scratch with a view model.
    As you can see in the setter of "Age" property I have a simple logic.
        public class MainViewModel : INotifyPropertyChanged
                public event PropertyChangedEventHandler PropertyChanged;
                private int age;
                public int Age
                    get
                        return age;
                    set
                        /*Age has to be over 18* - a simple condition in the setter*/
                        age = value;
                        if(age <= 18)
                            age = 18;
                        OnPropertyChanged("Age");
                public MainViewModel(int age)
                    this.Age = age;
                private void OnPropertyChanged(string propertyName)
                    if (this.PropertyChanged != null)
                        PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
    In the MainPage.xaml 
         <Grid x:Name="LayoutRoot" Background="White">
                <TextBox 
                    Text="{Binding Path=Age, Mode=TwoWay}" 
                    HorizontalAlignment="Left"
                    Width="100"
                    Height="25"/>
                <TextBlock
                    Text="{Binding Path=Age, Mode=OneWay}"
                    HorizontalAlignment="Right"
                    Width="100"
                    Height="25"/>
            </Grid>
    And MainPage.xaml.cs I simply instantiate the view model and set it as a DataContext.
        public partial class MainPage : UserControl
            private MainViewModel mvm;
            public MainPage()
                InitializeComponent();
                mvm = new MainViewModel(20);
                this.DataContext = mvm;
    I expect that this code will limit set the Age to 18 if the value entered in the TextBox is lower than 18.
    Scenario: Insert into TextBox the value "5" and press tab (for the binding the take effect, TextBox needs to lose the focus)
    Case 1: Debugger is attached =>
    TextBox value will be "5" and TextBlock value will be "18" as expected. - WRONG
    Case 2: Debugger is NOT attached => 
    TextBox value will be "18" and TextBlock value will be "18" - CORRECT
    It seems that when debugger is attached the binding does not work as expected on the object that triggered the update of the property value. This happens only if the property to which we are binding has some logic into the setter or getter.
    Has something changed in SL5 and logic in setters is not allowed anymore?
    Configuration:
    VisualStudio 2010 SP1
    SL 5 Tools 5.1.30214.0
    SL5 sdk 5.0.61118.0
    IE 10
    Thanks!                                       

    Inputting the value and changing it straight away is relatively rare.
    Very few people are now using Silverlight because it's kind of deprecated...
    This is why nobody has reported this.
    I certainly never noticed this problem and I have a number of live Silverlight systems out there.
    Some of which are huge.
    If you want a "fix":
    private void OnPropertyChanged(string propertyName)
    if (this.PropertyChanged != null)
    //PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
    Storyboard sb = new Storyboard();
    sb.Duration = new Duration(new TimeSpan(0, 0, 0, 0, 100));
    sb.Completed += delegate
    PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
    sb.Begin();
    The fact this works is interesting because (I think ) it means the textbox can't be updated at the point the propertychanged is raised.
    Please don't forget to upvote posts which you like and mark those which answer your question.
    My latest Technet article - Dynamic XAML

  • Subtraction of two key figures normalized to result not working as expected

    Hello SAP Community!
    I am having problems with getting the right result from a subtraction of two KFs which are "normalized to results" which means the KFs really have values expressed as percentages. The substraction that should be performed is of two percentages (e.g.: 87.298% - 85.527% = 1.77%) but my report prints out the result as "number of units" instead (e.g.: 87.298% - 85.527% = 71,514.00 EA). The two normalized KFs actually "point" to two stock KFs, hence the "number of units".
    In order to explain the problem I am facing please analyze below text:
    1) Let's assume I have below data:
    LOAD MONTH  PLANT    MATERIAL HORIZON MONTH     FORECAST UNITS
    200805         PLANT-A  MAT-1            200805         510,235.00
    200805         PLANT-B  MAT-1           200805          74,240.00
    200805         PLANT-A  MAT-1           200806         438,721.00
    200805         PLANT-B  MAT-1           200806          74,240.00
    200805         PLANT-A  MAT-1           200807         356,981.00
    200805         PLANT-B  MAT-1           200807          74,240.00
    200806         PLANT-A  MAT-1           200805               0.00
    200806         PLANT-B  MAT-1           200805               0.00
    200806         PLANT-A  MAT-1           200806         510,235.00
    200806         PLANT-B  MAT-1           200806          74,240.00
    200806         PLANT-A  MAT-1           200807         438,721.00
    200806         PLANT-B  MAT-1           200807          74,240.00
    2) Then, assume I have a comparison report, restricted by load month for two months May and June 2008 (filter restricted by two month variables) with FORECAST units spread accross columns for whole horizon (two months also in this case).
    Material  Plant                                 2008/06     2008/07
    ===================================================================
    MAT1      PLANT-A  
                       Base Units (May 2008)        438,721.00  356,981.00
                       Comparison Units (June 2008) 510,235.00  438,721.00
              PLANT-B  
                       Base Units (May 2008)         74,240.00   74,240.00
                       Comparison Units (June 2008)  74,240.00   74,240.00
              TOTALS   Base Units                   512,961.00  431,221.00
                       Comparison Units             584,475.00  512,961.00
    3) Now, let's suppose we want to know the proportions (%) of Base vs Comparison units, so
    we normalize forecats to results an we get the below report:
    Material  Plant                                 2008/06     2008/07
    ===================================================================
    MAT1      PLANT-A  
                       Base Units (May 2008)        438,721.00  356,981.00
                       Base Units % (May 2008)      85.527%     85.527%
                       Comparison Units (June 2008) 510,235.00  438,721.00
                       Comparison Units %(Jun 2008) 87.298%     82.784%
              PLANT-B  
                       Base Units (May 2008)         74,240.00   74,240.00
                       Base Units % (May 2008)       14.473%     15.702%
                       Comparison Units (June 2008)  74,240.00   74,240.00
                       Comparison Units %(Jun 2008)  12.702%     17.216%
              TOTALS   Base Units                   512,961.00  431,221.00
                       Comparison Units             584,475.00  512,961.00
    4) Finally, let's suppose we want to know the deltas (differences) of Base vs Comparison
    units, for both number of units and %. The report now look as below:
    Material  Plant                                 2008/06     2008/07
    ===================================================================
    MAT1      PLANT-A  
                       Base Units (May 2008)        438,721.00  356,981.00
                       Base Units % (May 2008)      85.527%     85.527%
                       Comparison Units (June 2008) 510,235.00  438,721.00
                       Comparison Units %(Jun 2008) 87.298%     82.784%
                       Delta base vs. comp. units %  1.77%       2.74%
                       Delta base vs. comp. units    71,514.00  81,740.00
              PLANT-B  
                       Base Units (May 2008)         74,240.00   74,240.00
                       Base Units % (May 2008)       14.473%     15.702%
                       Comparison Units (June 2008)  74,240.00   74,240.00
                       Comparison Units %(Jun 2008)  12.702%     17.216%
                       Delta base vs. comp. units %  -1.77%      -2.74%
                       Delta base vs. comp. units         0.00        0.00
              TOTALS   Base Units                   512,961.00  431,221.00
                       Comparison Units             584,475.00  512,961.00
    5) PROBLEM:
    In my report, the "Delta base vs. comp. units %" is not working as expected and
    calculates number of units just as "Delta base vs. comp. units" does instead of calculating the % difference.
    So my report looks as follows:
    Material  Plant                                 2008/06     2008/07
    ===================================================================
    MAT1      PLANT-A  
                       Base Units (May 2008)        438,721.00  356,981.00
                       Base Units % (May 2008)      85.527%     85.527%
                       Comparison Units (June 2008) 510,235.00  438,721.00
                       Comparison Units %(Jun 2008) 87.298%     82.784%
                       Delta base vs. comp. units %  71,514.00  81,740.00 <<<WRONG!!
                       Delta base vs. comp. units    71,514.00  81,740.00
              PLANT-B  
                       Base Units (May 2008)         74,240.00   74,240.00
                       Base Units % (May 2008)       14.473%     15.702%
                       Comparison Units (June 2008)  74,240.00   74,240.00
                       Comparison Units %(Jun 2008)  12.702%     17.216%
                       Delta base vs. comp. units %       0.00        0.00
                       Delta base vs. comp. units         0.00        0.00
              TOTALS   Base Units                   512,961.00  431,221.00
                       Comparison Units             584,475.00  512,961.00
    The formulas are:
    a) Delta base vs. comp. units %
      Delta base vs. comp. units % = Comparison Units % - Base Units %
    b) Delta base vs. comp. units
      Delta base vs. comp. units = Comparison Units - Base Units
    The KFs
    - Comparison Units %
    - Base Units %
    Are RESTRICTED key figures (restricted to Base and comparison month variables) which
    are setup as:
    1) Calculate Result As:  Summation of Rounded Values
    2) Calculate Single Value as: Normalization of result
    3) Calculate Along the Rows
    The KFs
    - Delta base vs. comp. units %
    - Delta base vs. comp. units
    are FORMULAS setup to:
    1) Calculate Result As:  Nothing defined
    2) Calculate Single Value as: Nothing defined
    3) Calculate Along the Rows: user default direction (grayed out)
    Thanks for the time taken to read in detail all of this. Long text but necessary to understand what the problem is.
    Any help is highly appreciated.
    Thank you.
    Mario

    Hi,
    The subraction will be carried out before doing the normalization of your KF's. So, it is displaying "number of units". Create a calculated keyfigure and subtract the KF's and in the properties of this calculated keyfigure, change the enhancement as "After Aggregation".
    I hope this will solve your issue.
    Regards,
    S P.

  • Events in SubVi not working as expected

    Hi, I am reposting this question as my previous one didn't resulted in any satisfactory conclusion.
    I have attached my Vi's which are not working as expected. If I remove ONE subVi and its associated 3 controls and two indicators, the other one works just fine, but when I add two SUB Vis, it goes messy. I am trying to learn this way, I am sure it can be done many other ways, but please help me finding out the problem doing it this way as in my final MainVi, I would like to use 8 such sub Vis. Thanks.
    Solved!
    Go to Solution.
    Attachments:
    Main.vi ‏11 KB
    SubVi.vi ‏12 KB
    SubVi_2.vi ‏15 KB

    Your main problem is DATA FLOW.  A loop cannot iterate until EVERYTHING in it has completed.  So, as you have it, you have to have both event structures execture before you can go back to look for the next event.  So if you insist on having these subVIs, they need to be in seperate loops.
    BTW, you can get away with a single subVI.  Go into the VI properties and make it reentrant (preallocated clone).  Then each call of your subVI will have its own memory space.  A lot easier to maintain that way.
    And I know you said you didn't want alternatives, but here's how you can do it all with a single event structure in your main loop.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines
    Attachments:
    Main_MODTR.vi ‏10 KB

  • AFS ARUN Size Substitution Not Working As Expected

    Hi All,
    I need help with this. If any one of you have worked with AFS ARUN size substitution, kindly provide me with some details on how can I set it up. I am specially interested in setting up size substitution with two-dimensional grids.
    I have setup some examples but it does not work as expected.
    Here is a small example:
    Say I have a size 28/30, 28/32 .........29/30....
    What I want to achieve is that during ARUN if there is a shortage of stock in 28/30 then the remaining requirement qty should be confirmed from size 28/32.
    with my setup after 28/30 it goes into looking for stock in 29/30, which is what I do not want.
    Any inputs will be really appreciated.
    Thanks!!

    srdfrn wrote:
    Hi YOS,
    I tried importing a PCX image into CVI 2010 and then sizing the image to the control and didn't see the behavior you have been describing.  Would you mind posting an example (alongside an image file) that demonstrates this?
    Also, one thing I noticed is that PCX images appear to be quite dated.  Could upgrading them to a JPEG or PNG format be an option for you?
    Thanks,
    Stephanie R.
    National Instruments
    Stephanie, thanks for the reply.
    I am very sorry to state that I made a mistake.
    VAL_SIZE_TO_IMAGE indeed works.
    What fails to work is VAL_SIZE_TO_PICTURE. (Second option in Fit Mode attribute in control editing panel)
    I tried with JPEG and it's the same.
    I am attaching an example.(Load_Image.c & ONEP_3Trow_POS1.JPG)
    A panel with two picture rings.
    - SW_1 remains at the intended size and the loaded picture is not clear.
    - SW_2 will fit to picture size and looks OK.
    Appreciate your support,
    YOSsi Seter
    Attachments:
    Load_Image.c ‏2 KB
    ONEP_3Trow_POS1.JPG ‏4 KB

  • Notification "Launch the app and go to the library" not working as expected

    Hello,
    we are sending notification "Launch the app and go to the library" - but it's not working as expected, it's still just launching app with last open folio.
    Whats wrong there? Do we need v30 app? We have V29, but this is not mentioned in documentation.
    Thanks
    Martin

    Ah.
    Ok, now it's clear.
    Anyway i would appreciate possibility to force viewer to switch to library view after new issue is detected, even without notification. Quite often requested feature - "there is new cover in Newsstand, but customer don't know how to download new publication easily".
    Martin

  • TCP Window sizing not working as expected for Windows server 2008 R2 SP1

    Hi ,
    TCP window size is not working as expected. It is varying . Aplied the hotfix suggested by Microsoft and set the multipliccation factor as 1.The window size is not getting auto tuned based on the client machine. The data transfer rate is getting degraded.
    Please help.
    Thanks,
    Pro1962

    Hi,
    I think window auto-tuning is enabled.
    You can disable it by running the following commend.
    netsh interface tcp set global autotuninglevel=disabled
    Hope this helps.

  • Container-Managed Transaction Type Attributes not working as expected

    I am having a problem with the container-managed transactions not working as expected. I have 2 methods that work as follows:
    MethodA{
    for(a lot)
    call MethodB;
    @Transaction Type = RequiresNew
    MethodB{
    EntityManager Persist to database
    I want the code in MethodB to be committed to the database when methodB returns. The problem is that I am running out of memory and MethodA is failing. When methodA fails after numerous calls to MethodB nothing is persisted to the database.
    It is my understanding that when using requires new transactions that a new transaction is started for each call to the method and ends when the method returns while the calling method transaction is suspended.
    How am I misunderstanding the requiresNew transaction attribute. What can I do to make a batch insert into my database that will not run out of memory (commit when a methodB returns)?
    Thanks in advance.

    The problem is that EJB invocation semantics for security, container-managed transactions, etc.
    only apply when an invocation is made through an EJB reference. In your case, you are directly
    invoking the implementation method from within the bean. The EJB container has no idea that's
    happening. It's no different than invoking a utility method.
    In order to get the behavior you'd like, you need to retrieve a reference to your own bean and invoke
    through that. You can use SessionContext.getBusinessObject() to get the EJB reference for the
    business interface through which the method in question is exposed.
    --ken                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • UpsertDocumentAsync not working as expected

    I'm using UpsertDocumentAsync to either insert or update a document, but it doesn't seem to work as expected. When I use it either inserts / creates or
    replaces the document. I doubt I'm calling it wrong?
    await client.UpsertDocumentAsync(documentsLink, this.document);
    Working as expected (but with incorrect name) or not working as expected?
    Regards,
    Joakim
    Joakim Rosendahl Consultant at OnTrax AB, Sweden.

    Found this one (doesn't contain the work PATCH though)
    http://feedback.azure.com/forums/263030-documentdb/suggestions/7075256-provide-for-upsert
    Voted for that one, but it doesn't seem like the developer community is interested in upsert/patch functionality =/.
    Joakim Rosendahl Consultant at OnTrax AB, Sweden.

  • Exchange Online Protection (standalone) permissions are not working as expected

    Exchange Online Protection (standalone)  permissions are not working as expected.
    we provided access to Hygiene Management to some members and they not able to access EOP site.
    This is standalone EOP.
    ksrugi

    Hi,
    what roles did you have assigned to them and what error message do you get?
    Greetings
    Christian
    Christian Groebner MVP Forefront

Maybe you are looking for

  • After Downloading, Error while opening PDF  : PDF has no pages

    After Downloading, Error while opening PDF  : PDF has no pages CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'     EXPORTING       SRC_SPOOLID              = L_SPOOLNO       NO_DIALOG                = SPACE       DST_DEVICE               = MSTR_PRINT_PARM

  • Network in a Solaris 10/x86

    I have machines one running Linux and the other Solaris 10...I installed a NIC in both machines but I am unable to get the network going.. ifconfig -a gives the names of the NIC interface for the 2 machines, but ping does not work. Also I tried using

  • Enhancement for VL32N

    Hi, In vl32n transaction when we save the particular inbound delivery I want to perform material to material transfer posting by triggering MIGO transaction and changing the batch number . Can u suggest any enhancement for this requirement?

  • HT4972 forgoten my password for restore backup

    Hi, Ive just done my IOS updating, unfortunately ive forgotten my password to restore the back up. Anyone could help? Please. Thanks

  • Error 5100 - Adobe Download Assistant

    How do I fix Error 5100? I am trying to download Adobe Illustrator, but need the Download Assistant first. Thank you!