Query regarding spatial Oracle URGENT

Mr. fernando.
I am a new spatial oracle user.I am having a problem frying a query which i have pasted below along with the error message.Things are really mission critical for me.
Please please help me if you can.
Problem overview
1. i have a table with spatial data
create table loc_demo(
ID NUMBER(10,2),
AOI_TYPE VARCHAR2(255),
AOI_SUBTYPE VARCHAR2(255),
NAME VARCHAR2(255),
DESC1 VARCHAR2(255),
DESC2 VARCHAR2(255),
DESC3 VARCHAR2(255),
DESC4 VARCHAR2(255),
MAP_NO VARCHAR2(255),
MAP_REF VARCHAR2(255),
SUBURB VARCHAR2(255),
CITY VARCHAR2(255),
POSTCODE VARCHAR2(255),
SHAPE MDSYS.SDO_GEOMETRY
2. I created a spatial index with setup_locator_index.
exec geocoder_http.setup_locator_index('loc_demo','shape');
3. I fire a query on the table
I am getting this error when i fire the below query and don't get the one if i remove the units clause from the locator_within_distance operator.
IT WORKS
SELECT A.NAME,A.AOI_TYPE FROM loc_demo A
WHERE
LOCATOR_WITHIN_DISTANCE
(A.shape,MDSYS.SDO_GEOMETRY(1,NULL,MDSYS.SDO_POINT_TYPE(2511209.1,4412729.6
,0)
,NULL,NULL),'distance=10') = 'TRUE'
I suppose it works because the default units are longi. and lati.
DOSEN'T WORK
SELECT A.NAME,A.AOI_TYPE FROM loc_demo A
WHERE
LOCATOR_WITHIN_DISTANCE
(A.shape,MDSYS.SDO_GEOMETRY(1,NULL,MDSYS.SDO_POINT_TYPE(2511209.1,4412729.6
,0)
,NULL,NULL),'distance=10 units=Mile') = 'TRUE'
ERROR at line 1:
ORA-29902: error in executing ODCIIndexStart() routine
ORA-13004: the specified buffer size is invalid
ORA-06512: at "MDSYS.SDO_INDEX_METHOD", line 83
ORA-06512: at line 1
null

Dan,
Thanks For entertaining , can you please elobrate your explanation.Actually i am very new to the spatial Oracle.
Actually i know that there is a standard known as WGS84 but which are the valid values...e.g....
<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by dan abugov:
Hello Raju,
If you want to use the units parameter, you must be in wgs84 (long/lat).
The valid bounds for the coordinate system in long/lat are -180 to 180, and -90 to 90.
Hope this helps,
dan <HR></BLOCKQUOTE>
null

Similar Messages

  • Query Regarding ALV - Very Urgent

    Hi experts,
    I have defined a ALV grid in my program using the startdard function module as editable. Now I want the grid to be displayed in the screen with my pf-status. how can i do that?.
    Here is the sample code.
    REPORT  zadvcformsub
      NO STANDARD PAGE HEADING MESSAGE-ID zf
      LINE-SIZE 255 LINE-COUNT 66.
    INCLUDE zftsvar .
    TYPE-POOLS : slis.
    TABLES : zftsregstr, zftsintnum, zftscusttc,
             zadvcform,  konv, knvv, sscrfields.
    DATA : it_fieldcat   TYPE  slis_t_fieldcat_alv.
    DATA : w_layout    TYPE  slis_layout_alv,
           w_fieldcat  TYPE  slis_fieldcat_alv.
    DATA : BEGIN OF it_initial OCCURS 1,
            bukrs(4)      TYPE c,
            wkreg(3)      TYPE c,
            zkunag(10)    TYPE c,
            validfrom(10) TYPE c,
            validto(10)   TYPE c,
            vkorg(4)      TYPE c,
            aland(3)      TYPE c,
            zformtype(1)  TYPE c,
            frmintno(10)  TYPE c,
            uname(12)     TYPE c,
            datum(10)     TYPE c,
            uzeit(8)      TYPE c,
           END OF it_initial.
    DATA : BEGIN OF it_part OCCURS 1,
            zkunag    LIKE zadvcform-zkunag,
            frmintno  LIKE zadvcform-frmintno,
            validfrom LIKE zadvcform-validfrom,
            validto   LIKE zadvcform-validto,
           END OF it_part.
    DATA : w_sno(2)     TYPE c,
           w_cust(10)   TYPE c,
           w_cform(10)  TYPE c,
           w_from(10)   TYPE c,
           w_to(10)     TYPE c,
           w_blank1(10) TYPE c,
           w_blank2(10) TYPE c,
           w_blank3(10) TYPE c,
           w_blank4(10) TYPE c,
           w_string_len TYPE i,
           w_sel_line(255) TYPE c,
           w_indx(2) TYPE c.
    SELECTION-SCREEN SKIP 1.
    SELECTION-SCREEN BEGIN OF BLOCK b1  WITH FRAME TITLE text-001.
    SELECT-OPTIONS:
          s_bukrs FOR zadvcform-bukrs NO INTERVALS NO-EXTENSION OBLIGATORY,
          s_aland FOR zadvcform-aland NO INTERVALS NO-EXTENSION OBLIGATORY,
          s_wkreg FOR zadvcform-wkreg NO INTERVALS NO-EXTENSION OBLIGATORY,
          s_vkorg FOR zadvcform-vkorg NO INTERVALS NO-EXTENSION OBLIGATORY,
      s_fmtyp FOR zadvcform-zformtype NO INTERVALS NO-EXTENSION OBLIGATORY.
    SELECTION-SCREEN END OF BLOCK b1.
    INITIALIZATION.
    AT SELECTION-SCREEN.
    START-OF-SELECTION.
      w_fieldcat-fieldname = 'ZKUNAG'.
      w_fieldcat-tabname = 'IT_PART'.
      w_fieldcat-ref_fieldname = 'ZKUNAG'.
      w_fieldcat-ref_tabname = 'ZADVCFORM'.
      w_fieldcat-seltext_l = 'Customer Code'.
      w_fieldcat-ddictxt = 'L'.
      w_fieldcat-input = 'X'.
      w_fieldcat-edit  = 'X'.
      APPEND w_fieldcat TO it_fieldcat.
      w_fieldcat-fieldname = 'FRMINTNO'.
      w_fieldcat-tabname = 'IT_PART'.
      w_fieldcat-ref_fieldname = 'FRMINTNO'.
      w_fieldcat-ref_tabname = 'ZADVCFORM'.
      w_fieldcat-seltext_l = 'C Form No'.
      w_fieldcat-ddictxt = 'L'.
      w_fieldcat-input = 'X'.
      w_fieldcat-edit  = 'X'.
      APPEND w_fieldcat TO it_fieldcat.
      w_fieldcat-fieldname = 'VALIDFROM'.
      w_fieldcat-tabname = 'IT_PART'.
      w_fieldcat-ref_fieldname = 'VALIDFROM'.
      w_fieldcat-ref_tabname = 'ZADVCFORM'.
      w_fieldcat-seltext_l = 'Valid From'.
      w_fieldcat-ddictxt = 'L'.
      w_fieldcat-input = 'X'.
      w_fieldcat-edit  = 'X'.
      APPEND w_fieldcat TO it_fieldcat.
      w_fieldcat-fieldname = 'VALIDTO'.
      w_fieldcat-tabname = 'IT_PART'.
      w_fieldcat-ref_fieldname = 'VALIDTO'.
      w_fieldcat-ref_tabname = 'ZADVCFORM'.
      w_fieldcat-seltext_l = 'Valid To'.
      w_fieldcat-ddictxt = 'L'.
      w_fieldcat-input = ' '.
      w_fieldcat-edit  = ' '.
      APPEND w_fieldcat TO it_fieldcat.
      DO 15 TIMES.
        CLEAR it_part.
        APPEND it_part.
      ENDDO.
      SET PF-STATUS 'ZADVCFORM_COPY'.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_callback_program       = sy-cprog
         i_callback_pf_status_set = 'ZADVCFORM_COPY'
          it_fieldcat              = it_fieldcat
          i_grid_title             = 'Advanced C Form Submission'
        TABLES
          t_outtab                 = it_part[]
        EXCEPTIONS
          program_error            = 1
          OTHERS                   = 2.
      IF sy-subrc <> 0.
        MESSAGE i039(zaba) WITH 'Error in ALV'.
      ENDIF.
    I am geting the editable ALV grid but how to set my gui status.
    regards,
    Arul Jothi.

    Hi,
    Here is an sample code to handle events.
    DATA: I_EVENTS TYPE SLIS_T_EVENT.
    PERFORM F4000_EVENTS_INIT CHANGING I_EVENTS.
    CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
    EXPORTING
       IT_EVENTS                      = I_EVENTS
      TABLES
        T_OUTTAB                       = I_MARA
    EXCEPTIONS
      PROGRAM_ERROR                  = 1
      OTHERS                         = 2
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    FORM F4000_EVENTS_INIT USING I_EVENTS TYPE SLIS_T_EVENT.
      DATA: LINE_EVENT TYPE SLIS_ALV_EVENT.
      CLEAR LINE_EVENT.
      LINE_EVENT-NAME = 'TOP_OF_PAGE'.
      LINE_EVENT-FORM = 'F4001_TOP_OF_PAGE'.
      APPEND LINE_EVENT TO I_EVENTS.
      CLEAR LINE_EVENT.
      LINE_EVENT-NAME = 'PF_STATUS_SET'.
      LINE_EVENT-FORM = 'F4002_PF_STATUS_SET'.
      APPEND LINE_EVENT TO I_EVENTS.
      CLEAR LINE_EVENT.
      LINE_EVENT-NAME = 'USER_COMMAND'.
      LINE_EVENT-FORM = 'F4003_USER_COMMAND'.
      APPEND LINE_EVENT TO I_EVENTS.
    ENDFORM.
    FORM F4003_USER_COMMAND USING UCOMM LIKE SY-UCOMM
                                  SELFIELD TYPE SLIS_SELFIELD.
      CASE UCOMM.
        WHEN '&CHNG'.
          READ TABLE I_MARA INDEX SELFIELD-TABINDEX.
          IF I_MARA-MATNR NE SPACE.
            SET PARAMETER ID 'MAT' FIELD I_MARA-MATNR.
            CALL TRANSACTION 'MM03' AND SKIP FIRST SCREEN.
                  CLEAR UCOMM.
          ENDIF.
      ENDCASE.
    ENDFORM.

  • Query Regarding the Oracle PL/SQL Developer OCA

    Hi All
    I am planning to go for the certification "Oracle PL/SQL Developer OCA "
    But I am not sure what is value of this certification in market.
    Please help me out.
    Thanks in advance
    Amit

    My view is this: The more you can put on your resume, usually the better. By itself, its not worth anything. Combined with several years of experience, it could make a difference. If you go for a job and have 5 years of experience and a certification, and the other candidate just has 5 years, as long as you both interview well, I'd say you have a slightly better shot because you have that extra thing on your resume.
    You need to look at it in that respect - but its not a magic key to get you any job. Of course different countries may be different in how they view certiciations.

  • Query regarding replication process in oracle 8i

    While replicating the master database I need some data. For that I stopped the replication process but in that time the application using the master database was not able to modify the database content because stopping of replication process put the master definition in read only mode.
    So my query is Does oracle 8i puts the master definition site in read only mode if someone stops the replication ? If yes then is there any way to avoid this?
    Thanks

    Hi
    First of all why you are using so much old version (oracle 8i).
    when we have synchronous oracle database replication (multi master replication) then before saving our transaction at source site it will communication at all the oracle database server by using database link if at one site it find any link breakage then it will not save transaction at the source site and that transaction will ber rollback. ( Mean in synchronous replication your database link will be up any all time. This method is used where there are heavy network resource or they have replication on LAN.
    In Relication 90% people use Asynchronous replication
    In asynchronous replication if database link become down then our transaction become pending in the queue when link become resoted then transaction are pushed one by one in the fifo (First in First our).to their destination site to all other master or master definition sites.
    Second
    When we stopp replication there are two methods to stop the replication
    Method A is quised the replication group at master definition site. When you quised replication group then your all tables present in that replication becomes read only you can not perform DML statment on that tables at all sites. and it is only perform by DBA to perform some administration activities like include new table in a group or regererate replication support of existing tables.or add new replication site.
    Method B we totally sotpped replication that now our this server will not be in replication further. for this we use store procedure. like this
    connect repadmin/repadmin@hr
    SQL> Execute DBMS_REPUTIL.REPLICATION_OFF;
    PL/SQL procedure successfully completed.
    If you wants to again continue replication at that server. after connection wtih replication administrator apply the following command
    SQL> Execute DBMS_REPUTIL.REPLICATION_ON;
    PL/SQL procedure successfully completed.
    For further problem you can contact me any time
    Best Regard
    Abdul Hameed Malik
    [email protected]
    Islambad Pakistan
    Edited by: Abdul Hameed on Feb 9, 2009 12:04 AM
    Edited by: Abdul Hameed on Feb 9, 2009 12:05 AM

  • Urgent query regarding performance

    hi
    i have one query regarding performance.iam using interactive reporting and workspace.
    i have all the linsence server,shared services,and Bi services and ui services and oracle9i which has metadata installed in one system(one server).data base which stores relationaldata(DB2) on another system.(i.e 2 systems in total).
    in order to increase performance i made some adjustments
    i installed hyperion BI server services, UI services,license server and shared services server such that all web applications (that used web sphere 5.1) such as shared services and UI services in server1(or computer1).and remaining linsence and bi server services in computer2 and i installed database(db2) on another computer3.(i.e 3 systems in total)
    my query : oracle 9i which has metadata where to install that in ( computer 1 or in computer 2 )
    i want to get best performance.where to install that oracle 9i which has metadata stored in it.
    for any queries please reply mail
    [email protected]
    9930120470

    You should know that executing a query is always slower the first time. Then Oracle can optimise your query and store it temporary for further executions. But passing from 3 minutes to 3 seconds, maybe your original query is really, really slow. Most of the times I only win few milliseconds. If Oracle is able to optimize it to 3 seconds. You must clearly rewrite your query.
    Things you should know to enhance your execution time : try to reduce the number of nested loops, nested loops give your an exponential execution time which is really slow :
    for rec1 in (select a from b) loop
      for  rec2 in (select c from d) loop
      end loop;
    end loop;Anything like that is bad.
    Try to avoid Cartesian products by writing the best where clause possible.
    select a.a,
             b.b
    from  a,
            b
    where b.b > 1This is bad and slow.

  • Query regarding updation thru a Procedure

    Hi,I have a query regarding updation.
    1.I invoke a procedure in Oracle called submit thru my Java application.
    The submit procedure saves the XML data in the database
    and displays this data in a Front End GUI.
    2. Now,I make a change in my Java application by adding new elements to the same row.This row now contains additional XML elements.
    I would like to display the new row with the new elements in the GUI.
    What is a better option for doing the above?
    1.Delete the row being shown,save the new row with the changes in the database,and re display it?
    2.Or,Update the row dynamically and refresh?
    Any suggestions
    Thanks,

    Hi,I have a query regarding updation.
    1.I invoke a procedure in Oracle called submit thru
    my Java application.
    The submit procedure saves the XML data in the
    database
    and displays this data in a Front End GUI.
    2. Now,I make a change in my Java application by
    adding new elements to the same row.This row now
    contains additional XML elements.
    I would like to display the new row with the new
    elements in the GUI.
    What is a better option for doing the above?
    1.Delete the row being shown,save the new row with
    the changes in the database,and re display it?
    2.Or,Update the row dynamically and refresh?
    Any suggestions
    Thanks,If you delete (it seems to me yours this process is regular and frequent) and re insert the new updated one record then High water mark will cause to scan yours table which may cause to degrade the performance.AFAIK you should go with update.But hold down dont implement it as i suggested lets see what are others solution here which may be more precious then mine.
    Khurram

  • Create a query builder in oracle Apex

    Hi
    We have a request to create a query builder in oracle Apex particularly.But it provide the application builder and Utilities when we create the apex workspace.My question is any possibility are to make the application builder and utilizes as invisible
    regards
    apexuser

    hi scott,
    we no need to buid a report.we want generate a sql query using GUI drag and drop query builder.
    our suggestion is provide synonym for all objects and give to clinet,but in apex query builder only show view and table...
    it not show synonym thats the problem..
    simply we want oracle query browser.just want build a query.through synonym schema.
    we cerate a oracle user and provide synonym for live tables.then we provide the synonym user to client place,so they want build a query simpl.
    they dont have sql knowledge.
    regards
    apexuser

  • Query regarding Explain Plan

    Hi,
    I have a query regarding explain plan. While we gather the statistics then optimize choose the best possible plan out of the explain plans available. If we do not gather statistics on a table for a long time then which plan it choose:
    If it will continue to use the same plan as it use in the starting when statistics were gathered or will change the plan as soon as dml activities performed and statistics getting old.
    Thanks
    GK

    Hi,
    Aman.... wrote:
    Gulshan wrote:
    Hi,
    I have a query regarding explain plan. While we gather the statistics then optimize choose the best possible plan out of the explain plans available. If we do not gather statistics on a table for a long time then which plan it choose:The same plan which it has chosen in the starting with the previous statistics. The plan won't change automatically as long as you won't refresh the statistics. This is wrong even for Oracle 9i. Here are couple of examples when a plan might change with the same optimizer statistics:
    * when you have a histogram on a column and are not a bright person to use bind variables, you might get a completely different execution plan because of a different incoming value. All that is needed to fall into this habit - a soft parse, which might be due to different reasons, for instance, due to session parameter modification (which also might change a plan even without a histogram)
    * Starting with 10g, CBO makes adjustments to cardinality estimates for out of range values appeared in predicates

  • Query regarding DB_16k_CACHE_SIZE

    Hi Friends,
    I have got a urgent query regarding db_16k_cache_size parameter.I have created a tablespace with 16k block size,and i have configured the db_16k_cache_sieze to 208M accordingly.I have kept a table in this tablesspace whose presenet size is 323 GB.Some complex queries will be running on this table comprising groups,some complex joins,ordes,analytical functions etc.
    I am having 8 GB of SGA.Now my query is whether i have to increase the db_16k_cache_szie parameter from its present size to get better performance and if it is then how to detemine what will be the optimal size of db_16k_cache_size.
    Please help...
    Thanks
    somy

    Post your query what u have tried. Then only we might be help with you

  • Query regarding SCN

    Good day gentleman,
    I have a query regarding SCN, how can I know the current status of SCN(in oracle 9i) database , is there any view for that.
    I will also be grateful if some one will tell me on which events Oracle generates a new SCN number.
    With Regards
    Anshuman

    Sir..
    The current system SCN can be queried using dbms_flashback.get_system_change_number.
    The SCN of the last checkpoint can be found in v$database
    Virtually.. each time a modify takes place the scn is increased.
    Acr

  • SAP query load to Oracle

    Hi,
    I'm looking for the best way to automate the results of an SAP query (Quickviewer) to Oracle. The query would run nightly. I searched all SND forums but did not find much. I also looked at the SAP application help for Quickviewer.
    Regards,
    John

    David,
    Just an FYI the error message that you have found is not connected to your BLS transaction but rather the default IDoc listener trying to connect to something that doesn't exist.  This listener will automatically start each time xMII starts, as a result you can set it up to connect to an RFC destination or delete the default configuration and it will go away. 
    Now onto your issue; How many Production Orders are being returned from the BAPI?  How are you loading each of them into Oracle?  How much memory is allocated to ServletExec vs. How much is available on the machine?  By default xMII will limit all SQL/Tag queries to their <b>RowCount</b> with a max at 250k rows but this does not apply to the JCo call.
    My suggestion here is to look for the other error message that pertains to your transaction which may reside in the ServletExec logs and not xMII, they can be found on your xMII machine here: http://localhost/servletexec/admin/login.jsp
    Hope this helps.
    Sam

  • Query works in Oracle Client but not JDBC

    The query is as follows:
    SELECT COUNT(*) THE_COUNT FROM sentorders WHERE ordersentdate BETWEEN '15-JAN-01' and '15-JAN-03';When I run this query in the Oracle client (SQL+) it tells me that THE_COUNT is 4 which is correct but when I use the following JDBC code I get THE_COUNT is 0 which is incorrect.
    public ResultSet viewTotalSentOrdersByDate()
      throws SQLException, Exception {
          String beginDate = "15-JAN-01";
          String endDate = "15-JAN-03";
          ResultSet rs = null;
        try  {
          String queryString = ("SELECT COUNT(*) THE_COUNT FROM sentorders WHERE ordersentdate BETWEEN '" + beginDate + "' and '" + endDate + "'");
          System.out.println(queryString);
          Statement stmt = con.createStatement();
          rs = stmt.executeQuery(queryString);
          while(rs.next()) {
           System.out.println(rs.getString("THE_COUNT"))
        } catch (SQLException sqle) {
          error = "SQLException: Could not execute the query.";
          throw new SQLException(error);
        } catch (Exception e) {
          error = "An exception occured.";
          throw new Exception(error);               
        return rs;
      }Thanks for the help
    Zac

    The query is as follows:
    SELECT COUNT(*) THE_COUNT FROM sentorders WHERE ordersentdate BETWEEN '15-JAN-01' and '15-JAN-03';When I run this query in the Oracle client (SQL+) it tells me that THE_COUNT is 4 which is correct but when I use the following JDBC code I get THE_COUNT is 0 which is incorrect.
    public ResultSet viewTotalSentOrdersByDate()
    throws SQLException, Exception {
    String beginDate = "15-JAN-01";
    String endDate = "15-JAN-03";
    ResultSet rs = null;
    try {
    String queryString = ("SELECT COUNT(*) THE_COUNT FROM sentorders WHERE ordersentdate BETWEEN '" + beginDate + "' and '" + endDate + "'");
    System.out.println(queryString);
    Statement stmt = con.createStatement();
    rs = stmt.executeQuery(queryString);
    while(rs.next()) {
    System.out.println(rs.getString("THE_COUNT"))
    } catch (SQLException sqle) {
    error = "SQLException: Could not execute the query.";
    throw new SQLException(error);
    } catch (Exception e) {
    error = "An exception occured.";
    throw new Exception(error);
    return rs;
    }Thanks for the help
    Zac

  • Query off of Oracle using WinSql - Need help with query

    I am trying to query off of Oracle using program WinSql.
    I have a table(tticpr200110) that has the following sample data:
    ITEM     CODE     T$AMNT
    23500076 ACL     .0049
    23500076 APM     0
    23500076 APO     .0093
    23500076 EXP     .0001
    23500076 RES     .0072
    and what I want it to look like is:
    ITEM     ACL     APM     APO     EXP     RES
    23500076     0.0049     0     0.0093     0.0001     0.0072
    (actually I need the last 2 columns added together to be MATL-but can deal with that down the road).
    Seems simple enough, but I don't know to put into the columns.
    Any help would be GREATLY appreciated as soon as possible would be even better.

    My table - tticpr200110 when it runs I get the following sample data for part number 23500076:
    The first coloumn ITEM is the part number.
    The second column CODE is 1 of 5 different cost codes
    The third column is the cost for that code for that part.
    ITEM CODE AMNT
    23500076 ACL 0.0049
    23500076 APM 0.0000
    23500076 APO 0.0093
    23500076 EXP 0.0001
    23500076 RES 0.0072
    I want to make a query that makes the data look like this:
    ITEM ACL APM APO EXP RES
    23500076 0.0049 0.0000 0.0093 0.0001 0.0072
    (similar to a pivot table in excel or acess)
    I hope this helps better.
    Thanks!

  • 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();

  • Query regarding the conversion of DME file in MT940 format.

    Hello Experts,
    I have a query regarding the generation of MT940 file after generating the payment file from other DME tree.
    After completion of payment run, my payment file is generated in the DME format which is according to the DME tree.
    I want to convert the DME file (which is generated via F110)  from existing format to the standard MT940 format.
    Is there any standard program which converts the DME file to MT940. If so,  please inform me as early.
    I have tried to upload the DME file in FF.5 transaction, but it is not allowing me to convert the file in MT940 structure.
    Or please inform the steps how i can convert the file .
    Awaiting for your inputs.
    Thanks in advance

    Hi Zareena.
    I would like to suggest,
    SX_OBJECT_CONVERT_RAW_TXT.
    Hope that's usefull.
    Good Luck & Regards.
    Harsh Dave

Maybe you are looking for

  • WHAT IS A BEST QUALITY QT FILE?

    At the expense of causing some aggravation(!) I'm here going to try to simplify a request that has obviously got a bit tangled in another thread 'Quicktime Pixellation...etc" below, and not getting any positive answer. *Please can one of the Top User

  • Error Acrobat 9 Professional al imprimir en PDF

    Buenos días, En un entorno con un pc con Windows 7 Professional, usuario administrador y Adobe Professional 9 estamos teniendo problemas cuando, desde cualquier aplicación de Office 2007 Professional queremos imprimir en PDF ya que aparece el siguien

  • Dynamic Positioning of Objects in a Grid (rows and columns) with AS3 Tutorial

    The topic of a dynamic positioning of objects in a right grid (rows and columns) comes up often so I decided to post an AS3 solution here: http://flashascript.wordpress.com/2010/12/25/arranging-objects-into-2d-dynamic-grid-with-a ctionscript-3/

  • Multiple Tax for RFBIBL00

    Hi, I want to pass multiple tax codes in RFBIBL00. Currently my report only supports single tax code which is appearing first. How to do that./ Thanks

  • Navigation from within a custom component ???

    Hi All I am working on a new project in Flex 4 and i have a Viewstack on my main page.  Then i have 6 custom components in the viewstack, the first being the home page.  In this homepage custom component i have linkbuttons which i want the user to cl