Query about BPEL functionality

I'm investigation BPEL's suitability for a project I'm working on and I'm having difficulty finding answers to the following questions:
Is there a means to locate all instances that meet common criteria (e.g. all instances in a specific process flow or all instances at a specific activity within a specific process flow)?
Is there a way to find out which activity and process flow a process instance is currently on?
Is there a way to override the process flow and move a process instance from one activity to another?

Hi, what exactly are you trying to achieve? In fact, I don't know if you can define more than one partnerLinkType in a wsdl. But only to play a little bit around with the idea (to learn):
You have different operations with different input and output messages (let's forget about the fault ones).
You have a port type which is bringing the operations together for the web service.
You have a partner link describing the roles for the port type.
(correct me if I'm mistaken, I'm still a newbie).
A guess: Trying to split up given operations for a web service onto different partnerLinks?
Regards,
Hansi

Similar Messages

  • BPEL function to query the Element Name and get the count of elements

    Hi Guys,
    I have problem with the following, can you please help me out with this.
    Say i have an xml pay load:
    <ns1:sampleEBO>
                   <ns1:PhysicalLocation>
                   <ns1:propertis>
                        <ns1:filedType>12</ns1:filedType>
                             <ns1:filedType1>12</ns1:filedType1>
                             <ns1:filedType2>12</ns1:filedType2>
    <ns1:filedType3>12</ns1:filedType3>
                             <ns1:filedType4>12</ns1:filedType4>
                             <ns1:filedType5>12</ns1:filedType5>
    </ns1:properties>
    <ns1:propertis>
                        <ns1:filedType>12</ns1:filedType>
                             <ns1:filedType1>12</ns1:filedType1>
                             <ns1:filedType2>12</ns1:filedType2>
    <ns1:filedType3>12</ns1:filedType3>
                             <ns1:filedType4>12</ns1:filedType4>
                             <ns1:filedType5>12</ns1:filedType5>
                   </ns1:properties>
    <ns1:sampleEBO>
                   <ns1:PhysicalLocation>
    Here i want to retrive the Element name ( filedType,fieldType1,fieldType2......) using any BPEL function, not the value and also get the total number of elements in the each node ( <properties> ). If i am using the "count" function its returning 2 and it's counting the properties node not the elements in the properties node.
    So, can you please let me know of any function in BPEL which can do this ?
    Thanks,
    Krish

    you only want to use a default bpel function for this? not from within xsl?
    and the function should return an arraylist of elementnames i assume ?
                   <xsl:for-each select="//properties">
                        <xsl:for-each select="./*">
                             <xsl:value-of select="local-name()"/>
                             <xsl:choose>
                                  <xsl:when test="substring(local-name(),1,9) ='filedType' ">
                             </xsl:when>
                             </xsl:choose>
                        </xsl:for-each>
                   </xsl:for-each>
                   <count1><xsl:value-of select="count(//properties[1]/*)"/></count>
                   <count2><xsl:value-of select="count(//properties[2]/*)"/></count>the count can also be used in some for-each construction or from within your bpel flow itself (if you want to loop over there, instead of xsl)

  • Query quiz find a query for sine function distribution

    Let me tell you something about distribution function.
    Here, i use the term, 'distribution function' differently from what we use in general mathematics.
    See the following query which generates self-counting sequence.
    SELECT     TRUNC (1 / 2 + SQRT (2 * LEVEL)) level#
          FROM DUAL
    CONNECT BY LEVEL <= 1000LEVEL#
    1
    2
    2
    3
    3
    3
    4
    4
    4
    4
    5
    5
    5
    5
    5
    and, if we add some group by and counting to the above query...
    SELECT   level#
           , LPAD ('*', COUNT (*), '*')
        FROM (SELECT     TRUNC (1 / 2 + SQRT (2 * LEVEL)) level#
                    FROM DUAL
              CONNECT BY LEVEL <= 1000)
    GROUP BY level#we can see a graph like below
    LEVEL# LPAD('*',COUNT(*),'*')
    1      *
    2      **
    3      ***
    4      ****
    5      *****
    6      ******
    7      *******
    8      ********
    9      *********
    10     **********
    11     ***********
    12     ************
    13     *************
    14     **************
    15     ***************
    16     ****************
    17     *****************
    18     ******************
    19     *******************
    20     ********************
    ...As we all know, this is like a function f(x) = x.
    i use the term, 'distribution function' as this meaning!
    Distribution of numbers of data values.
    Now, my question is this.
    Find a query that generates distribution function f(x) = sin(x)
    (Here, any amplitude and any period of sine function is allowed except zero.
    And only the form of sine function is important.
    No subquery factoring or user-defined function or procedure is allowed.
    Use simple select statement only.)
    And now, have a good challenge!
    SELECT   level#
           , LPAD ('*', COUNT (*), '*')
        FROM (
       -------- some query -------------------
    GROUP BY level#
    LEVEL# LPAD('*',COUNT(*),'*')
    0      *
    1      **
    2      *******
    3      *************
    4      *****************
    5      **********************
    6      **************************
    7      ******************************
    8      **********************************
    9      **************************************
    10     ****************************************
    11     ********************************************
    12     *********************************************
    13     ************************************************
    14     *************************************************
    15     *************************************************
    16     **************************************************
    17     **************************************************
    18     *************************************************
    19     ************************************************
    20     ***********************************************
    21     ********************************************
    22     ******************************************
    23     ***************************************
    24     ***********************************
    25     ********************************
    26     ****************************
    27     ************************
    28     *******************
    29     **************
    30     *********
    31     *****Query Your Dream & Future at
    http://www.soqool.com

    It's cheating but, hey I wanted to draw pretty pictures too... :o))
    SQL> SELECT rn as degrees, decode(sign(val),-1,lpad(' ', scale-abs(val), ' ')
      2                        ||lpad('*',abs(val),'*'), lpad(' ', scale, ' ')||lpad('*',val,'*')) as graph
      3  from
      4  (select rownum-1 rn, (sin(((rownum-1)/180)*acos(-1))) * x.scale as val, x.scale
      5  from dual, (select 50 as scale from dual) x
      6  connect by rownum <= 360);
       DEGREES GRAPH
             0
             1
             2                                                   *
             3                                                   **
             4                                                   ***
             5                                                   ****
             6                                                   *****
             7                                                   ******
             8                                                   ******
             9                                                   *******
            10                                                   ********
            11                                                   *********
            12                                                   **********
            13                                                   ***********
            14                                                   ************
            15                                                   ************
            16                                                   *************
            17                                                   **************
            18                                                   ***************
            19                                                   ****************
            20                                                   *****************
            21                                                   *****************
            22                                                   ******************
            23                                                   *******************
            24                                                   ********************
            25                                                   *********************
            26                                                   *********************
            27                                                   **********************
            28                                                   ***********************
            29                                                   ************************
            30                                                   *************************
            31                                                   *************************
            32                                                   **************************
            33                                                   ***************************
            34                                                   ***************************
            35                                                   ****************************
            36                                                   *****************************
            37                                                   ******************************
            38                                                   ******************************
            39                                                   *******************************
            40                                                   ********************************
            41                                                   ********************************
            42                                                   *********************************
            43                                                   **********************************
            44                                                   **********************************
            45                                                   ***********************************
            46                                                   ***********************************
            47                                                   ************************************
            48                                                   *************************************
            49                                                   *************************************
            50                                                   **************************************
            51                                                   **************************************
            52                                                   ***************************************
            53                                                   ***************************************
            54                                                   ****************************************
            55                                                   ****************************************
            56                                                   *****************************************
            57                                                   *****************************************
            58                                                   ******************************************
            59                                                   ******************************************
            60                                                   *******************************************
            61                                                   *******************************************
            62                                                   ********************************************
            63                                                   ********************************************
            64                                                   ********************************************
            65                                                   *********************************************
            66                                                   *********************************************
            67                                                   **********************************************
            68                                                   **********************************************
            69                                                   **********************************************
            70                                                   **********************************************
            71                                                   ***********************************************
            72                                                   ***********************************************
            73                                                   ***********************************************
            74                                                   ************************************************
            75                                                   ************************************************
            76                                                   ************************************************
            77                                                   ************************************************
            78                                                   ************************************************
            79                                                   *************************************************
            80                                                   *************************************************
            81                                                   *************************************************
            82                                                   *************************************************
            83                                                   *************************************************
            84                                                   *************************************************
            85                                                   *************************************************
            86                                                   *************************************************
            87                                                   *************************************************
            88                                                   *************************************************
            89                                                   *************************************************
            90                                                   **************************************************
            91                                                   *************************************************
            92                                                   *************************************************
            93                                                   *************************************************
            94                                                   *************************************************
            95                                                   *************************************************
            96                                                   *************************************************
            97                                                   *************************************************
            98                                                   *************************************************
            99                                                   *************************************************
           100                                                   *************************************************
           101                                                   *************************************************
           102                                                   ************************************************
           103                                                   ************************************************
           104                                                   ************************************************
           105                                                   ************************************************
           106                                                   ************************************************
           107                                                   ***********************************************
           108                                                   ***********************************************
           109                                                   ***********************************************
           110                                                   **********************************************
           111                                                   **********************************************
           112                                                   **********************************************
           113                                                   **********************************************
           114                                                   *********************************************
           115                                                   *********************************************
           116                                                   ********************************************
           117                                                   ********************************************
           118                                                   ********************************************
           119                                                   *******************************************
           120                                                   *******************************************
           121                                                   ******************************************
           122                                                   ******************************************
           123                                                   *****************************************
           124                                                   *****************************************
           125                                                   ****************************************
           126                                                   ****************************************
           127                                                   ***************************************
           128                                                   ***************************************
           129                                                   **************************************
           130                                                   **************************************
           131                                                   *************************************
           132                                                   *************************************
           133                                                   ************************************
           134                                                   ***********************************
           135                                                   ***********************************
           136                                                   **********************************
           137                                                   **********************************
           138                                                   *********************************
           139                                                   ********************************
           140                                                   ********************************
           141                                                   *******************************
           142                                                   ******************************
           143                                                   ******************************
           144                                                   *****************************
           145                                                   ****************************
           146                                                   ***************************
           147                                                   ***************************
           148                                                   **************************
           149                                                   *************************
           150                                                   *************************
           151                                                   ************************
           152                                                   ***********************
           153                                                   **********************
           154                                                   *********************
           155                                                   *********************
           156                                                   ********************
           157                                                   *******************
           158                                                   ******************
           159                                                   *****************
           160                                                   *****************
           161                                                   ****************
           162                                                   ***************
           163                                                   **************
           164                                                   *************
           165                                                   ************
           166                                                   ************
           167                                                   ***********
           168                                                   **********
           169                                                   *********
           170                                                   ********
           171                                                   *******
           172                                                   ******
           173                                                   ******
           174                                                   *****
           175                                                   ****
           176                                                   ***
           177                                                   **
           178                                                   *
           179
           180
           181
           182                                                 *
           183                                                **
           184                                               ***
           185                                              ****
           186                                             *****
           187                                            ******
           188                                            ******
           189                                           *******
           190                                          ********
           191                                         *********
           192                                        **********
           193                                       ***********
           194                                      ************
           195                                      ************
           196                                     *************
           197                                    **************
           198                                   ***************
           199                                  ****************
           200                                 *****************
           201                                 *****************
           202                                ******************
           203                               *******************
           204                              ********************
           205                             *********************
           206                             *********************
           207                            **********************
           208                           ***********************
           209                          ************************
           210                         *************************
           211                         *************************
           212                        **************************
           213                       ***************************
           214                       ***************************
           215                      ****************************
           216                     *****************************
           217                    ******************************
           218                    ******************************
           219                   *******************************
           220                  ********************************
           221                  ********************************
           222                 *********************************
           223                **********************************
           224                **********************************
           225               ***********************************
           226               ***********************************
           227              ************************************
           228             *************************************
           229             *************************************
           230            **************************************
           231            **************************************
           232           ***************************************
           233           ***************************************
           234          ****************************************
           235          ****************************************
           236         *****************************************
           237         *****************************************
           238        ******************************************
           239        ******************************************
           240       *******************************************
           241       *******************************************
           242      ********************************************
           243      ********************************************
           244      ********************************************
           245     *********************************************
           246     *********************************************
           247    **********************************************
           248    **********************************************
           249    **********************************************
           250    **********************************************
           251   ***********************************************
           252   ***********************************************
           253   ***********************************************
           254  ************************************************
           255  ************************************************
           256  ************************************************
           257  ************************************************
           258  ************************************************
           259 *************************************************
           260 *************************************************
           261 *************************************************
           262 *************************************************
           263 *************************************************
           264 *************************************************
           265 *************************************************
           266 *************************************************
           267 *************************************************
           268 *************************************************
           269 *************************************************
           270 **************************************************
           271 *************************************************
           272 *************************************************
           273 *************************************************
           274 *************************************************
           275 *************************************************
           276 *************************************************
           277 *************************************************
           278 *************************************************
           279 *************************************************
           280 *************************************************
           281 *************************************************
           282  ************************************************
           283  ************************************************
           284  ************************************************
           285  ************************************************
           286  ************************************************
           287   ***********************************************
           288   ***********************************************
           289   ***********************************************
           290    **********************************************
           291    **********************************************
           292    **********************************************
           293    **********************************************
           294     *********************************************
           295     *********************************************
           296      ********************************************
           297      ********************************************
           298      ********************************************
           299       *******************************************
           300       *******************************************
           301        ******************************************
           302        ******************************************
           303         *****************************************
           304         *****************************************
           305          ****************************************
           306          ****************************************
           307           ***************************************
           308           ***************************************
           309            **************************************
           310            **************************************
           311             *************************************
           312             *************************************
           313              ************************************
           314               ***********************************
           315               ***********************************
           316                **********************************
           317                **********************************
           318                 *********************************
           319                  ********************************
           320                  ********************************
           321                   *******************************
           322                    ******************************
           323                    ******************************
           324                     *****************************
           325                      ****************************
           326                       ***************************
           327                       ***************************
           328                        **************************
           329                         *************************
           330                         *************************
           331                          ************************
           332                           ***********************
           333                            **********************
           334                             *********************
           335                             *********************
           336                              ********************
           337                               *******************
           338                                ******************
           339                                 *****************
           340                                 *****************
           341                                  ****************
           342                                   ***************
           343                                    **************
           344                                     *************
           345                                      ************
           346                                      ************
           347                                       ***********
           348                                        **********
           349                                         *********
           350                                          ********
           351                                           *******
           352                                            ******
           353                                            ******
           354                                             *****
           355                                              ****
           356                                               ***
           357                                                **
           358                                                 *
           359
    360 rows selected.
    SQL>

  • DB buffer cache vs. SQL query & PL/SQL function result cache

    Hi all,
    Started preparing for OCA cert. just myself using McGraw Hill's exam guide. Have a question about memory structures.
    Actually, DB buffer cache is used to copy e.g. SELECT queries result data blocks, that can be reused by another session (server process).
    There is also additional otion - SQL query & PL/SQL function result cache (from 11g), where also stored the results of such queries.
    Do they do the same thing or nevertheless there is some difference, different purpose?
    thanks in advance...

    There is also additional otion - SQL query & PL/SQL function result cache (from 11g), where also stored the results of such queries.Result cache located in shared pool.So it is one component of shared pool.When server process execute query(and if you configured result cache) then result will store in shared pool.Then next execution time run time mechanism will detect and consider using result cache without executing this query(if data was not changed this is happen detection time)
    Do they do the same thing or nevertheless there is some difference, different purpose?.Buffer cache and result cache are different things and purpose also,but result cache introduced to improve response time of query in 11g(but such mechanism also implemented in 10g subquery execution,in complex query).In buffer cache holds data blocks but not such results.
    Edited by: Chinar on Nov 4, 2011 4:40 AM
    (Removing lots of "But" word from sentences :-) )

  • Query on bpel.config.OneWayDelivery Property

    Hello,
    I have a query on bpel.config.OneWayDelivery Property.
    Scenario : In case of any error in BpelProcess A , it will call BpelProcess B .So BpelProcessB will be called in the catchAll branch of Process A. After calling Process B, i am throwing a fault in Process A to rollback process A (as there is a DB adpater in it which i want to roll back). To invoke Process B in a separate transaction i set the bpel.config.transaction to requires new in the component section of composite.xml of process B. Please not Process B is ASynchronous process. Now :
    Case 1: By setting only bpel.config.transaction property to 'requiresnew'.
    Process A gets error, it calls Process B and it itself get rolledback (because of throw activity after a call to Process B). Now in the instance of Process A i am not able to see the trace of Process B. Only Process B name is appearing, also Process B didn't get executed at all or might be rolledback along with process A (not sure on this).
    Case 2: By setting only bpel.config.transaction property to 'requiresnew' and  bpel.config.OneWayDelivery property to 'sync'.
    In this case everything works fine like Process A call Process B in case of Error. Process A get rolledback successfully and i am able to see the trace of Process B as it get executed successfully.
    Questions :
    In case1 though i have set the transaction=requiresnew, why Process B is not getting executed and i am not able to see the trace of it.Ideally Process B should get executed in a seperate transaction. While in Case2, everything works fine. So what exactly happening after placing 'OnewayDelivery' Property, that it started working.
    I have went through the documents on 'OnewayDelivery', but i didn't get the clear idea corresponding to my scenarios explained above.
    Can anyone please explain on how exactly 'OnewayDelivery' property works.
    Thanks.

    So,
    For Case 1 : When Process B is getting executed in a separate Thread and Transaction , then when process A is getting rolled back why B is also getting rolled back as it's in different thread althgether.
    3) For Case2 : Please clear my following understanding :
    When we set the value to 'sync' for process B, then B will act like a synchronous process(ideally it Async), and will get committed after the it's execution. Because of this, even if A is getting rolled back, B will not get rolledback because it is already committed. For case 1:
    By calling process B, an invocation message is being insert into the dehydration store. That causes process B to be created as a new thread/transaction.
    When you perform rollback->the new transaction that was made following the new thread, is being rollback among the rest of your process transaction(the rollback causes the message not to be save and for that you can't see new instance).
    For case 2:
    By calling process B, only a new transaction is being creating, and invocation message is not being insert into the dehydration store.
    So actualy, you have 1 thread and 2 transactions, and you are telling your process(thread) to rollback only the current transaction and not the new one (process A not owns the new transaction).
    2) You mentioned if we are calling Process B with No Rollback. How to call B with No Rollback? Is there any property like that? It was just an example. Forget about it.
    I hope it answered you questions...
    Arik

  • DML question about LAG function

    Hello,
    I am trying to get a month-to-date number on a value that is stored as YTD in the cube. That is, for today's month-to-date number, I want to subtract today's value, from last month's value. I am trying to do this with the following statement:
    data - lag(chgdims(data limit lmt(time to parents using time_parentrel)),1,time)
    I'm pretty new to DML, but I know that this is clearly not the correct formula. Does anyone have any ideas on how to do this?
    Thanks

    Dear Fred-san
    Thank you very much for your support on this.
    But, may I double check about what you mentioned above?
    So, what you were mentioning was that if some user executes the query with
    the function module (RFC_READ_TABLE), under the following conditions, he can access to
    the HR data even when he does not have the authorizations for HR transactions?
    <Conditions>
    1. the user has the authorization for HR database tables themselves
    2. RFC_READ_TABLE is called to retrieve the data from HR database
    <example>
    Data: LF_HR_TABLE like  DD02L-TABNAME value 'PA0000'.
    CALL FUNCTION 'RFC_READ_TABLE'
       EXPORTING
        query_table                = LF_HR_TABLE
      TABLES
       OPTIONS                    =
       fields                     =
       data                       =    .
    But then, as long as we call this function module for a non-critical tables such as
    VBAP (sales order) or EKKO (purchase order) within our query, it wouldn't seem to be
    so security risk to use RFC_READ_TABLE...
    Besides, each query (infoset query) has got the concept of user groups, which limits
    the access to the queries within the user group.
    ※If someone does not belong to the user group, he cannot execute the queries within that
       user group, etc
    So, my feeling is that even infoset queries does have authorization concept...
    Would you give me your thought on this?
    I also thank you for your information for SCU0.
    That is an interesting transaction
    Kind regards,
    Takashi

  • Question about the function module (RFC_READ_TABLE)

    Dear everyone
    Could I ask you a question about the function module (RFC_READ_TABLE)?
    I was asked if it's possible to create a report which compares the data between different SAP systems (both production systems).
    Now, the easiest way would be to use the function module (RFC_READ_TABLE) within a SAP infoset query (SQ01 type query).
    But I heard the rumor that using the function module (RFC_READ_TABLE) is not advisable due to the security reason.
    However, I am not exactly sure what sort of security problems this function module can possibly have...
    Would you help me on this?
    I also would like to know if using "remote enabled module" type function module can always overcome this possible security issue.
    Or, are there any points that I need to be careful about even when I use "remote enabled module" function module?
    Thank you very much in advance.
    Takashi

    Dear Fred-san
    Thank you very much for your support on this.
    But, may I double check about what you mentioned above?
    So, what you were mentioning was that if some user executes the query with
    the function module (RFC_READ_TABLE), under the following conditions, he can access to
    the HR data even when he does not have the authorizations for HR transactions?
    <Conditions>
    1. the user has the authorization for HR database tables themselves
    2. RFC_READ_TABLE is called to retrieve the data from HR database
    <example>
    Data: LF_HR_TABLE like  DD02L-TABNAME value 'PA0000'.
    CALL FUNCTION 'RFC_READ_TABLE'
       EXPORTING
        query_table                = LF_HR_TABLE
      TABLES
       OPTIONS                    =
       fields                     =
       data                       =    .
    But then, as long as we call this function module for a non-critical tables such as
    VBAP (sales order) or EKKO (purchase order) within our query, it wouldn't seem to be
    so security risk to use RFC_READ_TABLE...
    Besides, each query (infoset query) has got the concept of user groups, which limits
    the access to the queries within the user group.
    ※If someone does not belong to the user group, he cannot execute the queries within that
       user group, etc
    So, my feeling is that even infoset queries does have authorization concept...
    Would you give me your thought on this?
    I also thank you for your information for SCU0.
    That is an interesting transaction
    Kind regards,
    Takashi

  • Query about multiple connection pools under one database

    Hi,
    I have s query about connection pool, now we have a requirement,
    we have two schemas in one db, some data store in one schema, some in another schema,
    all tables are the same, but data is different, we want to retrive all data under two schemas,
    so we need two connection pools under one database,
    I have set two system DSN, and each connection pool was mapping to one DSN,
    but after I importing tables into RPD, when I view data, there is a dialog let me select connection pool. so If this, when we drag columns in answer, it will definitely get wrong.
    so how to realize this function about multiple connection pools under one database and we can get data normally.

    Hi,
    Try this step
    1)Better to create two different DSN for the same database with different user id and password
    2)now create multiple connection pool in the same database in u r RPD physical layer .
    also refer this link : for imporving performance
    http://obiee101.blogspot.com/2009/01/obiee-multiple-connection-pools.html
    http://gerardnico.com/wiki/dat/obiee/connection_pool
    Thanks
    Deva

  • A query regarding synchronised functions, using shared object

    Hi all.
    I have this little query, regarding the functions that are synchronised, based on accessing the lock to the object, which is being used for synchronizing.
    Ok, I will clear myself with the following example :
    class First
    int a;
    static int b;
    public void func_one()
    synchronized((Integer) a)
    { // function logic
    } // End of func_one
    public void func_two()
    synchronized((Integer) b)
    { / function logic
    } // End of func_two
    public static void func_three()
    synchronized((Integer) a)
    { // function logic
    } // End of func_three, WHICH IS ACTUALLY NOT ALLOWED,
    // just written here for completeness.
    public static void func_four()
    synchronized((Integer) b)
    { / function logic
    } // End of func_four
    First obj1 = new First();
    First obj2 = new First();
    Note that the four functions are different on the following criteria :
    a) Whether the function is static or non-static.
    b) Whether the object on which synchronization is based is a static, or a non-static member of the class.
    Now, first my-thoughts; kindly correct me if I am wrong :
    a) In case 1, we have a non-static function, synchronized on a non-static object. Thus, effectively, there is no-synchronisation, since in case obj1 and obj2 happen to call the func_one at the same time, obj1 will obtain lock for obj1.a; and obj2 will obtain lock to obj2.a; and both can go inside the supposed-to-be-synchronized-function-but-actually-is-not merrily.
    Kindly correct me I am wrong anywhere in the above.
    b) In case 2, we have a non-static function, synchronized on a static object. Here, again if obj1, and obj2 happen to call the function at the same time, obj1 will try to obtain lock for obj1.a; while obj2 will try to obtain lock for obj2.a. However, since obj1.a and obj2.a are the same, thus we will indeed obtain sychronisation.
    Kindly correct me I am wrong anywhere in the above.
    c) In case 3, we have a static function , synchronized on a non-static object. However, Java does not allow functions of this type, so we may safely move forward.
    d) In case 4, we have a static function, synchronized on a static object.
    Here, again if obj1, and obj2 happen to call the function at the same time, obj1 will try to obtain lock for obj1.a; while obj2 will try to obtain lock for obj2.a. However, since obj1.a and obj2.a are the same, thus we will indeed obtain sychronisation. But we are only partly done for this case.
    First, Kindly correct me I am wrong anywhere in the above.
    Now, I have a query : what happens if the call is made in a classically static manner, i.e. using the statement "First.func_four;".
    Another query : so far we have been assuming that the only objects contending for the synchronized function are obj1, and obj2, in a single thread. Now, consider this, suppose we have the same reference obj1, in two threads, and the call "obj1.func_four;" happens to occur at the same time from each of these threads. Thus, we have obj1 rying to obtain lock for obj1.a; and again obj1 trying to obtain lock for obj1.a, which are the same locks. So, if obj1.a of the first thread obtains the lock, then it will enter the function no-doubt, but the call from the second thread will also succeed. Thus, effectively, our synchronisation is broken.
    Or am I being dumb ?
    Looking forward to replies..
    Ashutosh

    a) In case 1, we have a non-static function, synchronized on a non-static object. Thus, effectively, there is no-synchronisationThere is no synchronization between distinct First objects, but that's what you specified. Apart from the coding bug noted below, there would be synchronization between different threads using the same instance of First.
    b) In case 2, we have a non-static function, synchronized on a static object. Here, again if obj1, and obj2 happen to call the function at the same time, obj1 will try to obtain lock for obj1.a; while obj2 will try to obtain lock for obj2.a.obj1/2 don't call methods or try to obtain locks. The two different threads do that. And you mean First.b, not obj1.b and obj2.b, but see also below.
    d) In case 4, we have a static function, synchronized on a static object. Here, again if obj1, and obj2 happen to call the function at the same time, obj1 will try to obtain lock for obj1.a; while obj2 will try to obtain lock for obj2.a.Again, obj1/2 don't call methods or try to obtain locks. The two different threads do that. And again, you mean First.b. obj1.b and obj2.b are the same as First.b. Does that make it clearer?
    Now, I have a query : what happens if the call is made in a classically static manner, i.e. using the statement "First.func_four;".That's what happens in any case whether you write obj1.func_four(), obj2.func)four(), or First.func_four(). All these are identical when func_four(0 is static.
    Now, consider this, suppose we have the same reference obj1, in two threads, and the call "obj1.func_four;" happens to occur at the same time from each of these threads. Thus, we have obj1 rying to obtain lock for obj1.aNo we don't, we have a thread trying to obtain the lock on First.b.
    and again obj1 trying to obtain lock for obj1.aYou mean obj2 and First.b, but obj2 doesn't obtain the lock, the thread does.
    which are the same locks. So, if obj1.a of the first thread obtains the lock, then it will enter the function no-doubt, but the call from the second thread will also succeed.Of course it won't. Your reasoning here makes zero sense..Once First.b is locked it is locked. End of story.
    Thus, effectively, our synchronisation is broken.No it isn't. The second thread will wait on the same First.b object that the first thread has locked.
    However in any case you have a much bigger problem here. You're autoboxing your local 'int' variable to a possibly brand-new Integer object every call, so there may be no synchronization at all.
    You need:
    Object a = new Object();
    static Object b = new Object();

  • SQL query (pl/sql function body returning query) performance issue

    I create my report in building my sql instruction with ( SQL Query pl/sql function body returning sql query );
    My report take more than 20 seconds however if i did a cut and paste with the sql code in TOAD the same sql take 1 second.
    To try to discover the source of the problem; i take the sql generated by the function and i create another report ( sql query ) this new report take 2 seconds.
    My query is very big 25,000 characters with database link.
    What is the difference between SQL-quey and sql-query(pl/sql function body returning sql query)
    Thanks
    Marc

    Marc,
    Firstly...don't compare the timings from Toad, since often Toad only fetches the first few records for you (i.e. it pages them).
    Secondly....the database link could be a factor here, but without seeing your query it's too hard to say.
    Can you post the query somewhere (on a webserver say)?

  • Query not considering function based index in oracle 11g

    I have a query which used Function Based Index when run in oracle 9i but when I run the same query
    without any changes, it does not consider index. Below is the query:
    SELECT distinct patient_role.domain_key, patient_role.patient_role_key,
    patient_role.emergency_contact_name,
    patient_role.emergency_contact_phone, patient_role.emergency_contact_note,
    patient_role.emergency_contact_relation_id,
    patient_role.financial_class_desc_id, no_known_allergies, patient_role.CREATED_BY,
    patient_role.CREATED_TIMESTAMP,
    patient_role.CREATED_TIMESTAMP_TZ, patient_role.UPDATED_BY, patient_role.UPDATED_TIMESTAMP,
    patient_role.UPDATED_TIMESTAMP_TZ,
    patient_role.discontinued_date
    FROM encounter, patient_role
    WHERE patient_role.patient_role_key = encounter.patient_role_key
    AND UPPER(TRIM(leading :SYS_B_0 from encounter.account_number)) = UPPER(TRIM(leading :SYS_B_1 from
    :SYS_B_2))
    AND patient_role.discontinued_date IS null
    AND encounter.discontinued_date IS null ;
    Index definition:
    CREATE INDEX "user1"."IX_TRIM_ACCOUNT_NUMBER" ON "user1."ENCOUNTER" (UPPER(TRIM(LEADING
    '0' FROM "ACCOUNT_NUMBER")), "PATIENT_ROLE_KEY", "DOMAIN_KEY", "DISCONTINUED_DATE")
    PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
    STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
    PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
    BUFFER_POOL DEFAULT)
    TABLESPACE "user1"
    Database : Oracle 11g (11.2.0.3)
    O/S : Linux 64 bit (the query does not consider index even on windows os)
    Any suggestions?
    -Onkar
    Edited by: onkar.nath on Jul 2, 2012 3:32 PM

    Onkar,
    I don't appreciate you posting this question in several forums at the same time.
    If I would know you also posted this on Asktom, I wouldn't even have bothered.
    As to your 'issue':
    First of all: somehow cursor_sharing MUST have been set to FORCE. Oracle is a predictable system, not a fruitmachine.
    Your statement the '0' is replaced by a bind variable anyway is simply false. If you really believe it is not false, SUBMIT a SR.
    But your real issue is not Oracle: it is your 'application', which is a mess anyway. Allowing for alphanumeric numbers is a really bad idea.
    Right now you are already putting workaround on workaround on workaround on workaround.
    Issue is the application: it is terminal., and you either need to kill it, or to replace it.
    Sybrand Bakker
    Senior Oracle DBA

  • Reg: SQL select Query in BPEL process flow

    <p>
    Hi,
    I am suppose to execute a SQL select query (in BPEL Process flow) as mention below in JDeveloper using Database adapter.
    </p>
    <p>
    SELECT LENGTH, WIDTH, HEIGHT, WEIGHT,
    </p>
    <p>
    LENGTH*WIDTH* HEIGHT AS ITEM_CUBE
    </p>
    <p>
    FROM CUBE
    </p>
    <p>
    WHERE ITEM= &lt;xyz&gt;
    </p>
    <p>
    AND OBJECT= (SELECT CASE_NAME FROM CUBE_SUPPLIER WHERE ITEM=&lt;xyz&gt; AND SUPP_IND = &lsquo;Y')
    <strong>Now my question is:
    1.</strong> What does this "*" refer to in the query and how can I retrieve the value of LENGTH*WIDTH* HEIGHT from the query where LENGTH,WIDTH and HEIGHT are the individual field in the table.
    2.What does this " AS" refer to? If " ITEM_CUBE " is the alies for the table name "ITEM" to retrieve the value, then query shoud be evaluated as
    </p>
    <p>
    SELECT LENGTH, WIDTH, HEIGHT, WEIGHT,
    </p>
    <p>
    LENGTH*WIDTH* HEIGHT AS ITEM_CUBE
    </p>
    <p>
    FROM CUBE
    </p>
    <p>
    WHERE <strong>ITEM_CUBE.ITEM</strong>= &lt;xyz&gt;
    </p>
    <p>
    AND <strong>ITEM_CUBE.OBJECT</strong>= (SELECT CASE_NAME FROM CUBE_SUPPLIER WHERE ITEM=&lt;xyz&gt; AND SUPP_IND = &lsquo;Y')
    Is my assumption correct?
    Please suggest asap.
    Thanks...
    </p>
    <p>
    </p>

    Hi
    Thank for your reply!
    I have a nested select query which performs on two different table as shown below:
    <p>
    SELECT LENGTH, WIDTH, HEIGHT, WEIGHT,
    </p>
    <p>
    LENGTH*WIDTH* HEIGHT AS ITEM_CUBE
    </p>
    <p>
    FROM CUBE
    </p>
    <p>
    WHERE ITEM= &lt;abc&gt;
    </p>
    <p>
    AND OBJECT= (SELECT NAME FROM SUPPLIER WHERE ITEM=&lt;Item&gt; AND SUPP_IND = &lsquo;Y')
    I am using DB adapter of Oracle JDeveloper in BPEL process flow, where I can able to select only one master table in DB adapter say SUPPLIER and its attributes at a time.But as per my requirment I need to select both the table (CUBE and SUPPLIER) in a single adapter to execute my query.
    It can be achievable by using two DB adapter , One to execute the nested query and another to execute the main qyery considering value of nested query as a parameter.But I want to achieve it by using a single one.
    Am I correct with my concept?
    Please suggest how to get it ?
    </p>
    Edited by: user10259700 on Oct 23, 2008 12:17 AM

  • SQL Query (pl/sql function body returning Sql query)

    Hi All,
    I have created a region of "SQL Query (pl/sql function body returning Sql query)" type and it is working fine , but when I am migrating(export /import) this application from development to systest environment ,
    It gives error for this region :
    Error ERR-1101 Unable to process function body returning query.
    OK
    ORA-06550: line 1, column 52: PLS-00306: wrong number or types of arguments in call to 'FU_TRADE_REPORT_QUERY' ORA-06550: line 1, column 45: PL/SQL: Statement ignored
    Any pointer ...why this is happening.
    Thanks
    Dikshit

    If your function is a stored function that is called from within APEX (function body not coded into the app itself), have you made sure that the function has been created and compiles ok prior to installing your apex app.
    If there are some dependency issues between other PL/SQL units or database objects that are causing your function not to be compiled, you apex install will fail as you are trying to reference an uncompelled bit of pl/sql.
    Let me know how you get on
    Regards
    Duncan

  • SQL Query(PL/SQL Function Returning SQL Query)

    I am trying to write a dynamic report using SQL Query(PL/SQL Function Returning SQL Query).
    I can get the report to run but I need to concatinate some columns into one, seperated by a comma or a dash.
    I have tried select *****||','||***** alias
    also select *****||'-'||***** alias
    but I always get an error.
    Is there a way of doing this please
    Gus

    This is my full query
    declare
    v_query varchar2(4000);
    begin
    if :P63_TRAN_INFO = 2 THEN
    v_query := 'select
         A.FILENR,
         A.EXERCISENAME,
    A.STARTDATE,
    A.ENDDATE,
         A.UNIT,
    A.ACCADDRESSES, B.ADDRESS, B.ADDRESS_1, B.POST_CODE, B.TOWN,
         A.EXERCISEAREAS,
         A.TOTALVEHICLES,
    A.TOTALTROOPS+A.RNTOTALTROOPS+A.RAFTOTALTROOPS TOTALTROOPS,
    A.CAR, A.MINIBUS, A.HGV,
    A.NAMERANK, A.ADDRESS, A.ADDRESSI, A.ADDRESSII, A.POSTCODE,
    A.TRANSIT,
    A.INFOONLY
    from     BFLOG_AT A, BFLOG_ACCADDRESS B
    WHERE A.ACCADDRESSES = B.NAME
    AND A.STARTDATE >= :P63_START_DATE
    AND A.ENDDATE <= :P63_END_DATE
    AND A.AUTHORISED = 1
    AND A.INFOONLY = 1' ;
    END IF;
    RETURN v_query;
    END;
    This query runs ok, but if I try changing it to the code below with fields concatinated, then it fails
    declare
    v_query varchar2(4000);
    begin
    if :P63_TRAN_INFO = 2 THEN
    v_query := 'select
         A.FILENR,
         A.EXERCISENAME,
    A.STARTDATE,
    A.ENDDATE,
         A.UNIT,
    A.ACCADDRESSES||','||B.ADDRESS||','||B.ADDRESS_1||','||B.POST_CODE||','||B.TOWN ADDRESS,
         A.EXERCISEAREAS,
         A.TOTALVEHICLES,
    A.TOTALTROOPS+A.RNTOTALTROOPS+A.RAFTOTALTROOPS TOTALTROOPS,
    A.CAR, A.MINIBUS, A.HGV,
    A.NAMERANK, A.ADDRESS, A.ADDRESSI, A.ADDRESSII, A.POSTCODE,
    A.TRANSIT,
    A.INFOONLY
    from     BFLOG_AT A, BFLOG_ACCADDRESS B
    WHERE A.ACCADDRESSES = B.NAME
    AND A.STARTDATE >= :P63_START_DATE
    AND A.ENDDATE <= :P63_END_DATE
    --AND (A.EXERCISEAREAS LIKE "GAP, OA, OAL")
    --OR (A.EXERCISEAREAS LIKE "Harz")
    AND A.AUTHORISED = 1
    AND A.INFOONLY = 1' ;
    END IF;
    RETURN v_query;
    END;
    Cheers
    Gus

  • SQL Query ( PL/SQL function body returning query ) page

    Hello Friends,
    I have a page with type SQL Query ( PL/SQL function body returning query ).
    I have written a pl/sql block that returns a sql query - select statment.
    Some times i am getting no data found error - does it got to do with the variable that stores the query .
    =======================
    ORA-06502: PL/SQL: numeric or value error: character string buffer too small
    Error ERR-1101 Unable to process function body returning query.
    OK
    =====================
    When the query is returned with records where exactly the records are stored is it in the variable declared in pl/sql block or with the Oracle Apex implicit cursor.
    Here's the pl/sql block ..
    The query is generated while the user is navigating through pages ..
    ====================
    declare
    l_return_stmt varchar2(32767);
    l_select varchar2(32000);
    l_from varchar2(32000);
    l_where varchar2(32000);
    l_order_by varchar2(32000);
    l_stmt_recordcount varchar2(32000);
    l_recordcount number ;
    begin
    l_select := 'select '||:P10_VARLIST1||:P10_VARLIST2||:P10_VARLIST3
    ||:P10_VARLIST4||:P10_VARLIST5;
    l_from := ' from '||:P10_RELATION;
    if length(:P10_WHERE) > 0 then
    l_where := ' where '||:P10_WHERE;
    else
    l_where := '';
    end if;
    if length(:P10_ORDER_BY) > 0 then
    l_order_by := ' order by '||:P10_ORDER_BY;
    else
    l_order_by := '';
    end if;
    l_return_stmt := l_select||l_from||l_where||l_order_by;
    :P10_STMT := l_return_stmt;
    return l_return_stmt;
    end;
    =============================
    Appreciate your help in this regard.
    thanks/kumar
    Edited by: kumar73 on Apr 22, 2010 6:38 AM

    It looks like the query string you are trying to pass back exceeds the 32K limit for a varchar. Where this is happening is kind of difficult to tell as it could be any number of points, and also depends on what you are passing into the process via page items.
    I would first try to establish what combination of page items causes this error to occur. Then, starting from the bottom and working your way backwards, I would start 'switching off' some of the items you use to build your query until it breaks again, thus establishing which part is leading to the error.
    Also, I'm not sure what :P10_STMT is doing (are you maybe using this for visiblity of the query created)?
    It looks like the query string you are trying to pass back exceeds the 32K limit for a varchar. Where this is happening is kind of difficult to tell as it could be any number of points, and also depends on what you are passing into the process via page items.
    I would first try to establish what combination of page items causes this error to occur. then, starting from the bottom and working your way backwards, I would start 'switching off' some of the items you use to build your query until it breaks again, thus establishing which part is leading to the error.
    Also, I'm not sure what :P10_STMT is doing (are you maybe using this for visiblity of the query created)?

Maybe you are looking for

  • JEditorPane - How to display XML Linked HTML File in JEditorPane ?

    Dear Friends, I have a HTML File consisting of stylesheet, xml linked (for data) and with headers, footers... When i called a ordinary html file using setpage property of JEditorpane..it's working no problem...but when i call the html file having xml

  • Toshiba DT01ACA050 too many bad sectors on first 5 months

    Hi Good day, I bought a toshiba internal drive 500gb(sealed) from my friend but after weird behavior on my pc I found out that it has too many bad sectors detected by HD tune pro and HDsentinel. He insisted that the drive is in good condition because

  • Free Spell checker?

    Are there any free spell checkers I can download? I have a textarea in my java application with a button 'Check spelling' what I want to do is when you click the button another window to be appeared, so the user can see the 'typed' word, 'suggested'

  • Adobe reader for Nokia 6680 doesn't work on my Nokia 6670

    I downoladed adobe reader for Nokia6680. I installed it on my Nokia6670, it prompted no error meesage, but it is not visible on my phone menu. Why, given that same OS and same screen, the reader for 6680 doesn't work on 6670?

  • I can't find my online number after order.

    Hi, I'm at the moment in Canada and I ordered a online number for Germany but it doesn't show anywhere. The payment was 2 days ago and I got a confirmation. Why can't I find my online number? In the past it worked very well... Thanks for help.