Query on using Collection object in Multithreading

All,
I have a query on multithreading, I have a collection object-eg. HashMap which needs to be shared
among threads, I my have 3 options
1st option is to synchronize the method which does some manipulation on the collection object,
2nd option is to hold a lock on that object like
synchronized(object){
//do some work
3rd option - to make use of class ConcurrentHashMap available in java.util.concurrent package; which claims to be
Thread safe but also says the following in the API - They do not throw ConcurrentModificationException. However,
iterators are designed to be used by only one thread at a time
My queston is - how do I choose between these 3?
I know the decison needs to be taken by keeping performance issue in mind and also the number of times the values in HashMap will be updated by the threads. Can some one explain to me when/under what circumstances do I use options 1 || 2 || 3

My application has actually gone live now - after doing some load/performance testing
and comming to the conclusion that performance is satisfactory [I am designing a SMS gateway
that receives/buffers/stores/sends SMS]
Initially I used Hashmap and a LinkedList to store objects in memory and I had a mixture
of places where some times I made the entire method that modifies the LinkedList & hashmap
synchronized and some places where I held a lock on the object alone (I wasnt too sure which to use where)
Then upon movin to 1.5 I rechanged the the data structure to use ConcurrentLinkedQueue & ConcurrenthashMap.
But i have places where I still hold synchronized locks over those objects (which i think is unnecessary and removing the locks may improve the performance)
So can i come to the conclusion that classes in java.util.concurrent are all threadsafe and we can stop holding locks on the objects and let java take care of itself [or should I still hold a lock when doing structural modification] [though the APi states that a oncurrentmodificationexception will not be thrown & iterators are designed to be used by only one thread at a time]

Similar Messages

  • Parsing Query string using Client Object model [ECMA]

    hello
    i want to access querystring using client object model using ECMA script.
    for eg http://localhost:80/demopage.aspx?test=123
    can we read value of test using ECMA script
    regards
    Manish

    thanks ...
    i did that...using
    <script type="text/javascript">
    function queryString(parameter) {
    var loc = location.search.substring(1, location.search.length);
    var param_value = false;
    var params = loc.split("&");
    for (i=0; i<params.length;i++) {
    param_name = params[i].substring(0,params[i].indexOf('='));
    if (param_name == parameter) {
    param_value = params[i].substring(params[i].indexOf('=')+1)
    if (param_value) {
    return param_value;
    else {
    return false; //Here determine return if no parameter is found

  • Query elements while collecting objects

    HI,
    I have  a query ,when i have changed some objects(means properties of chars and added some chars to rows )and save in a request .if i check in a SE09 particular request .
    i'm not able to understand those elements of technical names.
    can anyone help me how to find those objects collected  properly or not .Is there any table to find .
    Thanks,
    EDK...

    Hi,
    The entries under your Transport request -> Elements of the Query Builder in SE09 is nothing but the collected query components.
    Suppose you make change to a single query with UID (You can find this in Query Designer -> Query Propertiers -> Advanced )e.g. - ABCDXXXXXXXXXXXXX , then all the components starting with first few letters of the UID will be part of same query.
    There are multiple entries in your tranport request.
    Before releaseing the request do the following checks under SE09-> Request/Task -> Complete Check and if any inconsistencies error message willl be popped up.
    Object Syntax Check
    Check Request Consistency
    Display Inactive Objects
    If no errors, proceed with release and transport of request.
    Hope it clears your doubts.
    -VA

  • Query for recurring reports using Query Builder in Business objects

    1. How to count webi Recurring reports using query builder in business objects? (Need Query for this)
    2. How to count Crystal Recurring reports using query builder in business objects? (Need Query for this)
    I am able to get summerized recurring reports using Query Builder.
    For Example we have 343 reports which are under recurring (This includes both Webi Reports and Crystal Reports).
    we need to get individually how many webi reports are under Recurring and Crystal reports are under Recurring.

    1. How to count webi Recurring reports using query builder in business objects? (Need Query for this)
    2. How to count Crystal Recurring reports using query builder in business objects? (Need Query for this)
    I am able to get summerized recurring reports using Query Builder.
    For Example we have 343 reports which are under recurring (This includes both Webi Reports and Crystal Reports).
    we need to get individually how many webi reports are under Recurring and Crystal reports are under Recurring.

  • Delete site collection using Client object model

    Is it possible to delete a site collection using Client object model?
    -Prashant

    I don't think you can create or delete a site-collection using SharePoint Client Object Model. You'd need to leverage admin web services (
    http://Site/_vti_adm/Admin.asmx) (or) server-side object model (or) powershell for this task.
    Please mark the replies as answers if they help or unmark if not.

  • Declaring and using a "collections" object?

    Hi,
    -I want to declare a Collections object like so...
    ArrayList arr = new ArrayList;
    Collections colls = new Collections;
    -so i can use the shuffle() command on an ArrayList
    e.g. colls.shuffle(arr);
    -The problem is i get a compiler error like this:
    "Collections() has private access in Java.utils.Collections"
    -How do i get around this???

    So all i have to do is:
    Collections colls;
    ArrayList arr = new ArrayList;
    colls.shuffle(arr);
    Is this correct?
    Thanks,
    PJ

  • Using Business Objects to query the CRMOD database

    Has anybody successfully used Business Objects to query CRMOD via web services? Our BO people are trying to do this and would like to learn from other's experience.
    Regards,
    Jeff

    Please refer to online document "OnDemWebSvcs.pdf". You can download this doc at:
    Admin -> Web Services Administration -> Download Documentation
    Edited by: PPL on Oct 8, 2011 12:13 AM

  • Problem getting the collection objects in Toplinks using JDeveloper11g

    Hi All
    I am working the Toplinks in JDeveloper11g. I am using the Java Objects From Tables to create the Toplink map .
    The problem is I am unable to work with the collection objects. I am getting the collection objects like addtocollection and removefromcollection. when I am dragging the collection object into the form and running the application it is giving errors.
    Can any one help me out how to work with this collection objects.
    Thanks in advance
    Madhavi.

    look at the java.util.SortedMap interface, and the classes that implement it. or, re-think your design. why do you want the entries sorted? do you really want that, or do you assume you do? is a Map the right collection here? I'm not saying it isn't, I'm just saying that the sorting requirement sounds like an assumption you need to challenge. generally, we get data out of a Map by explicitly asking for it by key

  • WEB BASED MAPPING APPLICATION TO DEVELOP QUERY UTILITY USING MAPVIEWER

    Dear Sir,
    please any one can answer me as soon as possible its very urgent
    WEB BASED MAPPING APPLICATION TO DEVELOP QUERY UTILITY USING MAPVIEWER
    I     As oracle mapviewer Chapter 8 (Oracle Maps) says generating our own Web based mapping application we are trying to generate our own maps for our own data contains in our layers like example boundary lines and roads and etc. and we are following complete example as described in Oracle Mapviewer Document Chapter 8.
    Before this step we tried with demo data downloaded from OTN mvdemo. And we downloaded latest demo today itself from the OTN and imported into our database schema called mvdemo. And we copied all three jar files mvclient and mvconnection and mvpalette into our jdeveloper .
    II.     We created a jsp to execute the following code from oracle mapviewer chapter 8 documents
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <%@ page contentType="text/html;charset=windows-1252"%>
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
    <%@ taglib uri="http://xmlns.oracle.com/adf/faces" prefix="af"%>
    <%@ taglib uri="http://xmlns.oracle.com/adf/faces/customizable" prefix="cust"%>
    <%@ taglib uri="http://xmlns.oracle.com/j2ee/jsp/tld/ojsp/jwcache.tld"
    prefix="jwcache"%>
    <%@ taglib uri="http://xmlns.oracle.com/adf/faces/html" prefix="afh"%>
    <%@ taglib uri="http://xmlns.oracle.com/j2ee/jsp/tld/ojsp/fileaccess.tld"
    prefix="fileaccess"%>
    <%@ taglib uri="http://xmlns.oracle.com/j2ee/jsp/tld/ojsp/jesitaglib.tld"
    prefix="JESI"%>
    <f:view>
    <html>
    <head>
    <META http-equiv="Content-Type" content="text/html" charset=UTF-8>
    <TITLE>A sample Oracle Maps Application</TITLE>
    <script language="Javascript" src="jslib/loadscript.js"></script>
    <script language=javascript>
    var themebasedfoi=null
    function on_load_mapview()
    var baseURL = " http://localhost:8888/mapviewer/omserver";
    // Create an MVMapView instance to display the map
    var mapview = new MVMapView(document.getElementById("map"), baseURL);
    // Add a base map layer as background
    mapview.addBaseMapLayer(new MVBaseMap("mvdemo.demo_map"));
    // Add a theme-based FOI layer to display customers on the map
    themebasedfoi = new MVThemeBasedFOI('themebasedfoi1','mvdemo.customers');
    themebasedfoi.setBringToTopOnMouseOver(true);
    mapview.addThemeBasedFOI(themebasedfoi);
    // Set the initial map center and zoom level
    mapview.setCenter(MVSdoGeometry.createPoint(-122.45,37.7706,8307));
    mapview.setZoomLevel(4);
    // Add a navigation panel on the right side of the map
    mapview.addNavigationPanel('east');
    // Add a scale bar
    mapview.addScaleBar();
    // Display the map.
    mapview.display();
    function setLayerVisible(checkBox){
    // Show the theme-based FOI layer if the check box is checked and
    // hide the theme-based FOI layer otherwise.
    if(checkBox.checked)
    themebasedfoi.setVisible(true) ;
    else
    themebasedfoi.setVisible(false);
    </script>
    </head>
    <body onload= javascript:on_load_mapview() >
    <h2> A sample Oracle Maps Application</h2>
    <INPUT TYPE="checkbox" onclick="setLayerVisible(this)" checked/>Show customers
    <div id="map" style="width: 600px; height: 500px"></div>
    </body>
    </html>
    </f:view>
    <!--
    <html>
    <head>
    <meta http-equiv="Content-Type"
    content="text/html; charset=windows-1252"/>
    <title>mapPage</title>
    </head>
    <body><h:form binding="#{backing_mapPage.form1}" id="form1"></h:form></body>
    </html>
    -->
    <%-- oracle-jdev-comment:auto-binding-backing-bean-name:backing_mapPage--%>
    III.     When we run this jsp it’s giving us following Two errors
    1     Error:     ‘MVMapView’ is undefined
         Code:     0
         URL:     http://192.168.100.149:8988/MapViewerApp-WebProj-context-root/faces/mapPage.jsp
    2     Error:     ‘themebasedfoi’ is null or not an object
         Code:     0
         URL:     http://192.168.100.149:8988/MapViewerApp-WebProj-context-root/faces/mapPage.jsp
    Please let us know what could be problem as soon as possible. Very urgent
    Please let us know where we can find Mapviewer AJAX API’s for Jdeveloper Extention
    Thanks
    Kabeer

    I currently use parameters, and they are passed from the form to the report. Report is then generated based on a function returning ‘strongly typed’ cursor. The ‘strongly typed’ cursor in my case returns a record consisting of an orderly collection of fields.
    This collection of fields is returned by another function that relies on the IF … THEN logic.
    However, the number of IF ... THEN statements is quite large (currently 64 covering all possible combinations of 6 parameters available in the form).
    I would like to avoid the large number of IF … THEN statements, and hope that there is a way of passing a string to a query, where the Dynamic SQL would in Select close and Where close reflect parameters passed by the form.
    In addition to this I would like to avoid creating and populating a table or a view dedicated to the report, because this may lead to a conflict in case of multiple users concurrently generating reports with different choice of parameters.
    Edited by: user6883574 on May 28, 2009 9:16 PM

  • Quering the database using Client Object Model

    Hi,
    I have to fetch the list items from a list named "Project Status" and display it in a table using
    Client Object model.
    The equivalent server side code is:
    SPWeb web = SPContext.Current.Web;
    SPList list = web.Lists["Project Status"];
    DataTable dt1 = new DataTable();
    try
    if (list.ItemCount > 0)
    DataColumn dc;
    DataColumn dc1;
    dc = new DataColumn("ProjectId", Type.GetType("System.String"));
    dc1 = new DataColumn("Project Name", Type.GetType("System.String"));
    dt1.Columns.Add(dc);
    dt1.Columns.Add(dc1);
    DataRow dr;
    foreach (SPListItem item in list.Items)
    dr = dt1.NewRow();
    dr["ProjectId"] = item["ProjectId"];
    dr["Project Name"] = item["Project Name"];
    dt1.Rows.Add(dr);
    Repeater1.DataSource = dt1;
    Repeater1.DataBind();
    catch (Exception Ex)
    throw Ex;
    1 more issue what i face is providing two links in the Visual WebPart and their navigate url is based on a condition that is fetched from the database. This corresponding code has to be converted to
    Client Object Model.
    string user = web.CurrentUser.LoginName;
    string userID = user.Split(new char[] { '\\' })[1];
    string connString = @"Data Source=NorthWind;Initial Catalog=EmployeeDB;User ID=sa;Password=Newuser123";
    string query = "select * from EMPLOYEE_PROFILE";
    SqlConnection conn = new SqlConnection(connString);
    SqlCommand cmd = new SqlCommand(query, conn);
    try
    conn.Open();
    DataTable t1 = new DataTable();
    using (SqlDataAdapter a = new SqlDataAdapter(cmd))
    a.Fill(t1);
    DataRow[] dr = t1.Select("PsNo = '" + userID + "'"); //This will select all rows where the Name Column has current user
    foreach (DataRow r in dr)
    string bU = r["DeputedBU"].ToString();
    if (bU == "INS" || bU == "BFS")
    lnkPM.NavigateUrl = web.Site.WebApplication.Sites[0].Url + "/Dashboard.aspx";
    lnkSummary.NavigateUrl = web.Site.WebApplication.Sites[0].Url + "/DashboardWithHyperlinks.aspx";
    else
    lnkPM.Visible = false;
    lnkSummary.Visible = false;
    catch (Exception)
    throw;
    finally
    conn.Close();
    Any help would be appreciated.

    Hi,
    According to your post, there would be two questions in this single thread.
    It is recommended to post one question in one single thread which will make others easier to focus on one question in one thread.
    For the first question, you want to fetch list items and put into a DataTable object using Client Object Model.
    To fetch list items from a list using Client Object Model, you can take a look at the code snippet below from MSDN:
    http://msdn.microsoft.com/en-us/library/office/ee534956(v=office.14).aspx
    For the second question, you might need to retrieve the User object and site collections object using Client Object Model.
    However, if you can develop a Visual Web Part for your site, it means that you will be able to access the SharePoint Object Model which has more powerful APIs, so there is no
    need to use Client Object Model in a Visual Web Part.
    Best regards
    Patrick Liang
    TechNet Community Support

  • COLLECTING OBJECTS INTO A REQUEST

    HI ALL,
    I HAVE 2 QUERIES BASED ON THE REMOTE CUBE EXTRACTING DATA FROM THE FM THROUGH A GENERIC EXTRACTION.
    I HAVE COLLECTED ALL THE OBJECTS INTO A REQUEST WHICH HAS GOT AN ERROR. I DECIDED TO CREATE A NEW REQUEST INSTEAD.
    IF IS IT POSSIBLE THAT I  CAN COLLECT ALL THE OBJECTS INTO A NEW TRANSPORT REQUEST AT THE QUERY LEVEL USING RSA1 TRANSPORT CONNCTION TOOL.
    AND
    MY QUESTION IS IF THE NEW REQUEST IS ABLE TO CAPTURE ALL MY SOURCE SYSTEM OBJECTS LIKE FM, EXTR. STRUCTURE ETC ALONG WITH QUERY ELEMENTS.
    HELP IS REALLY APPRECIATED.
    THANKS
    VEER

    Hi Veer,
      U can collect but instead of dumping every thing in one request why cant u create a seperate request for queries.
    I thnk its better u colect ur source system objects FM etc in one request and releast it first and after that create one moere for queries .
    i thnk for extract structure it will cretae a  customized reqest .
    thanks
    santosh

  • Query with negated collection.contains

    Hi,
    I'm trying to create a query which should find objects which do NOT belong
    to a certain collection.
    I've tried something like
    (!_user._groups.contains(login) && (login._name == "GROUP_LOGIN"))
    , but this returns the same result as with the negation:
    (_user._groups.contains(login) && (login._name == "GROUP_LOGIN"))
    I've compared the SQL statements of both queries (see below), they are
    equal, too.
    Does JDO support queries like this? If not, is there any workaround?
    Here's the SQL statement of kodo:
    executing statement <4958626>: (SELECT DISTINCT t0.JDOIDX, t0.JDOCLASSX,
    t0.JDOLOCKX, t0.ACCOUNT, t0.CONTENT_ROLE, t0.FIRST_NAME,
    t0.FRAMEWORKUSERX, t0.LAST_NAME, t0.PASSWORD, t0.RETAILER,
    t0.WRONG_PWD_COUNTER, t0.ACCOUNT FROM JDOABSTRUSR t1, JDOABSTRUSR t3,
    JDOUSERGROUP__USERSX t2, UUser t0 WHERE ((t3.NAME = ? AND t0.JDOCLASSX =
    ?) AND t0.FRAMEWORKUSERX = t1.JDOIDX AND t1.JDOIDX = t2.USERSX AND
    t2.JDOIDX = t3.JDOIDX) ORDER BY t0.ACCOUNT DESC):
    [reused=1;params={(String)GROUP_LOGIN,(String)de.d2vodafone.webe.fho.domain.user.User}]
    Regards,
    Andreas

    I can't see any unbound variables in this query - the variable l is used
    in contains() and it is used on the right-hand-side of contains(). Or did
    I misunderstand the meaning of unbound variables?!
    Regards,
    Andreas
    Stephen Kim wrote:
    As I recall, Kodo 2.4.x doesn't handle unbound variables very well. I
    would see if the query is resolved in our 2.5.2 beta (the URL is listed
    in our solarmetric.kodo.beta newsgroup)
    Andreas Thiel wrote:
    Outcome of further experimentation:
    If I use the (not negated) filter
    ((_user._groups.contains(l) && (l._name == "GROUP_LOGIN")))
    , I get the correct, expected result with all users which are member of
    the special login group with name "GROUP_LOGIN". But if I use the
    (negated) filter
    (!(_user._groups.contains(l) && (l._name == "GROUP_LOGIN")))
    , I get a result containing all users NOT belonging to the login group
    (that's ok), but in addition the result contains the users from the the
    first query, too, i.e. all users belonging to the login group (that's
    wrong).
    My parameters: <none>
    My variables:
    de.d2vodafone.webe.common.security.authorization.jdo.JDOUserGroup l
    My arguments: <none>
    Any hints?
    Cheers,
    Andreas
    Andreas Thiel wrote:
    Hi,
    I'm trying to create a query which should find objects which do NOT belong
    to a certain collection.
    I've tried something like
    (!_user._groups.contains(login) && (login._name == "GROUP_LOGIN"))
    , but this returns the same result as with the negation:
    (_user._groups.contains(login) && (login._name == "GROUP_LOGIN"))
    I've compared the SQL statements of both queries (see below), they are
    equal, too.
    Does JDO support queries like this? If not, is there any workaround?
    Here's the SQL statement of kodo:
    executing statement <4958626>: (SELECT DISTINCT t0.JDOIDX, t0.JDOCLASSX,
    t0.JDOLOCKX, t0.ACCOUNT, t0.CONTENT_ROLE, t0.FIRST_NAME,
    t0.FRAMEWORKUSERX, t0.LAST_NAME, t0.PASSWORD, t0.RETAILER,
    t0.WRONG_PWD_COUNTER, t0.ACCOUNT FROM JDOABSTRUSR t1, JDOABSTRUSR t3,
    JDOUSERGROUP__USERSX t2, UUser t0 WHERE ((t3.NAME = ? AND t0.JDOCLASSX =
    ?) AND t0.FRAMEWORKUSERX = t1.JDOIDX AND t1.JDOIDX = t2.USERSX AND
    t2.JDOIDX = t3.JDOIDX) ORDER BY t0.ACCOUNT DESC):
    [reused=1;params=]
    Regards,
    Andreas
    Stephen Kim
    [email protected]
    SolarMetric, Inc.
    http://www.solarmetric.com

  • Collecting objects in BEx transport request

    Hi,
    I have created a BEX request in a way like
    ---> Modelling-> Transport Connection-> Create Bex Request-> Assigned $TMP package and finally created my Own request.
    I started working on a query. After finishing it, I have dragged & dropped the query in Transport Tab( left to right ).
    Then I have unchecked all the components in the Query elements.
    Then i transported to quality system. It has ended with "Return Code 8"
    And it shows two query elements are missing in M version. What does it means?
    My entire sequence is right or not? I am totally confused. Need a quick reply......
    Thanks in Advance
    REgards,
    Suman

    Hi Suman,
    saving the developed objects in a $TMP package means you had saved them in the local object which can't be transported to QA or Prod.
    You need to assign the development to a new package which is used in your project for transports collection.
    you are trying to transport your query right?
    First make sure that the info providers on which it is build or already transported or not. and also check if they are active or not?
    As you said your query is already saved in the $TMP local object folder. and you had created a TR.first make sure this TR which is created as local objects is released before you are assigning a package to it.
    Next for your query
    goto transport connection -->object types -->select query --> select your query and click on transfer selection --> collect all the necessary query elements --> click on transport it will prompt for a package enter the package name for ex:ZBIW.
    now click on create new TR.
    release new TR and import to QA and check.
    Check the below link for more info
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/50b1d20e-c1e8-2c10-d9b9-d48eb3a83d89?QuickLink=index&overridelayout=true
    Regards
    KP
    Edited by: prashanthk on Nov 20, 2010 9:08 PM

  • Unable to parse query when using dblink in forms 4.5

    Hi,
    I have created a query that uses a DBlink because I need to do query on a table located on another dbase. I've used the query on creating my report using Reports 6i. The report needs to be called from a menu on our system, which was developed under Developer 2000 (forms 4.5). The problem is, when I tried to access the report from the menu, it returns the error 'unable to parse query'. What I did after getting error was to create a dummy module using Forms 6i, and call my report from there. It worked fine.
    By the way, the table that I'm accessing using the dblink is under Oracle 9i dbase, and the dbase of the system that I've been working at is Oracle 8i.
    I don't have any idea on what's causing this error. Is there a compatibility issue when using a dblink located in Oracle 9i database with forms 4.5?
    Thanks!

    Hello,
    Not sure if it is the good answer, but I know that Forms does not recognize dblink and owner.object syntax. You have to create a simple synomym that point to the distant object and use this synonym within Forms.
    Francois

  • Changing the query on a view object

    I have a view object right now, based on an entity. It is the default view object, so that means the query in the view object is straight forward, it grabs all of the attributes from the table. And there is no WHERE clause.
    In reality I only want to show a finite set of rows from my table. Every time a record is changed/edited in this entity and committed, a new row in the database is created with the same information (I'm using CreateWithParams) except for a few columns.
    I actually don't really have update on this table, just creation of new rows. But to the user, I want it to 'look' like they are editing something in the table.
    Example:
    12, 11:32,Thompson, 60 (the user edits this information in an adf table, and a new row is created in the db)
    12, 11:55, Thompson, 75
    I have a timestamp (see above) field in the database that is used as part of my primary key, so that I know which record is the latest.
    When the VO query is run, I want the user to only see the latest row from the db.
    12, 11:55, Thompson, 75
    So...
    I went to my VO, and I changed the WHERE query to add this:
    where t1.TimeStamp = (Select MAX(t2.TimeStamp) FROM rcl.x t2 where t1.uid = t2.uid);
    Now, this isn't a mysql/sql question. There's actually a better query that I'd rather run, but the VO editor doesn't allow me to change the query itself....
    When I save the new WHERE to my VO, run my page again, I get the expected result (showing me only the latest records).
    However, when I try and sort on the table in which my data is displayed, I am now getting ORDER BY errors.
    I don't want my VO to be read-only sql based. I want to be able to update my table, so I have my VO running off of the entity.
    Why doesn't the VO allow me to change the query itself? (Like do a subquery, instead of having my where clause do the work)
    Why are order by errors being thrown when I sort on my adf table after changing the where clause in my view?
    Hopefully I wasn't too convoluted in the explanation of my problem..
    Thanks in advance,
    Joel

    HI Joe,
    Regarding your problem you can do one of the following tasks:
    1- easily to tuning on your view object, I mean in the tuning page of the view you can set that only return 1 record or 2-3 record fetch not all the record.
    in the order by you will order by the timestamp field and descending.
    2- you can order by the timestamp descending and in the where clause only set the rownum<2 (will return the last record) you can also set rownum<5 and get the 4 last record etc.
    3-editing the view query in the expert mode is not advised at all because of many consequences that you will face.
    4- maybe it is not bat that you add a readonly view for the table you mentioned and every time you unpdate the entity just re-execute the read-only view.( this method maybe is good maybe is not it depends on your business logic)
    Regards.
    Edited by: Amir Khanof on Sep 3, 2010 11:11 PM

Maybe you are looking for

  • New problem after Itunes upgrade.  Help!

    I did the upgrade to 5.0.1.4 and am having a problem that I don't see duplicated here. I had no problems with the installation and Itunes starts just fine but when I update podcasts Itunes intermittently hangs up. The key word is intermittently. When

  • Save file name auto correct (or drop down) on a mac

    I have a problem. I am trying to use a new workflow for my photo editing. I am going to trial a method used by many other photographers which involves something to quickly view and make selections from the images and then photoshop to save and rename

  • Controlling the name of a PDF split

    I need to keep a consitant number of digits in the name of the PDF.  When I split a document, it increments.  How can I make the names be either 3 or 4 digits consistantly. Need: PDF_0001.pdf (page 1) PDF_0002.pdf (page 2) PDF_0003.pdf (page 3) PDF_0

  • Can I translate specific words in Adobe reader?

    Hi all! I am a student and I always read research papers in PDF format. However, Somtimes I need to translate specific words from English to Spanish. Is there away to do that? like a plug-in or by using another program associated with Adobe Reader Th

  • Datasource is getting created without jndi name

    <?xml version="1.0" ?>      <project name="deploy" default="createDataSource" basedir=".">      <property name="weblogic.jar" location="C:/Oracle/Middleware/wlserver_10.3/server/lib/weblogic.jar"/>      <property name="wls.username" value="weblogic"