A better way to syncronize objects in servlets

Hi,
I am working on a webapp that has a servlet that invoque a instance of a object that accesses our sybase server.
What is the best secure way to syncronize to avoid problems at the database?
I have searched all of these but I am still confused:
Syncronize the servlet
public class LoginHandler extends HttpServlet implements SingleThreadModel
Syncronize the object
private DBManager dba = DBManager.getInstance() ;
private String GetUserCode(String Username, String Password)
syncronized(this) {
DBResults rsResult = dba.ExecQuery(SQLQuery);
Syncronize the object in the class
public class DBManager implements Serializable
private static DBManager _instancie = new DBManager();
public static synchronized DBManager getInstance()
if (_instance == null) _instance = new DBManager();
return _instance;
Syncronize the db connection
try
synchronized (ds)
con = ds.getConnection();
st = con.createStatement();
rs = st.executeQuery(sqlQuery);
if (rs.next()) rsValue = rs.getString(1);
catch (Exception e)
Syncronize method
public static syncronized String getDBValue(String SQL)
Thanks very much,
Lorenzo

I would not synchronize the servlet with SingleThreadModel
I would not have all this code in the servlet at all. (Servlets handle HTTP requests, after all.) Would you want to avoid problems at the database if you didn't have a Web interface? I think so. In that case, take care of the problem in the persistence layer, as close to the database as possible.
You don't want to do anything that will increase your sense of security and kill your performance.
I think there's a difference between synchronization and isolation. Read up on the java.sql.Connection.setTransactionIsolation(int level) method. I believe that's pertinent.
I think you should investigate pessimistic vs optimistic locking, isolation, dirty reads, phantom reads and writes. I'd enlist the help of the database and its admin as much as possible.

Similar Messages

  • Callouts and anchored objects - there must be a better way to do this

    I've spent a lot of time in the last six months rebuilding PDF files in InDesign. It's part of my ordinary responsibilities, but I'm doing a lot more of it for some reason. Because I'm sending the text of these rebuild documents out for translation, I like to keep all of the text in a single story. It really helps to have the text in "logical order," I think; when I'm prepping a trifold brochure, I try pretty hard to make sure that the order in which the readers will read the text is duplicated in the flow of the story throughout the ID document.
    So, I'm rebuilding a manual that has a 3-column format on lettersize paper, and it's full of callouts. Chock full of 'em. They're not pull quotes, either; each of these things has unique text. Keeping in mind that I'd like the text in these callouts to remain in the same position in the text once I've linked all the stories and exported an RTF for translation, what's the best way to handle them? What I've been doing is inserting an emptly stroked frame as an anchored object, sized and positioned to sit above the text that is supposed to be called out. When my translations come back, they're always longer than the source document, so as I crawl through the text, I resize the anchored frames to match the size and position of the newly expanded translated text, and then nudge them into place with the keyboard.
    There Has To Be a Better Way.
    There is a better way, right? I'm not actually too sure. If I want to actually fill those anchored frames with text, I can't thread them into the story. I suppose that I could just thread the callout frames and assign two RTFs for translation instead of one, but then the "logical order" of my text is thrown out the window. So, I'm down to asking myself "what's more important? reduction of formatting time or maintenance of the flow of the story?" If there's something I'm missing that would let me dodge this decision, I'd love to hear about it. The only thing I can think of would work like this:
    1) Duplicate callout text in the story with a custom swatch "Invisible"
    2) Create "CalloutText" parastyle with "Invisible" swatch and apply it to callout text
    3) Insert anchor for anchored frame immediately before the CalloutText content
    4) Send it out for translation
    5) While I'm waiting for it to come back, write a script that would (dunno if this is possible):
       a) Step through the main story looking for any instance of CalloutText
       b) Copy one continguous instance of that style to the clipboard
       c) Look back in the story for the first anchor preceeding the instance of CalloutText
       d) Fill the anchored object with the text from the clipboard (this is where I'm really clueless)
       e) Apply a new parastyle to the text in the callout
       f) Continue stepping through the story looking for further instances of CalloutText
    If this really is the only decent solution, I'll just head over to the Scripting forum for some help with d). Can any of you make other suggestions?

    In-Tools.com wrote:
    The use of Side Heads saves weeks of manual labor.
    Yup, Harbs, that is exactly what I was describing. If I use the Side Heads plugin to set up a job, will my clients get a missing plug-in warning when they open up the INDD? Will roundtripping through INX strip the plugin but leave the text in the callout? (My clients don't care if the logical flow of the story is broken; it's just me.)
    I'm just curious; seems like a pretty obvious purchase to me. I'll probably try to script a solution anyways, after I buy the plugin; that way I get to learn about handling anchored objects in scripts AND deliver the job on time!

  • Best way to pass values btwn servlets?

    i have to pass multiple values from one servlet to the next, when the user submits a form.
    i don't know how many, or even the names of the parameters until the user submits the form.
    right now, i send them as hidden fields when the form is submitted.
    in the receiveing servlet, i dump them into a hashtable usng httpUtils.parse QueryString, and then parse them out of the hashtable.
    is there a better way?
    TIA,
    Scott Murray

    DrClap,
    Yes, I am working with a single user.
    Last night I reworked it as follows, dumping the parameters into a Properties object, which is easier to work with than a hashtable (at least it is for me):
    Properties props = new Properties();
    Enumeration paramNames = req.getParameterNames();
    while (paramNames.hasMoreElements()) {
    String name = (String) paramNames.nextElement();
    String[] values = req.getParameterValues(name);
    props.setProperty (name, values[0]);
    The trick is that I don't know in advance the names or how many parameters are being received; I marked them on the sending page with different prefixes (@@@, ###, $$$) so as I parse thru the Properties object, I can determine what type of parameter it is.
    Is there a better object to use than the Properties object? My ultimate goal is to have something similar to a ResultSet that I can search and step thru multiple times.
    Thanks for you time and expertise,
    Scott Murray

  • A better way to initialize imported taskflows and BCs with current user

    Hello.
    I'm currently developing a composite application containing one main application and a number of subapplications (modules) packed in adflibs.
    Main application has a side menu and a dynamic region, showing taskflows (on fragments) from adflibs.
    Main application is configured with adf security and it has current login and queries his ID. I would like main application to tell modules current user ID rather than each module to find out current user on their own.
    So there is currentUserID input parameter required in each imported taskflow. And my question is what is a better way to process this ID in the modules?
    What I have previously done is:
    I've created a custom BC classes layer, VOImpl and VORowImpl have getIdUser() method. This method reads currentUserID parameter from pageFlowScope where the taskflow is storing the parameter.
    Top-level View Objects have :IdUser query parameter and corresponding bind variable. This bind variable has value="source.getIdUser()", calling the method from custom VO class.
    This way works fine but here and there I read that it is a bad practice to access pageFlowScope from BCs.
    I could agree with this in case someone could share a better way.
    So what is a good practice?
    Thanks.
    ADF/JDev 11.1.2.3 - 12

    Why don't you use adf security for this? Read Oracle ADF: Security for Everyone which give you an overview and sample on how to implement this.
    Timo

  • A better way to refresh data

    Hey everyone, I'm creating a Flex/ColdFusion app. and I've
    been working with CFCs and RemoteObjects. I know that when you want
    to refresh data you have to call the CFC with the RemoteObject
    every time (after the creationComplete is called I use addedToStage
    and removedFromStage to re-call the CFC). Is there a better way to
    refresh my data or "re-initialize" the component?
    Also, does anyone know the proper way to log someone out
    using ColdFusion and Flex? I pass the cflogout method in my CFC and
    in Flex I return the user to the login page and "reset" my objects
    I use to store user data, but after logging in as a different user
    the previous user's info is still present. So I've resorted to
    reloading the URL to clear the application of all data. Any tips?
    Thanks,
    PJ

    I don't really get what you mean with "re-initialize the
    component"?
    Here you can learn about login and logout in ColdFusion.
    http://www.brucephillips.name/blog/index.cfm/2006/11/27/Login-and-Logout-Flex-Example-That -Uses-ColdFusion-CFLogin-and-CFC-Role-Security

  • What is the better way to end a ajax request in JSF?

    Hi, i hav a question.
    Im working with AJAX inside JSF, using a phaseListener, when i finish my work i do:
    context.responseComplete( );But i want to save the view, i dont want lose the changes ive made in my backbeans, what can i do?
    tkz.

    Ok, ill try to explain in better way:
    AJAX goes to the server and update the model, server response xml and update the client, i hav tags in my jsp like saveState (save the state of object), its a tomahawk component, the jsf_sequence goes with AJAX, i need save the view state using that sequence, because another sequence will be back to the client.
    When client go with normal request (get, post), the server doenst restore my previous state (because i think ajax ended the lifecycle first).
    Some time ago, i did something like this:
              Map map = context.getExternalContext().getRequestMap();
              Integer sequence = (Integer) map.get(RendererUtils.SEQUENCE_PARAM);
              if (sequence == null || sequence == 1) {
                   logger.warn("JSF_SEQUENCE error");
              } else {
                   sequence--;
                   synchronized (context.getExternalContext().getSession(true)) {
                        context.getExternalContext().getSessionMap().put(
                                  RendererUtils.SEQUENCE_PARAM, sequence);
                   synchronized (map) {
                        map.put(RendererUtils.SEQUENCE_PARAM, sequence);
    context.getApplication().getStateManager().saveSerializedView(
                             context);The code back the jsf_sequence and i dont touch in the jsf_sequence on cliente, so when client post with normal away, everything is fine because faces saved the last view in that sequence. I dont wanna do that again, i wanna discover a soft way.
    tkz.
    Message was edited by:
    CasMeiron

  • Must be a better way...

    Hello Flash Community!
    Thanks in advance for any help/advice.
    So, what I'm looking for here is some high level advice as far as a better way to do things. I feel like so often with programming I'm just breaking my neck to get things working when I know there is a better way (presumably based in OOP) to go about things. I just need someone to look at what I've done and point it out to me.
    So, here's what I've done so far: http://www.catherinemix.com
    And it works pretty well as far as I'm concerned! The app dynamically loads as many images as my client (my mom ) puts on the server, resizes them dynamically, adds L/R arrow buttons dynamically based on how many images are involved, etc... But the downside to all that dynamic flexibility is that I haven't found a way to load the thumbnail images (and their respective full size images) one by one. Instead, I have to load them all together and keeping the user waiting that long is unacceptable to my mom. What I would love is for each thumbnail/full size combo to get its own preloader bar in the location it will eventually be embedded, but I haven't found a way to do that and account for an unknown number of images (as it is determined dynamically.)
    Any ideas here? I would specifically like to know which functions y'all use when you need to load multiple files simultaenously (AttachMovie?)
    I have posted the kluge-y code which handles all of the image gallery functions below.
    Thanks! and Be Well
    Graham
    import fl.transitions.Tween;
    import fl.transitions.easing.*;
    var wait:PleaseWait = new PleaseWait();
    wait.x = 400;
    wait.y = 50;
    addChild(wait);
    var waitFadeIn:Tween = new Tween(wait, "alpha", Regular.easeOut, 0, 1, 1, true);
    var titleText:TextField;
    var textSprite:Sprite;
    //thumbH is the ideal height for our thumbnails, and thumbW the ideal width
    var thumbH = 120;
    var thumbW = 170;
    //loadH is the ideal height for our fullsize images, and loadW the ideal width
    var loadH = 500;
    var loadW = 600;
    //some counter numbers
    var thumbNum = 1;
    var loadNum = 1;
    //some Sprites which need to be accessed by more than one function
    var darkStage:Sprite;
    var loadSprite:Sprite;
    //Let's instantiate some Arrays that we can load the images into.
    //Since Arrays of Loaders can't be copied, we have to go through the process twice.
    var thumbArray:Array = new Array();
    var loadArray:Array = new Array();
    firstLoad();
    firstThumb();
    function firstLoad():void {
        trace("firstLoad");
        var loadski = new Loader();
        loadski.load(new URLRequest("images/fulls/0.png"));
        loadski.contentLoaderInfo.addEventListener(Event.COMPLETE, loadComplete);
        loadArray.push(loadski);
    //Starting with the above Loader, this function will execute every time the Loader completes
    function loadComplete(e:Event):void {
        trace("loadComplete");
        var loadski = new Loader();
        loadski.load(new URLRequest("images/fulls/" + loadNum + ".png"));
        loadArray.push(loadski);
        loadski.contentLoaderInfo.addEventListener(Event.COMPLETE, loadComplete);
        loadski.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, loadError);
        loadNum++;
    //Once the Loader goes too far by attempting to load an image that doesn't exist on the computer,
    //it will thorw an IOError Event at which point the following function will execute.
    function loadError(e:IOErrorEvent):void {
        trace("loadError");
        loadArray.pop();
        loadNum = 0;
        loadResize();
        //We use the pop function to remove the most recently added Loader instance, since we know it
        //contains a null reference (beacuse the IOError Event is asynchronous.)
        thumbArray.pop();
        //We reset the counter variable.
        thumbNum = 0;
        //Add the little arrows that allow the user to click to see more thumbnails (if there are more
        //than 8 images on the server.)
        removeChild(wait);
        addArrows();
        //Let's resize the images to thumbnail size and add them to the display list.
        thumbResize();
        addClickOnThumb();
    function loadResize():void {
        trace("loadResize");
        for (var ex = 0; ex < loadArray.length; ex++) {
            //If the width of the image is greater than the ideal width, OR the height is greater than the ideal height...
            if ( loadArray[loadNum].content.width > loadW || loadArray[loadNum].content.height > loadH) {
                //And if the width of the image is greater than the height, apply Scaler 1...
                if ( loadArray[loadNum].content.width > loadArray[loadNum].content.height ) {
                    //Scaler 1 is the ratio of the ideal width to the image width
                    var scaler1 = loadW / loadArray[loadNum].content.width;
                    trace(loadNum + " load scaler 1: " + scaler1);
                    //Apply Scaler 1 to both the width and height of the image
                    loadArray[loadNum].content.scaleX = loadArray[loadNum].content.scaleY = scaler1;
                    //Otherwise, apply Scaler 2
                } else {
                    //Scaler 2 is the ratio of the ideal width to the image height
                    var scaler2 = loadH / loadArray[loadNum].content.height;
                    trace(loadNum + " load scaler 2: " + scaler2);
                    //Apply Scaler 2 to both the width and height of the image
                    loadArray[loadNum].content.scaleX = loadArray[loadNum].content.scaleY = scaler2;
                    trace("loadArray[loadNum].content.height = " + loadArray[loadNum].content.height);
                    trace("loadArray[loadNum].content.width = " + loadArray[loadNum].content.width);
                //Otherwise... (that is, the image width and height are in both cases less than the ideal)
            } else {
                //And if the width of the image is greater than the heigh, apply Scaler 3
                if ( loadArray[loadNum].content.width > loadArray[loadNum].content.height ) {
                    //Scaler 3 is the ratio of the ideal width to the image width
                    var scaler3 = loadW / loadArray[loadNum].content.width;
                    trace(loadNum + " load scaler 3: " + scaler3);
                    //Apply Scaler 3 to both the width and height of the image
                    loadArray[loadNum].content.scaleX = loadArray[loadNum].content.scaleY = scaler3;
                } else {
                    //Scaler 4 is the ratio of the ideal width to the image height
                    var scaler4 = loadH / loadArray[loadNum].content.height;
                    trace(loadNum + " load scaler 4: " + scaler4);
                    //Apply Scaler 4 to both the width and height of the image
                    loadArray[loadNum].content.scaleX = loadArray[loadNum].content.scaleY = scaler4;
            loadArray[loadNum].content.x = - (loadArray[loadNum].content.width / 2);
            loadArray[loadNum].content.y = - (loadArray[loadNum].content.height / 2);
            loadNum++;
    function firstThumb():void {
        trace("firstThumb");
        //Let's populate the first Array with Loaders that load the images Mom has put on the server.
        //We have to do this first Loader object by hand to get the Event.COMPLETE-based-loop going.
        var thumbski = new Loader();
        thumbski.load(new URLRequest("images/thumbs/0.png"));
        thumbski.contentLoaderInfo.addEventListener(Event.COMPLETE, thumbComplete);
        //We add the MouseEvent.CLICK listener to the actual Loader instance so that, later on, in the
        //function enLarge, we can make use of the currentTarget parameter to correlate the Array index of
        //the thumbnail that the user is clicking on with that of the loadArray.
        thumbski.addEventListener(MouseEvent.CLICK, enLarge);
        thumbArray.push(thumbski);
    //Starting with the above Loader, this function will execute every time the Loader completes
    function thumbComplete(event:Event):void {
        trace("thumbComplete");
        var thumbski = new Loader();
        thumbski.load(new URLRequest("images/thumbs/" + thumbNum + ".png"));
        thumbski.contentLoaderInfo.addEventListener(Event.COMPLETE, thumbComplete);
        //We add the IOErrorEvent listener so that as soon as this error is thrown, we will exit this loop
        //and proceed to the next logical step in the program can be taken.
        thumbski.addEventListener(MouseEvent.CLICK, enLarge);
        thumbArray.push(thumbski);
        thumbNum++;
    function addArrows():void {
        //Let's determine how many batches there are. A batch is the minimum amount of thumbnail images
        //mom wants to show up onscreen at a time. In this case, she has decided on 8.
        var batches =  Math.ceil(thumbArray.length / 8);
        //The variable m is part of a kluge fix related to the calculation of startX (explained below.)
        var m = 0;
        //Pseudocode for this loop: If there are at least two batches, then...
        //We do this because less than 2 batches doesn't warrant arrows
        if (batches > 1) {
            for (var k = 1; k < batches; k++) {
                //triW is the desired width of our arrows
                var triW = 20;
                //startX is the x position of the start of our rightward facing triangle(s)
                //The formula says: Our x starting position should be a triangle width shy of the
                //far edge of the stage (multiplying it by k ensures it happens as many times
                //as there are batches, which is why we intialize k = 1.) Every subsequent iteration
                //of the formula has to add a triangle's width worth of distance, except for the
                //very first one, which is why it is multiplied by m, which is initially set to 0.
                var startX = (((stage.stageWidth - triW) * k) + (triW * m));
                //We want the arrows to sit perfectly between the two rows of thumbnails. Since the
                //max height of every thumbnail is thumbW, that would seem to be the natural choice
                //for the starting y position of the arrows. But, we actually have to use thumbW/2
                //because the thumbnails have already been offset by half of thumbW due to being
                //aligned vertically with each other.
                var startY = (thumbW / 2);
                //This is the rightward facing triangle
                var tri:Sprite = new Sprite();
                tri.graphics.beginFill(0xFFFFFF);
                tri.graphics.moveTo(startX, startY);
                tri.graphics.lineTo(startX, (startY + triW));
                tri.graphics.lineTo((startX + triW), (startY + (triW/2)));
                tri.graphics.lineTo(startX, startY);
                tri.graphics.endFill();
                tri.buttonMode = true;
                tri.useHandCursor = true;
                tri.addEventListener(MouseEvent.CLICK, moveLeft);
                addChild(tri);
                //This is the leftward facing triangle
                var tri2:Sprite = new Sprite();
                var startX2 = (startX + (triW * 2));
                tri2.graphics.beginFill(0xFFFFFF);
                tri2.graphics.moveTo(startX2, startY);
                tri2.graphics.lineTo(startX2, (startY + triW));
                tri2.graphics.lineTo((startX2 - triW), (startY + (triW / 2)));
                tri2.graphics.lineTo(startX2, startY);
                tri2.graphics.endFill();
                tri2.buttonMode = true;
                tri2.useHandCursor = true;
                tri2.addEventListener(MouseEvent.CLICK, moveRight);
                addChild(tri2);
                //Increase m (see above)
                m++;
    //This function moves the entire Gallery MovieClip to the left 800 pixels.
    function moveLeft(event:MouseEvent):void {
        var leftTween:Tween = new Tween(this, "x", Regular.easeOut, this.x, (this.x - 800), .5, true);
    //This function moves the entire Gallery MovieClip to the right 800 pixels.
    function moveRight(event:MouseEvent):void {
        var rightTween:Tween = new Tween(this, "x", Regular.easeOut, this.x, (this.x + 800), .5, true);
    //This function resizes the loaded images to the desired thumbnail dimensions and adds them
    //to the display list.
    function thumbResize():void {
        //The highest level of organization of thumbnails is the batch. There are only as many batches
        //as the length of the thumbArray divided by 8 (the max amount of thumbnails in a batch, as determined
        //by mom.)
        for (var batch = 0; batch < Math.ceil(thumbArray.length / 8); batch++) {
            trace("batch " + batch);
            //This Sprite serves as the container that we use to position entire batches
            var batchSprite: Sprite = new Sprite();
            //The logic behind setting the x position of the batchSprite to 800 x batch should be self-evident --
            //we want each new batch to be 800 pixels to the right of the former one -- but the addition of (thumbW
            //divided by 1.5) is a kluge fix for how much space to give the batches on left margin.
            batchSprite.x = (thumbW / 1.5) + (batch * 800);
            addChild(batchSprite);
            //The second highest level of organization for our thumbnails is the row. Our grid of thumbnails is
            //two rows deep.
            for (var row = 0; row < 2; row++) {
                trace("     row " + row);
                //The third highest level of organization for our thumbnails is the column. Our grid of thumbnails is
                //four columns deep.
                for (var col = 0; col < 4; col++) {
                    trace("          col " + col);
                    trace("               thumb " + thumbNum);
                    if (thumbNum < thumbArray.length) {
                        //The following is the logic structure for handling the resizing of images. The goal was to develop
                        //a system robust enough to allow my mom to put whatever size images she wanted on the server and the
                        //app would use them. The logic is explained at each step...
                        //If the width of the image is greater than the ideal width, OR the height is greater than the ideal height...
                        if ( thumbArray[thumbNum].content.width > thumbW || thumbArray[thumbNum].content.height > thumbH) {
                            //And if the width of the image is greater than the height, apply Scaler 1...
                            if ( thumbArray[thumbNum].content.width > thumbArray[thumbNum].content.height ) {
                                //Scaler 1 is the ratio of the ideal width to the image width
                                var scaler1 = thumbW / thumbArray[thumbNum].content.width;
                                trace("               scaler1 = " + scaler1);
                                //Apply Scaler 1 to both the width and height of the image
                                thumbArray[thumbNum].content.scaleX = thumbArray[thumbNum].content.scaleY = scaler1;
                                trace("               image width:" + thumbArray[thumbNum].content.width);
                                trace("               image height:" + thumbArray[thumbNum].content.height);
                                //Otherwise, apply Scaler 2
                            } else {
                                //Scaler 2 is the ratio of the ideal width to the image height
                                var scaler2 = thumbW / thumbArray[thumbNum].content.height;
                                trace("               scaler2 = " + scaler2);
                                //Apply Scaler 2 to both the width and height of the image
                                thumbArray[thumbNum].content.scaleX = thumbArray[thumbNum].content.scaleY = scaler2;
                                trace("               image width:" + thumbArray[thumbNum].content.width);
                                trace("               image height:" + thumbArray[thumbNum].content.height);
                            //Otherwise... (that is, the image width and height are in both cases less than the ideal)
                        } else {
                            //And if the width of the image is greater than the heigh, apply Scaler 3
                            if ( thumbArray[thumbNum].content.width > thumbArray[thumbNum].content.height ) {
                                //Scaler 3 is the ratio of the ideal width to the image width
                                var scaler3 = thumbW / thumbArray[thumbNum].content.width;
                                trace("               scaler3 = " + scaler3);
                                //Apply Scaler 3 to both the width and height of the image
                                thumbArray[thumbNum].content.scaleX = thumbArray[thumbNum].content.scaleY = scaler3;
                                trace("               image width:" + thumbArray[thumbNum].content.width);
                                trace("               image height:" + thumbArray[thumbNum].content.height);
                            } else {
                                //Scaler 4 is the ratio of the ideal width to the image height
                                var scaler4 = thumbW / thumbArray[thumbNum].content.height;
                                trace("               scaler4 = " + scaler4);
                                //Apply Scaler 4 to both the width and height of the image
                                thumbArray[thumbNum].content.scaleX = thumbArray[thumbNum].content.scaleY = scaler4;
                                trace("               image width:" + thumbArray[thumbNum].content.width);
                                trace("               image height:" + thumbArray[thumbNum].content.height);
                        //Here is where we center the images vertically...
                        thumbArray[thumbNum].content.x = - (thumbArray[thumbNum].content.width / 2);
                        //Here is where we center the images horizontally...
                        thumbArray[thumbNum].content.y = - (thumbArray[thumbNum].content.height / 2);
                        //Before placing them in their own container Sprite, so that their relative positions can be
                        //determined accurately (a task that would've been otherwise impossible after the
                        //adjustments to position made above.)
                        var thumby = new MovieClip();
                        thumby.addChild(thumbArray[thumbNum]);
                        //thumbW being the max possible length or width of any one thumbnail (this was done for visual
                        //consistency and codified in the logic tree above), placing two thumbnails thumbW
                        //apart (measuring from center point in either case) will put them edge to edge at best. This is why
                        //we add (thumbW / 8) as additional spacing.
                        thumby.y = (row * (thumbW + (thumbW / 8)));
                        thumby.x = (col * (thumbW + (thumbW / 8)));
                        thumby.buttonMode = true;
                        thumby.useHandCursor = true;
                        var fA:Array = new Array();
                        var dS:DropShadowFilter = new DropShadowFilter(5, 45, 0x000000, 0.33, 5, 5, 1, 1);
                        fA.push(dS);
                        thumby.filters = fA;
                        trace("thumby.width = " + thumby.width);
                        trace("thumby.height = " + thumby.height);
                        batchSprite.addChild(thumby);
                        thumbNum++;
    function enLarge(event:MouseEvent):void {
        var indexNum:Number = new Number();
        indexNum = thumbArray.indexOf(event.currentTarget);
        trace("indexNum = " + indexNum);
        darkStage = new Sprite();
        darkStage.graphics.beginFill(0x333333, .9);
        darkStage.graphics.drawRect(0, 0, stage.stageWidth, stage.stageHeight);
        darkStage.addEventListener(MouseEvent.CLICK, reMove);
        darkStage.buttonMode = true;
        darkStage.useHandCursor = true;
        (parent  as  MovieClip).addChild(darkStage);
        loadSprite = new Sprite();
        loadSprite.addChild(loadArray[indexNum]);
        loadSprite.x = (stage.stageWidth / 2);
        loadSprite.y = (stage.stageHeight / 2);
        loadSprite.addEventListener(MouseEvent.CLICK, reMove);
        loadSprite.buttonMode = true;
        loadSprite.useHandCursor = true;
        loadSprite.mouseEnabled = false;
        (parent  as  MovieClip).addChild(loadSprite);
        var urlRequest:URLRequest = new URLRequest("xmls/" + indexNum + ".xml");
        var titleURL:URLLoader = new URLLoader();
        titleURL.addEventListener(Event.COMPLETE, completeListener);
        titleURL.load(urlRequest);
        function completeListener(event:Event):void {
            titleText = new TextField();
            titleText.autoSize = TextFieldAutoSize.LEFT;
            var myFont:Font = new BOF();
            var ttFormat:TextFormat = new TextFormat();
            ttFormat.color = 0xFFFFFF;
            ttFormat.size = 18;
            ttFormat.font = myFont.fontName;
            textSprite = new Sprite();
            textSprite.addChild(titleText);
            (parent  as  MovieClip).addChild(textSprite);
            var titleXML:XML = new XML(titleURL.data);
            titleText.text = titleXML.toXMLString();
            titleText.setTextFormat(ttFormat);
            titleText.embedFonts = true;
            textSprite.y = 570;
            textSprite.x = ((stage.stageWidth / 2) - (titleText.textWidth / 2));
            textSprite.mouseEnabled = false;
            titleText.mouseEnabled = false;
    function reMove(event:MouseEvent):void {
        (parent  as  MovieClip).removeChild(textSprite);
        (parent  as  MovieClip).removeChild(loadSprite);
        (parent  as  MovieClip).removeChild(darkStage);
    function addClickOnThumb():void {
        var cot:ClickOnThumbnail = new ClickOnThumbnail();
        cot.x = 400;
        cot.y = 583;
        (parent  as  MovieClip).addChild(cot);

    Hey Jim
    Wow, that's great; thanks! Can I ask what settings you used to get the files so small?
    Yes, I am familiar with Photoshop and image optimization issues, but I didn't realize that PNG was so much bigger than JPG and that I had so much file size I could shed before I would notice a degradation in image quality. Your advice will certainly help greatly, and I will certainly apply it to the thumbs as well. I think my mom will be very pleased.  : )
    I look forward to hearing what collection of settings you used.
    Thanks and Be Well
    Graham

  • Is there a better way to stop a Method than Thread.stop()?

    First my basic problem. In one of my programs I am using constraint solver. I call the constraint solver with a set of constraints and it returns a Map with a satisfying assignment. In most cases this works in acceptable time ( less than 1 second). But in some cases it may take hours. Currently I am running the function in a Thread and using Thread.stop(). This look like that:
         public Map<String, Object> getConcreteModel(
                   Collection<Constraint> constraints) {
              WorkingThread t=new WorkingThread(constraints);
              t.setName("WorkingThread");
              t.start();
              try {
                   t.join(Configuration.MAX_TIME);
              } catch (InterruptedException e) {
              if(t.isAlive()){
                   t.stop();
              return t.getSolution();
         }where t.getSolution(); returns null if the Thread was interrupted.
    Unfortunately this sometimes crashes the JVM with:
    # A fatal error has been detected by the Java Runtime Environment:
    #  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x000000006dbeb527, pid=5788, tid=4188
    # JRE version: 6.0_18-b07
    # Java VM: Java HotSpot(TM) 64-Bit Server VM (16.0-b13 mixed mode windows-amd64 )
    # Problematic frame:
    # V  [jvm.dll+0x3fb527]
    # An error report file with more information is saved as:
    # F:\Eigene Dateien\Masterarbeit\workspace\JPF-Listener-Test\hs_err_pid5788.log
    # If you would like to submit a bug report, please visit:
    #   http://java.sun.com/webapps/bugreport/crash.jsp
    #Does anyone knows a better way to do it?
    Thank you in advance.
    Note 1: the Constraint solver is a Third Party tool and changing it is unfeasible. (I have tried it already)
    Note 2: Using Thread.stop(Throwable t) only chances the error message.

    In case somebody have the same problem here my code which solves the problem. Note it requires to parameters and the result to be serializable.
    The Class which starts to Process:
    public class Solver{
         public Map<String, Object> getConcreteModel(
                   Collection<Constraint> constraints) {
                   try
                        Process p=Runtime.getRuntime().exec(...); //do not forget the classpath
                        new TimeOut(Configuration.MAX_TIME, p).start();
                        ObjectOutputStream out=new ObjectOutputStream(p.getOutputStream());
                        new ErrReader(p.getErrorStream()).start();//not that std.err fills up the pipe
                        out.writeObject(constraints);
                        out.flush();
                        ObjectInputStream in=new ObjectInputStream(p.getInputStream());
                        return (Map<String, Object>) in.readObject();
                   catch(IOException e)
                        return null;
                   } catch (ClassNotFoundException e) {
                        //should not happen
                        return null;
         // For running in a own process
         static private class TimeOut extends Thread
              private int time;
              private Process p;
              public TimeOut(int time, Process p)
                   this.time=time;
                   this.p=p;
              @Override
              public void run() {
                   synchronized (this) {
                        try {
                             this.wait(time);
                        } catch (InterruptedException e) {
                   p.destroy();
         static class ErrReader extends Thread
             InputStream is;
             ErrReader(InputStream is)
                 this.is = is;
                 this.setDaemon(true);
             public void run()
                 try
                     InputStreamReader isr = new InputStreamReader(is);
                     BufferedReader br = new BufferedReader(isr);
                     String line=null;
                     while ( (line = br.readLine()) != null)
                         System.err.println(line);   
                     } catch (IOException ioe)
                         ioe.printStackTrace(); 
    }And the class which executet the Program
    public class SolverProcess {
          * @param args ignored
         public static void main(String[] args){
              try {
                   ObjectInputStream in =new ObjectInputStream(System.in);
                   SolverProcess p=new SolverProcess();
                   p.constraints=(Collection<Constraint>) in.readObject();
                   p.compute();
                   ObjectOutputStream out=new ObjectOutputStream(System.out);
                   out.writeObject(p.solution);
                   out.flush();
              } catch (Exception e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
              //System.err.println("solved");
              System.exit(0);
         private Map<String, Object> solution=null;
         private Collection<Constraint> constraints;
           private void compute()
    }

  • Looking for a better way to write this SQL

    Oracle version 11R2
    OS version (does not matter)
    What I trying to do is write a query that finds Public Synonyms without a target object. I came up with this but I thinking there's a better way.
    Select
      s.owner, s.synonym_name, s.table_name, s.table_owner, s.db_link, InitCap(o.object_type) object_type
    from  
      sys.DBA_SYNONYMS s, sys.DBA_OBJECTS o
    where 
      s.synonym_name is not null
    and   
      s.table_owner = o.owner (+)
    and   
      s.table_name = o.object_name (+)
    and   
      s.owner = 'PUBLIC'
    and
      object_type is null;  object_type is null appears to be the weakness. It seems the check of the target object should be better.
    Feedback, comments, queries welcome.

    I'm not sure exactly what "better" means in this context (faster, easier to read, etc.) but I'd tend to use a NOT EXISTS
    SELECT s.*
      FROM dba_synonyms s
    WHERE owner = 'PUBLIC'
       AND s.db_link IS NULL
       AND NOT EXISTS (
        SELECT 1
          FROM dba_objects o
         WHERE o.owner = s.table_owner
           AND o.object_name = s.table_name )I added the DB_LINK criteria to filter out public synonyms that reference objects in remote databases which obviously don't exist in the local DBA_OBJECTS.
    Justin

  • Is there a better way to do this projection/aggregate query?

    Hi,
    Summary:
    Can anyone offer advice on how best to use JDO to perform
    projection/aggregate queries? Is there a better way of doing what is
    described below?
    Details:
    The web application I'm developing includes a GUI for ad-hoc reports on
    JDO's. Unlike 3rd party tools that go straight to the database we can
    implement business rules that restrict access to objects (by adding extra
    predicates) and provide extra calculated fields (by adding extra get methods
    to our JDO's - no expression language yet). We're pleased with the results
    so far.
    Now I want to make it produce reports with aggregates and projections
    without instantiating JDO instances. Here is an example of the sort of thing
    I want it to be capable of doing:
    Each asset has one associated t.description and zero or one associated
    d.description.
    For every distinct combination of t.description and d.description (skip
    those for which there are no assets)
    calculate some aggregates over all the assets with these values.
    and here it is in SQL:
    select t.description type, d.description description, count(*) count,
    sum(a.purch_price) sumPurchPrice
    from assets a
    left outer join asset_descriptions d
    on a.adesc_no = d.adesc_no,
    asset_types t
    where a.atype_no = t.atype_no
    group by t.description, d.description
    order by t.description, d.description
    it takes <100ms to produce 5300 rows from 83000 assets.
    The nearest I have managed with JDO is (pseodo code):
    perform projection query to get t.description, d.description for every asset
    loop on results
    if this is first time we've had this combination of t.description,
    d.description
    perform aggregate query to get aggregates for this combination
    The java code is below. It takes about 16000ms (with debug/trace logging
    off, c.f. 100ms for SQL).
    If the inner query is commented out it takes about 1600ms (so the inner
    query is responsible for 9/10ths of the elapsed time).
    Timings exclude startup overheads like PersistenceManagerFactory creation
    and checking the meta data against the database (by looping 5 times and
    averaging only the last 4) but include PersistenceManager creation (which
    happens inside the loop).
    It would be too big a job for us to directly generate SQL from our generic
    ad-hoc report GUI, so that is not really an option.
    KodoQuery q1 = (KodoQuery) pm.newQuery(Asset.class);
    q1.setResult(
    "assetType.description, assetDescription.description");
    q1.setOrdering(
    "assetType.description ascending,
    assetDescription.description ascending");
    KodoQuery q2 = (KodoQuery) pm.newQuery(Asset.class);
    q2.setResult("count(purchPrice), sum(purchPrice)");
    q2.declareParameters(
    "String myAssetType, String myAssetDescription");
    q2.setFilter(
    "assetType.description == myAssetType &&
    assetDescription.description == myAssetDescription");
    q2.compile();
    Collection results = (Collection) q1.execute();
    Set distinct = new HashSet();
    for (Iterator i = results.iterator(); i.hasNext();) {
    Object[] cols = (Object[]) i.next();
    String assetType = (String) cols[0];
    String assetDescription = (String) cols[1];
    String type_description =
    assetDescription != null
    ? assetType + "~" + assetDescription
    : assetType;
    if (distinct.add(type_description)) {
    Object[] cols2 =
    (Object[]) q2.execute(assetType,
    assetDescription);
    // System.out.println(
    // "type "
    // + assetType
    // + ", description "
    // + assetDescription
    // + ", count "
    // + cols2[0]
    // + ", sum "
    // + cols2[1]);
    q2.closeAll();
    q1.closeAll();

    Neil,
    It sounds like the problem that you're running into is that Kodo doesn't
    yet support the JDO2 grouping constructs, so you're doing your own
    grouping in the Java code. Is that accurate?
    We do plan on adding direct grouping support to our aggregate/projection
    capabilities in the near future, but as you've noticed, those
    capabilities are not there yet.
    -Patrick
    Neil Bacon wrote:
    Hi,
    Summary:
    Can anyone offer advice on how best to use JDO to perform
    projection/aggregate queries? Is there a better way of doing what is
    described below?
    Details:
    The web application I'm developing includes a GUI for ad-hoc reports on
    JDO's. Unlike 3rd party tools that go straight to the database we can
    implement business rules that restrict access to objects (by adding extra
    predicates) and provide extra calculated fields (by adding extra get methods
    to our JDO's - no expression language yet). We're pleased with the results
    so far.
    Now I want to make it produce reports with aggregates and projections
    without instantiating JDO instances. Here is an example of the sort of thing
    I want it to be capable of doing:
    Each asset has one associated t.description and zero or one associated
    d.description.
    For every distinct combination of t.description and d.description (skip
    those for which there are no assets)
    calculate some aggregates over all the assets with these values.
    and here it is in SQL:
    select t.description type, d.description description, count(*) count,
    sum(a.purch_price) sumPurchPrice
    from assets a
    left outer join asset_descriptions d
    on a.adesc_no = d.adesc_no,
    asset_types t
    where a.atype_no = t.atype_no
    group by t.description, d.description
    order by t.description, d.description
    it takes <100ms to produce 5300 rows from 83000 assets.
    The nearest I have managed with JDO is (pseodo code):
    perform projection query to get t.description, d.description for every asset
    loop on results
    if this is first time we've had this combination of t.description,
    d.description
    perform aggregate query to get aggregates for this combination
    The java code is below. It takes about 16000ms (with debug/trace logging
    off, c.f. 100ms for SQL).
    If the inner query is commented out it takes about 1600ms (so the inner
    query is responsible for 9/10ths of the elapsed time).
    Timings exclude startup overheads like PersistenceManagerFactory creation
    and checking the meta data against the database (by looping 5 times and
    averaging only the last 4) but include PersistenceManager creation (which
    happens inside the loop).
    It would be too big a job for us to directly generate SQL from our generic
    ad-hoc report GUI, so that is not really an option.
    KodoQuery q1 = (KodoQuery) pm.newQuery(Asset.class);
    q1.setResult(
    "assetType.description, assetDescription.description");
    q1.setOrdering(
    "assetType.description ascending,
    assetDescription.description ascending");
    KodoQuery q2 = (KodoQuery) pm.newQuery(Asset.class);
    q2.setResult("count(purchPrice), sum(purchPrice)");
    q2.declareParameters(
    "String myAssetType, String myAssetDescription");
    q2.setFilter(
    "assetType.description == myAssetType &&
    assetDescription.description == myAssetDescription");
    q2.compile();
    Collection results = (Collection) q1.execute();
    Set distinct = new HashSet();
    for (Iterator i = results.iterator(); i.hasNext();) {
    Object[] cols = (Object[]) i.next();
    String assetType = (String) cols[0];
    String assetDescription = (String) cols[1];
    String type_description =
    assetDescription != null
    ? assetType + "~" + assetDescription
    : assetType;
    if (distinct.add(type_description)) {
    Object[] cols2 =
    (Object[]) q2.execute(assetType,
    assetDescription);
    // System.out.println(
    // "type "
    // + assetType
    // + ", description "
    // + assetDescription
    // + ", count "
    // + cols2[0]
    // + ", sum "
    // + cols2[1]);
    q2.closeAll();
    q1.closeAll();

  • Best way to write objects in an xml and send the file?

    hello all
    i am making some objects, which i conver to xml using the XStream and then i am saving them to a file, call a function to send the file to a servant (basically i do this by sending bytes and this may be the problem). In the servant i take the data i write them to a file and then i read them again to make them objects...
    i have the following code in the client
            XStream xstream = new XStream(new DomDriver());     
            xstream.alias("Jobb", WorkflowFramework.Jobb.class);
         String xml = xstream.toXML(translation);
               FileWriter fw = new FileWriter("translation.xml");
               ObjectOutputStream out = xstream.createObjectOutputStream(fw);
               out.writeObject(new Jobb("ougk2", "Walnes",null));
               out.close();
               File file=new File("translation.xml");
               byte buffer[]=new byte[(int)file.length()];
               try {
                    BufferedInputStream input=new BufferedInputStream(new FileInputStream("translation.xml"));
                    input.read(buffer,0,buffer.length);
                    input.close();
               } catch(Exception e) {
                      System.out.println("Error: "+e.getMessage());
                       e.printStackTrace();
               theRemoteObjRef.translationService(theCallbackObjectRef, buffer);i write the file and then i read it so as to have a buffer of bytes (there should be a better ways..)
    the last line sends an objectRef (we dont care about that) and the file in bytes to a server (to be specific to a servant of a server)..
    in the servant i do the following
    public void translationService(TheCallbackInterface objRef, byte data[]){
              try{
                        File file = new File("translation2.xml");
                    BufferedOutputStream output = new BufferedOutputStream(new FileOutputStream("translation2.xml"));
                  output.write(data, 0, data.length);
                  output.flush();
                  output.close();
              } catch(Exception e) {
                        System.out.println("Error: " + e.getMessage());
                        e.printStackTrace();
               XStream xstream = new XStream(new DomDriver());
               try { // If an error occurs, go to the "catch" block
                    FileReader fr2 = new FileReader("translation2.xml");
                    ObjectInputStream in = xstream.createObjectInputStream(fr2);
                    Jobb newJob = (Jobb)in.readObject();
                   System.out.println(newJob.getObjServerRef());
                   System.out.println(newJob.getForTranslation());
                   System.out.println(newJob.getTranslated());
                    }catch (Exception e) {  
                         System.err.println("File input error"+e);
                    Jobb testJob=new Jobb("ougka","mpougka","falalala");
                    System.out.println(testJob.getObjServerRef());
                       System.out.println(testJob.getForTranslation());
                    System.out.println(testJob.getTranslated());
    the problem is that in the first group of System.out.println i get the error File input errorcom.thoughtworks.xstream.mapper.CannotResolveClassException: Jobb : Jobb
    but the second group of printlns, prints the correct results...
    do you know what is the problem? Why can i read the content of the file and get the objects from there?
    do you have any suggestions of writing and reading the file in an another way or to send it by NOT using a bytes array?
    do you have an alternative way of making the xml file?
    many thanks!

    Hi,
    I would suggest to reconsider building of your document so that it doesn't contain duplicates if you don't need them. And it doesn't have much to do with DB XML then.
    Also you could insert your document with duplicates and use XQuery Update facilities to delete undesirable nodes.
    Vyacheslav

  • Is there a better way to edit and create a Page Size list for InDeisgn CC 2014?

    I have about 65 iMac machines I'm responsible for at a publishing company.  The users need a specific custom Page Size list to display when setting up a new document.  It's a very long list of sizes for various products.  The only way I know how to edit this size list is to open the .xml file in Dreamweaver and edit the code.  I would like to know if there is a better way to do this for InDesign CC 2014.  At the moment I have to take this one file and install individually on all users accounts on all 65 machines.  Here is the path of the file I edit by hand:  Mac HD/Users/(User Account)/Library/Preferences/Adobe InDesign/Version 10.0/en_US/Pages Sizes/New Page Sizes.xml

    There is no special folder for templates. You just put them where it makes sense to you, and you access the same way you would open any existing file.
    The only functional difference between a template (.indt) and document (.indd) file is the default opening behavior. By default templates open as untitled copies and documents open as originals. You can change from one to the other just by changing the file extension.
    The advantage of using a template over a document size preset is the preset only defines a page size. The template can include multiple pages, multiple master pages, styles you want to use, objects already in place, etc. And the use of a template removes the temptation to "recycle" an old issue of a recurring project. Starting each issue fresh from a known clean template reduces the risk of accumulated minor corruption that can eventually cause a fatal problem.

  • Is there a better way to position a flash movie than ap div?

    I'm creating a new website(not yet active) and have a great flash movie for the home page.  I've place it in an ap div and of course it moves to a different position in different browsers. Is there any way I can get it to display correctly, or is there a better way to position the movie? Thanks.

    Of course. The following code is for the home page: 
    "http://www.w3.org/TR/html4/loose.dtd">
    #page-background
    #container
    /* this image stays in internal style sheet*/
    #mainImage{
        background-image: url(images/mainImageBkgrnd.jpg);
        background-position: center top;
        background-repeat: repeat-y;
        width: 875px;
        height: 625px;
        margin: 0 auto;
        padding-left: 0px;
        padding-right: 0px;
        margin-top: 0px;
        position: relative;
    #footer{
        position: absolute;
        top: 700px;
        left: 10px;
    #serviceImage{
        position: absolute;
        top:300px;
        left: 35px;
        z-index: 0;
    #orderImage{
        position: absolute;
        top: 300px;
        right: 20px;
    #flashMovie {
        background-image: url(images/flashPix.png);
        background-position: center top;
        background-repeat: no-repeat;
        width: 700px;
        height: 300px;
        margin: 0 auto;
    .flashText p{
        width: 250px;
        padding-top: 75px;
        font-family: "Arial Narrow";
        font-size: 180%;
        line-height: 1.5em;
        color: #666;
    #vertStripe {
        position: absolute;
        top: 325px;
        left:435px;
    #serviceHeader {
        position: absolute;
        z-index : 50;
    #apDiv1 {
        position:absolute;
        left:607px;
        top:169px;
        width:700px;
        height:298px;
        z-index:2;
    html {overflow-y:hidden;}
    body {overflow-y:auto;}
    #page-background
    #content
    </style>
    <![endif]-->
    <!IE7 and lower stylesheet>
    <!>If this page is not displaying correctly, please update your browser by downloading Internet Explorer 8.<link rel="stylesheet" type="text/css" href="ie7-and-down <link rel="stylesheet" type="text/css" href="ie7-and-down.css" />  <![endif]>
    body
    font-size: 70%;
    text-align: center;
    <!begin flash Movie> 
        <!>>
          <!<![endif]>
            Content on this page requires a newer version of Adobe Flash Player.
    !http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif|height=33|alt=Ge t Adobe Flash player|width=112|src=http://www.adobe.com/images/shared/download_buttons/get_flash_player .gif!</p>
          </div>
          <!>>
        </object>
        <!<![endif]>
      </object>
    </div>
    <!end flash Movie>
    !images/waves2.png|height=100%|alt=Waves|width=100%|src=images/waves2.png!
    !images/banner_nws.gif|height=120|alt=Northwind Safety Corp.|width=875|src=images/banner_nws.gif!
    <!main Navigation menu>
    [About Us | about_us.html]
    [Services | serv_fa.html]
    [Training | train_cpr.html]
    [Products | products.html]
    First Aid
    [AEDs | aed_philips.html]
    <!end main Navigation menu>
    !images/serviceComp.png|height=250|alt=Van Serviceman|width=400|src=images/serviceComp.png!<!end serviceHeader>
    </div><!end serviceImage>
    !images/vertStripe.png|height=150|width=5|src=images/vertStripe.png!
    <!end vertical stripe>
    !images/orderComp.png|height=250|alt=Order Taker|width=380|src=images/orderComp.png!
    <!end orderImage>
    </div><!end mainImage>
    h1. Contact Us
    h1. Careers
    h3. Northwind Safety Corporation
    8425 Rausch Drive
                       Plain City, Ohio 43064
                    phone: 614-873-1000
                    fax: 614-873-1002
    [ [email protected] | mailto:[email protected]]
    <!end footer div>
    </div><!end container div>
    </div><!end body div>
    swfobject.registerObject("FlashID");
    <!end body>
    </html> 
      Thanks  

  • Is there any better way for updating table other than this?

    Hi all, I need to update a row in the table that require me to search for it first (the table will have more than hundred thousands of row). Now, I am using a LOV that will return the primary key of the row and put that primary key to DEFAULT_WHERE property in the block and execute query command to fetch the row that need updating. This works fine except that it require 2-query-trip per update (the lov and the execute_query). Is there any better way to doing this? This update is the main objective for my application and I need to use the most effective way to do it since we need to update many records per hour.

    Thanks Rama, I will try your method. Others, how to query row instead of primary key? I thought that querying primary key is faster due to the index?
    BTW, what people do if you need to update a table using Form? I have been using the LOV then execute query since I first developing form. But I am building a bigger database recently that I start worrying about multiple query trip to dbms.
    FYI my table will have up to million rows on it. Each row will be very active (updated) within 1-2 weeks after it creation. After that it will exist for records purposes only (select only). The active rows are probably less than 1% of all the rows.

  • Better way to change telephone, fax and emails in mass?

    Hi,
    What's the better way to change telephone, fax number and emails in mass in ISU and CRM?
    ADDR_COMM_MAINTAIN and ADDR_PERSONAL_COMM_MAINTAIN functions seems to work fine for ADR2, ADR3 and ADR6.  But it does'nt update telephone in KNA1 and LFA1 tables.

    HI EMANUEL
    We to are Implemen SAP IS u
    could u please help us to configure fact sheets
    in SAP CRM interaction centre....
    Which actually contains object like premise,
    installation,meter etc..
    could you please help out in how to replicate fact sheet
    from SAP IS to SAP CRM ...
    or you suggest any alternative

Maybe you are looking for

  • Check for null value for Date Field

    Hello everyone, I have a database that consist of date field and also a bean that will able to access the db. here are my example:- private int setDate(int date) { this.date = date; private void getDate { return date; later, I entered a date value an

  • How do i back up my itunes library to i cloud

    ive got itunes for windows how do i back all my music up onto icloud, music bought from itunes and cds that ive put  on. any help appreciated

  • Transferring iTunes library from MacBook Pro to MacBook Air

    I used this site to transfer my iTunes library from my MBP to my MBA: http://support.apple.com/kb/HT4527, using an external hard drive to make the transfer. The songs are now all listed in my iTunes music file on the MBA, but they don't show up when

  • Mac taking a lot more time

    My Mac is taking a lot more time to load photos from iPhone and iPad than was taking before.What can be the reason of it ? Thanks

  • Using Kuler + swatch exchange files in Dreamweaver CS3

    What is the "best practice" for taking a swatch exchange file from Kuler and getting either the swatches into Dreamweaver CS3 or the html color values. I like using Kuler to develop test color schemes for my web sites and switching css sheets to dete