Using Dirty Flags in CMP ?

Hi
How to use Dirty Flags in CMP so that stopping ejbStore() to improve performance.If i run a query in SQl it is taking 2milliseconds and where as in CMP it is taking 180milli seconds so i want to reduce the ejbStore() operation when data is not updated.Give some advices to tune the CMP bean.
Looking forward for u r suggestions
Regards
Mohan

Maybe this page helps
http://www.weblogic.com/docs/examples/ejb/extensions/isModified/

Similar Messages

  • Can I use UserTransaction within a CMP Session bean?

    Basically the problem is as follow:
    I have the following method in a Statefull session bean:
    public Whatever do()
    processSomething();
    notify();
    the notify() basically notifying the client that then query for the something that was processed in the processSomething() method.
    THE PROBLEM is that the changes have not been committed yet as the do() method is not finished yet and the container has not committed the changes.
    THE QUESTION is - can I use UserTransaction inside
    processSomething to commit the changes and leave the bean as CMP? I want to leave it as CMP as there are more methods on the bean and I don't want to have to manage the transactions for them.
    Anyone has any other ideas?
    Thanks in advanced.

    Hi again,
    The EJB specs say that a stateful Session Bean with CMT is NOT allowed to use the UserTransaction; see page 361 of the EJB2.0 specification. So combining them will not (or should not) work.
    I suggest CMT+SessionSynchronization combined with using a flag to indicate whether notify should be called or not. Otherwise, you could try splitting up the bean into two beans: one with CMT and another one without. The one without CMT could use the UserTransaction and notify.
    Also, you might want to check http://www.onjava.com/pub/a/onjava/2001/10/02/ejb.html
    Hope that helps a bit,
    Guy
    http://www.atomikos.com

  • Implementing Dirty Flag for a generated Model (Flex 4)

    Hi there,
    I try to implement a dirty flag for a model generated by a Data Binding Wizard. I tried several ways but always failed to get it work properly bounded to the 'enabled' property of a button. Is there a "best approach" to implement this in a by Flex 4 generated model?
    I have all the Form elements bound to the model's properties and defined fx:Bindings on the model's property as well to get the changes back to the model as well.
    -> I tried to listen to the properyChange event on the Super model but I always returned true for the Dirty flag and couldn't set it to false when I loaded the model into a Form.
    -> I tried to implement a similar approach like below, instead of doing a normal 'getter' function on the isDirty flag I bounded it to the propertyChange event, it failed exactly the same way as above
    I did used my own solution earlier like this:
    [RemoteClass(alias="VODictionaryEntry")]
         [Bindable]
         public class VODictionaryEntry
                   private var _id:Number = 0;
                   private var _terminology:String;
                   private var _description:String;
                   private var _notes:String;
                   private var _insert_date:String;
                   private var _update_date:String;
                   private var _vendor_related:Boolean;
                   public var isDirty:Boolean = false;
                   public function get vendor_related():Boolean
                        return _vendor_related;
                   public function set vendor_related(value:Boolean):void
                        _vendor_related = value;
                        isDirty = true;
                   public function get update_date():String
                        return _update_date;
                   public function set update_date(value:String):void
                        _update_date = value;
                        isDirty = true;
                   public function get insert_date():String
                        return _insert_date;
                   public function set insert_date(value:String):void
                        _insert_date = value;
                        isDirty = true;
                   public function get notes():String
                        return _notes;
                   public function set notes(value:String):void
                        _notes = value;
                        isDirty = true;
                   public function get description():String
                        return _description;
                   public function set description(value:String):void
                        _description = value;
                        isDirty = true;
                   public function get terminology():String
                        return _terminology;
                   public function set terminology(value:String):void
                        _terminology = value;
                        isDirty = true;
                   public function get id():Number
                        return _id;
                   public function set id(value:Number):void
                        _id = value;
                        isDirty = true;
    this is a very simple solution but it worked like a charm. Can somebody suggest me something else, a better solution?
    thank you
    r. Sandor
    P.S.: I didn't include the validators to simplify the example.

    hi,
    meanwhile I come a little bit further if you implement the isDirty flag into your remote model and let generate ( to be included in the flex model as well) a model with Flex you can listen to the propertyChange event and do implement a correctly functioning bindable property.
    public function VOMessageEntry():void
         addEventListener( PropertyChangeEvent.PROPERTY_CHANGE, handlePropertyChange );
    private function handlePropertyChange( event:PropertyChangeEvent ):void
         if ( event.property != "isDirty" )
              isDirty = true;
    this code must be inserted into the generated Object itself not in the _Super_objectname source code.
    I hope I could helped somebody with this solution.
    r. Sandor

  • Dirty flag set for readonly file page

    We are using BDB 4.8.26 transactional data store on Windows 2008 R2.
    DB is logging the message "dirty flag set for readonly file page" to the error log ... this entry was logged 17 times in a 24 hr period. The system processes about 3-5 requests a second.
    We also are having an incorrect "SECONDARY inconsistent with primary" error reported - this used to be very rare but has increased with increased concurrency. But the dirty flag error is recent - after we dropped a secondary and added a new one - there was no error during the secondary drop and rebuild process.
    Appreciate any help on this.
    Thanks
    Kimman Balakrishnan

    Hi Kimman,
    I assume you are not opening your databases with the DB_RDONLY flag. This could be cause by not running recovery after a system or application failure. Make sure you run recovery correctly, single threaded, after each system or application failure; review the Architecting Transactional Data Store applications documentation section.
    Regards,
    Andrei

  • Dirty flag in standard FPM

    I notice that I can change the text of some field in PPM then click Close (without hitting <ENTER>).
    I get the data changed dialog box.
    How does the dirty flag get set without an event triggering to set it?

    Hello Robert,
    if you have a look at http://help.sap.com/saphelp_nw04s/helpdata/en/45/b76f4169e25858e10000000a1550b0/content.htm you can see, that there are 3 work-protect modes:
    ·        NONE
    This value means that the work protect mode is not used by the Web Dynpro application. If you navigate to another application in the portal, unsaved data is lost, even if you set the dirty flag.
    ·        APPLICATION_ONLY
    This value means that the Web Dynpro application itself decides if there is still unsaved data u2013 that is, whether the application is dirty. This is why the u201Cdirtyu201D status is only monitored by the server. With this value you cannot ensure that data that has not yet been transferred to the server will not be lost.
    ·        BOTH
    This value means the client also checks the u201Cdirtyu201D status. This ensures that no user input that has not yet been transferred to the server will be lost. This is done by setting the dirty status of the application in SAP Enterprise Portal as soon as the user has entered data.
    FPM is using the BOTH mode, which results in behaviour you observed.
    Best regards,
      Christian

  • Question: How to use XMLType in a CMP EJB???

    Hello, Together,
    I have a big problem using XMLType in a CMP EJB. I don't know, if somebody knows about it:
    I am trying to write a CMP EJB, which should be deployed under JBoss later. The problem here is, which java data type should I use to map a column of XMLType. I have tried to use it as a java.lang.Object, and also as a java.lang.String, it did not work properly.
    Can someone help me? Thanks a lot!

    Just pass the in the JSP/Servlet involved ServletContext through as a method or constructor parameter of that Java class.
    Semi-pseudo:protected doPost(req, res) {
        ServletContext servletContext = getServletContext();
        SomeJavaClass someJavaClass = new SomeJavaClass(servletContext);
        // or
        someJavaClass.doSomething(servletContext);
    }

  • Can I use oracle blob by CMP bean in weblogic 6?

    I use weblogic 6.1(sp3) and Jbuilder 7.when I try to use oracle blob by CMP bean,the
    errors are:
    javax.ejb.FinderException: Exception raised in findByPrimaryKey
    java.io.StreamCorruptedException: InputStream does not contain a serialized object
    What should I do?Is there examples about using oracle blob?
    thanks a lot!

    Great! So what was the problem?
    Regards,
    Slava Imeshev
    "Roger Lee" <[email protected]> wrote in message
    news:[email protected]...
    >
    Finally got it working with CMP, which is my preferred choice (over BMP).
    I read the Excel Spreadsheet into a "byte []" array, and the Entity Beanmapped
    "byte []" to the Blob column in the Oracle table.
    "Slava Imeshev" <[email protected]> wrote:
    Roger,
    I'm not quite sure I undestand the problem. Could you:
    1. Post deployment descriptors in part related to this
    CMP bean?
    2. Post the piece of code that is failing?
    Please post the information above and we will help
    you to hunt the problem down.
    No, I don't have any problems accessing blobs
    from CMP.
    Regards,
    Slava Imeshev
    "Roger Lee" <[email protected]> wrote in message
    news:[email protected]...
    Yes. I have added;
    <dbms_column-type>OracleBlob</dbms-column-type>
    It fails because the locater to the blob, obtained by findBYPrimaryKeyis
    null.
    i.e. an empty_blob() is not created.
    Have you got CMP to access Blobs in WLS 6.1?
    "Slava Imeshev" <[email protected]> wrote:
    Hi Roger,
    Have you tried using OracleBlob as dbms-column-type?
    Also, could you post that part of your code that is failing?
    Regards,
    Slava Imeshev
    "Roger Lee" <[email protected]> wrote in message
    news:[email protected]...
    I can access Clobs using CMP. If you are using the Oracle OCI Driveryou
    do not
    need to add this line.
    However if you are using the Oracle Type 4 Thin drivers you need
    to
    add;
    <dbms_column-type>OracleClob</dbms-column-type>
    to the file;
    weblogic-cmp-rdbms-jar-xml
    This DOES NOT work with Blobs.
    I am unable to get WebLogic 6.1 sp4 persist a Blob to an Oracle
    8.1.x
    table and
    retrieve it using either CMP or BMP.
    Unless any one show me a complete working CMP and BMP example?
    Roger Lee
    Deepak Vohra <[email protected]> wrote:
    BLOB and CLOB DBMS Column Support for the Oracle DBMS
    http://edocs.bea.com/wls/docs61/ejb/cmp.html#1061636
    shybird wrote:
    I use weblogic 6.1(sp3) and Jbuilder 7.when I try to use oracle
    blob
    by CMP bean,the
    errors are:
    javax.ejb.FinderException: Exception raised in findByPrimaryKey
    java.io.StreamCorruptedException: InputStream does not contain
    a
    serialized
    object
    What should I do?Is there examples about using oracle blob?
    thanks a lot!

  • What is the best practise for setting dirty flag of a page/view?

    For a page/view, normaylly there are 2 things to do for diry data:
    1. when it's clean, Save button is disabled, when it's dirty, save button is enabled.
    2. when it's dirty and the window is closed, a popup says "you have unsaved data, close will lose the data".
    My thought is: it must be handled at client side, because not all valuechange is auto submitted. E.g., you type the 1st letter of a string in a input box, the server side does not know it, but save button should be enabled immediately.
    Is it possible to capture all valueChange events in a page or a view at client side?
    I'm not sure what is the best practise for setting dirty flag? If there is better solution? Does ADF provide facility for this?

    public void save(ActionEvent event){
    boolean formValid = isFormValid();
       if (formValid) {
      save button is enabled.
        private boolean isFormValid() {
            boolean valid = true;
            if (Check Condition 1) {
                valid = false;
               showErrorMessage1();
            if (Check Condition 2) {
                valid = false;
               showErrorMessage1();
            return valid;
        private void showErrorMessage1() {
                    when it's dirty and the window is closed, a popup says "you have unsaved data, close will lose the data".

  • What is the use of flag in CallTransaction?

    what is the use of flag in CallTransaction?

    Sunil,
    Generally a flag is used to know whether a particular thing is validated or not.I mean
    if a = b
    c_flag = x.
    Then depending on whether the flag is set or not you can write what action needs to be taken.
    K.Kiran.

  • Using -xipo flag gives error "glibc detected"

    Hi,
    I just downloaded the Sun compiler for linux (preview). I compiled MPICH2 with the sun compilers. The readme on the website says to use -xipo flag while compiling as well as linking. But when i do this I get a error message. See below
    # mpif90 example.f -o example -xipo -fast
    *** glibc detected *** free(): invalid pointer: 0x0805160b ***
    sunf90: Fatal error in ipo: Aborted
    The file compiles fine without the -xipo flag.
    Does anybody have an idea regarding this issue?
    Thanks,
    Winston

    Hi Alexey,
    The actual code i want to compile is proprietary so will not be able to post it. Anyway the compiler gives the same error on a simple mpi file as below so i dont think it has anything to do with the code i am trying to compile. And as i mentioned earlier the code does compile and run without the -xipo flag.
    ------example.f ------
    program mpi_test
    include 'mpif.h'
    integer ierr
    integer rc
    integer myID
    integer nproc
    integer nslaves
    call mpi_init( ierr )
    call mpi_comm_rank( MPI_COMM_WORLD, myID, ierr )
    call mpi_comm_size( MPI_COMM_WORLD, nProc, ierr )
    nSlaves = nProc-1
    write(*,*) 'I am proc #',myID
    call mpi_finalize(rc)
    end
    Thanks
    Winston

  • JClient: set dirty flag after prepared stmnt to activate trans. buttons?

    Hi,
    I wrote a service method with a call to a prepared statement that makes a bulk insert (insert into a select ... from b).
    This service method returns the number of inserted rows.
    In my button action after a call my service method I refresh the ViewObject.
    The new rows are displayed, I know that they are not committed but the transaction buttons are not activated.
    How can I set the transaction dirty flag to true so that the transaction buttons are active?
    My button action method:
    private void jButton1_actionPerformed(ActionEvent e)
    SiteTablesAM siteTablesAM = (SiteTablesAM)panelBinding.getDataControl().getApplicationModule();
    int numOfAddedRows = ((TranslationsAM)siteTablesAM.findApplicationModule("TranslationsAM1")).createMissingCurrencyLangRows();
    if (numOfAddedRows > 0)
    // navBar.doExecuteButtonAction(); tested this but has same result
    siteTablesAM.findViewObject("TranslationsAM1.CurrencyLangVO1").executeQuery();
    panelBinding.refreshControl();
    JOptionPane.showMessageDialog(this,numOfAddedRows+" rows have been added.\nTranslate the labels or delete the added rows.","Info",JOptionPane.INFORMATION_MESSAGE);
    It would be more elegant to do the wole job on the server side => after call to prepared statement, refresh the ViewObject + "fire a transaction change event".
    Could you help me on this one.
    Thanks
    Frederic

    I've found a workaround:
    this.setAttribute(this.getAttribute());
    this makes the transaction dirty.
    I would have preferred a more elegant solution.
    I've noticed that when calling preparedStatement.executeUpdate() on a DBTransaction the isDirty flag stays false.
    Is this normal, executeUpdate is always a DML statement?
    Thanks
    Frederic

  • How do I create a slide show within iPhoto using the flagged photos?

    How do I create a slide show within iPhoto using the flagged photos?

    Select them, create an album (You do9 not absolutely have to create teh albume but it will make life easier), select them and create a slide show form them
    LN

  • When using Clear flag the item isn't removed from the To-Do bar

    Hi,
    When I flag a mail and then use clear flag the item keeps displayed in the To-Do bar or Task list.
    Normaly the item is removed from the view.
    The screenshot is Dutch, but you can see whats wrong.
    Whenever you see a helpful reply, just click on “Propose As Answer” / “Marked As Answer” and do "VOTE". Look for microsoft related blogpost on www.vdnieuwenhof.eu

    Hi,
    I'm marking the reply as answer as there has been no update for a couple of days.
    If you come back to find it doesn't work for you, please reply to us and unmark the answer.
    Best Regards,
    Steve Fan
    TechNet Community Support
    It's recommended to download and install
    Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office
    programs.

  • How to set document "dirty" flag

    Hi I wonder if there is a  simple way to set document "dirty" flag.
    The thing is that I am modifing layer XMP info in action script but this change is not reflected by setting the document to modified state
    Lukas

    I wonder how fast it would be to set the currect layer colour?
    IE:-
    layerColour('red')
    function layerColour(colour) {
        switch (colour.toLocaleLowerCase()){
            case 'red': colour = 'Rd  '; break;
            case 'orange' : colour = 'Orng'; break;
            case 'yellow' : colour = 'Ylw '; break;
            case 'yellow' : colour = 'Ylw '; break;
            case 'green' : colour = 'Grn '; break;
            case 'blue' : colour = 'Bl  '; break;
            case 'violet' : colour = 'Vlt '; break;
            case 'gray' : colour = 'Gry '; break;
            case 'none' : colour = 'None'; break;
            default : colour = 'None'; break;
        var desc = new ActionDescriptor();
            var ref = new ActionReference();
            ref.putEnumerated( charIDToTypeID('Lyr '), charIDToTypeID('Ordn'), charIDToTypeID('Trgt') );
        desc.putReference( charIDToTypeID('null'), ref );
            var desc2 = new ActionDescriptor();
            desc2.putEnumerated( charIDToTypeID('Clr '), charIDToTypeID('Clr '), charIDToTypeID(colour) );
        desc.putObject( charIDToTypeID('T   '), charIDToTypeID('Lyr '), desc2 );
        executeAction( charIDToTypeID('setd'), desc, DialogModes.NO );

  • Using Stored Proc with CMP - Possible?

    Is it possible for me to use a stored proc for my CMP bean instead of the usual inline SQL?

    sorry, I mean for the ID field.

Maybe you are looking for

  • Bluetooth Device GattCharacteristic.ValueChanged error

    I am attempting to write a library that handles some BLE communication with a device.  I am writing it in Visual Studio Express 2013 for Windows Desktop (not Windows Store App)  I have imported the Windows 8.1 WinMd's necessary for the BLE communicat

  • Need help restoring items to my dock.

    Yesterday, when I was deleting excess files off of my computer, I accidentally dragged two icons off of my dock and into my trash bin and now I can't get them out.  I am, however, still able to access them in the sidebars through "Finder", but when I

  • Can I switch phone numbers between two iPhones?

    I have ordered a 3GS, replacing my wife's 2G model. She will now get my 3G model. Do we have to change phone numbers or is there a way to move my 3G number with the 3GS and vice versa. It would be much better if that was possible.

  • Sorry, but is here someone who can help in german language - Voreinstellungsdatei Illustrator beschädigt

    Hallo. Mein Problem ist, dass beim Start von cs6 illustrator immer wieder die Voreinstellungen verloren gehen mit dem Hinweis, die Voreinstellungsdatei ist beschädigt. Außerdem werden die Daten, die ich eingebe (Schriftgröße, Größe des Objekt, etc.)

  • ADF Toplink Deployment bindings issue

    Hi, I have an ADF / TopLink Application that works just fine when testing inside JDeveloper. The issue is when I create an EAR file and deploy it on Application Server 10.1.3 I am getting the following error: Mar 9, 2008 12:43:43 PM com.sun.faces.app