Execution of entity validation multiple times (adf bc 10g)

Implementing entity method validators sometimes causes the validation (e.g. validateEntity method) to execute multiple times. We have figured out that this case occurs when we call method setAttribute programmatically when we implement business rules on the entity level. For example in many cases that we want to enforce dml operation execution, we override the method prepareForDML so that the framework works as follows:
•     calls validateEntity, validates entity for the first time
•     calls prepareForDML –> setAttribute this method invalidates the entity row
•     calls validateEntity, validates entity for a second time
I can understand that sometimes multiple entity validation is necessary and important, there are cases though that this behaviour is not necessary and additionally it degrades performance especially when we utilize sql queries inside the validation (as it executes the queries multiple times).
Is there any workaround to avoid multiple execution of entity validation or enforce the validation to occur only once, for example after the prepareForDML method and not before?
Edited by: user647567 on 9 Σεπ 2010 6:58 πμ

Hi there:
I don't think JDeveloper provides a switch to bypass the Entity Validation. Too much meddling. MVC model has those layers and advocates reducing unnecessary dependencies between layers. Entities and Views are both in Model layer though. But you can build a view without an Entity and vise versa you can have an Entity that doesn't have default views. So my understanding is the Entity Validation is quite necessary.
Though from View layer, on a jspx page, you can use command buttons and set their "immediate" property to "true" to bypass form validation temporarily and postpone it to form submission time.
My understanding for Entity validator is they should be light weighted. You properly should avoid SQL queries directly in them. Instead you should use EntityImpl or ViewObjImpl/ViewRowImpl instead of SQL queries directly in validator.
If you feel my answer helpful to you, please mark it so.
Thanks,
Alex
Edited by: Alexbie on Sep 9, 2010 11:11 AM

Similar Messages

  • EO entity level validations being executed multiple times

    Hi,
    I'm using JDev 10.1.3.4, BC, JSF
    I have defined multiple entity level method validators in my entity object. On commit I get the desired results except for the fact that each of my method validators runs multiple times when they should only run once. So I end up with twice the method validator messages that I should. And if I put any additional messaging in in the validators themselves I end up with 10 times the desired messages.
    What are some of the reasons that would cause this looping through the validators. I assume I have done something to cause this but can not figure out what it is. Any ideas on what I should look for?
    Note : Also using JHeadstart but I don't think it should be a factor at the entity level.
    Thanks,
    Jim
    Edited by: 170412 on May 5, 2009 4:11 PM

    Hi,
    1) Set the Foreign key using setAttribute Methods ? When u create a VO based on Multiple EO's, there should be some relationship between those 8 EO's like Primary key & Foregin key. And when u perform Commit on this all the value from ur beans will get saved to the database. But the Foreign u need to set independently using setAttribute method becoz it wont get saved by its own.
    2) If i'm doing the validations at EO level, those setters and getters will be called before the Create(), Update() and Delete()
    methods in the EOImpl class. Is that true?Yes, you are right it will get called for create and update operation but not for Delete.
    Regards,
    Gyan

  • UIX  validation entity attribute on page multiple times via different views

    We have a situation where an ADF entity attribute appears in multiple views which appear on the same page. Each view selects a different entity row.
    When validation fails on one of these attributes, we register an AttrSetValException, as we want to take advantage of attribute level error messages.
    The problem is that the validation error message appears for all messageTextFields (for the same entity attribute) when only one of the fields failed validation. Also, the invalid value replaces all input fields even if the other ones were not changed by the user.
    I have tried using ex.setNeedsEntityToVOMapping(true) on the exception to no avail. It is as if the entity validation is unable to discriminate between view usages of an entity attribute.
    Steve Muench, I have read much of what you have written, but have not seen this particular scenerio. Any advice would be welcome.

    The issue is fixed. The reason of the problem that I missed overwriting of the validateParameters() in the custom controller class and the custom parameter was missed from the parameter list and it effected parameter validation error.

  • Entity validation across multiple pages

    Hi,
    I have an entity that spans multiple pages and are wondering how I can get the entity validation to work one page at a time. Currently if I have mandatory attributes that are not shown until the second page I receive errors from the first page stating that these muist be entered.
    My current thoughts on fixing this is either to change my model to on epage per entity, or to turn of entity validation (including mandatory attributes) and just do my validations in my struts actions.
    This is a Jsp/ Struts / ADF BC project.
    Many Thanks,
    Richard

    Leo,
    I'm not sure I would have done this with columns. Because of your desire to link from one piece of text to another, in all three columns, I would use linking text boxes. Each of the three boxes on a page will be independent of each other, but can be linked to the boxes on the following pages. Does that seem like what you're looking for?
    -Dennis

  • Validation Event getting called multiple times

    I am saving an eform after entering a wrong percentage in it.On opening the same eform it gives the validate message "Percentage not valid" pop up .This popup should come only once but its coming around 25-26 times.I checked and find that the validate event is getting called multiple times for the same field.Can someone tell why this is happening and how to resolve this

    Hi rupali Sri,
    Our forum here is for questions related to the LiveCycle Collaboration Service product.
    You might want to post your question to the Livecycle Forms forum:
    http://forums.adobe.com/community/livecycle/livecycle_es/forms_es
    If that's not the correct forum, start from here:
    http://forums.adobe.com/index.jspa?view=overview
    Hope this helps.
    Good luck,
    Julien
    LCCS Quality Engineering

  • HELP: ADF-Error in Entity Validation - Validation fires twice

    Hi there,
    I have problems with the entity validation in JClient when I have more then one UI-Element that references to the same Data Control / Model Attribute within one panel.
    E.g. I have a table where I display all customers. Above the table I show detail information with editable JTextFields for the customer I've selected in the table. When I change the name of a customer and leave the textfield, the new Value appears also in the table. Thats all ok.
    The problem:
    The entity validation fires twice in that example. E.g. when I insert 30 characters in the name field, but the corresponding database column only stores 20 characters, the
    displayed exception appears twice. When I remove the textfields from the panel
    and edit the values direct in the table, the validation only fires one time.
    How can I avoid that behaviour? I have a lot of screens where it is important to show the list of objects in a table and let edit specific data via text fields.
    That behaviour is also reproducable with the ADFJClientComponentDemo
    (Jtree binding demo). If you insert more characters than allowed in the firstname field,
    the Exception Message is shown twice.
    Thanks for your help,
    Claus

    Hi Fred,
    It's nice to know that somebody out there uses the same technology in a similar way.
    Our L & F is also JGoodies based (we didn't use JGoodies forms).Yes, nice to know. We also only use L&F and not the JGoodies Layout Manager
    (but if JDev 10.1.3 provides that layout manager maybe we use it for new panels).
    In our JClient View project, we used very few try/catch blocks, mostly in our custom
    Navigation bar class (with freeze row function).
    How would you translate the following in 3tiers?
    in the client class:
    try {
    // call a method in the model
    catch (JboException je)
    this.getPanelBinding().reportException(je);
    }We don't use any try/catch-blocks to check for model-exceptions.
    In our application a typical bootstrap code snipplet looks like that:
    =======================================
    //As classmember we have our own ErrorHandler:
    protected HTOErrorHandler errorHandler = new HTOErrorHandler(true);
    //some bootstrap code
    BindingContext ctx = new BindingContext();
    ctx.put(DataControlFactory.APP_PARAM_ENV_INFO, new JUEnvInfoProvider());
    ctx.setLocaleContext(new DefLocaleContext(null));
    //Set Custom Error Handler
    ctx.setErrorHandler(errorHandler);
    =======================================
    Our Custom Error Handler Looks like this:
    =======================================
    public class HTOErrorHandler extends DCErrorHandlerImpl
    boolean inReportException = false;
    public HotErrorHandler(boolean setToThrow){
    super(setToThrow);
    public void reportException(DCBindingContainer bc, Exception ex){
    disableAppendCodes(ex);
    showPopup(ex);
    super.reportException(bc, ex);
    private void disableAppendCodes(Exception ex){
    JboException jboEx = (JboException) ex;
    String baseMsg = jboEx.getBaseMessage();
    String detailMsg = jboEx.getDetailMessage();
    String errorCode = jboEx.getErrorCode();
    Locale defaultLoc = Locale.getDefault();
    Object[] detailExceptions = jboEx.getDetails();
    if ((detailExceptions != null) && (detailExceptions.length > 0)){
    for (int z = 0, numEx = detailExceptions.length; z > numEx; z++){
    disableAppendCodes((Exception) detailExceptions[z]);
    public void showPopup(Exception ex){
    DialogMessage dialog = new DialogMessage((JboException)ex);
    dialog.setVisible(true);
    =======================================
    The DialogMessage is our own ModalDialog to show the ErrorMessages with
    a userfriendly dialog (e.g. we show some error/warning/info-icon...)
    Each time we throw a exception in a EntityObject the framework ensures that
    the Message is shown in our own ModalDialog without using try/catch-blocks
    and the this.getPanelBinding().reportException(je)-method;
    We wrote our own ModalDialog because of L&F-reasons. But you said that
    you use the Standard-Dialog. IMHO you must neverlethess use the setErrorHandler-Method
    in 3-tier mode, but you needn't to write your own ErrorHandler, you can use the
    JUErrorHandlerDlg....
    The following line of code is generated by the ide when creating a default form:
    app.getApplicationModule().fetchAttributeProperties(new String[] {"Test2View1"}, new >String[][] {{"Id2", "Name2", "Id3", "AttrTest"}}, null);
    I read somewhere that when opening a panel, one should call that method for all used >properties in 3tiers mode only.Sorry, but we don't currently optimize something like that. For what reason
    do you want to call that method explicit? We don't have a custom method for that.
    I add tests in the validateEntity method and throw a JboException.
    I suppose for 3tiers I will have to replace throw new JboException by ???? No. You don't have to replace that. The framework notifies your client via the registered ErrorHandler.
    So when a mandatory field is empty, the framework displays an error when a commit
    or navigation event is triggered in the nav bar and the user has always access to that
    field.We want to override the default framework message with our own message. So we have
    to throw the exception manually at some point in the entity object. And for that reason
    we implemented a custom validation via MethodValidator, but the framework-validation fires
    an exception BEFORE our custom validation is processed. Maybe you don't have that problem
    because you use the default error messages. Do you use deferred Exceptions? We do so.
    Did you try JClient 3tiers deployments over the Internet?Yes, we tried it via VPN/DSL to validate that our framework interface-usage works both in 2-tier and 3-tier.
    After several attempts we were successfull, but the performance was poor.
    PS Are you connected to skype? Unfortunately no because of firewall restrictions. We only have access to ICQ.
    Regards,
    Claus

  • ADF Faces Tree - getChildren() called multiple times

    Hi,
    I have a simple tree based on the demo's 'tree.jspx'. Each time I click on a node in this tree, I see that TreeNodeImpl.getChildren() gets called multiple times for each node. This is not an issue in tree.jspx where the tree is static. However in a case where tree is constructed dynamically based on the back end state, it is going to hurt performance. Each getChildren() call then invokes backend methods which could be remote. So multiple getChildren() will invoke backend methods multiple times.
    Is this behavior of calling getChildren() multiple times per node a bug? Is there any way for me to avoid it?

    this is expected behaviour.
    Your tree model should cache data and prevent the multiple calls to the back end.

  • Entity validation strange behaviour

    I have a number of method validators against an entity.
    The validators fire for incorrect data entered on the associated screen and once the data is fixed the user is presented with a second screen. All is fine so far ...
    Until the user hits the back button to go back to the first screen. For some reason even though the user enters invalid data the method validators don't fire !!!. Very confusing.
    Does anyone know of any reasons why this should occur ?
    Many Thanks,
    Richard

    Hi,
    I added a page-link to my second page as suggested. Using this method(instead of back button) causes the validation in the first screen to re-fire.
    The previously entered values in the first screen are gone as its a new request.
    I use code from your toystore to pre-create a record in the initializeModelForPage step. This fires when the link is clicked, and part of that code deletes the last entry from the entity cache. Therefore I'm not too surprised this works. As part of this project it has been stated that the users should be able to navigate through the browsers buttons, so I'm still abit stuck. Any suggestions ?
    What i've done for now is to remove my validation from BC4J to my struts actions.
    But because new values aren't recorded in the entity after a back button I also have to manually set the bindings for each screen field in my struts action.
    I'm not an expert in the adf / struts frame work so I could just be missing something.
    On a related point(assuming that i use entity validation) the following happens.
    On my first screen I enter valid data , and then move to my second. I leave the screen in an invalid date before pressing the browsers back button. I then can't get past the first screen as it is still validating the errors in the second screen. Shay mention that I should be using a cancel button in the second screen to navigate back to the first. This is a public user application and I know that the back button will be pressed(its not good web design to remove/disable it anyway).
    Any suggestions.
    It seems that I can't get the ADF framework to work well with wizards and perhaps its best to just use struts for the validation and at the end of the wizard just call a database package to do the DML ?
    Sorry but one last point - to do with the refresh button.
    All my wizards use page forwards to move between screens and I know this can cause oddities with a refresh. What I have noticed is that when even refreshing the first page of my wizard(after leaving it in an invalid state) the screen doesn't change the errors are still there. I would have though the refresh would request a new refreshed page without the struts action errors. I even noticed that a refresh can cause a struts action related to a submit button to re-fire ? Why does this happen as it can cause a big mess.
    Even re-entering the url in the same browser window doesn't cause the screen to properly refresh. The initializeModelForPage steps also do not fire when a refresh happens. I did notice that if I went to a different website and then re-entered the url that the page displayed more as expected and I think the initializeModelForPage step ran.
    I'm sure alot of this is due to the fact that I don't really understand the framework, and thus would be grateful if you could explain why all the above happens. Is it what you would expect to happen ?
    Many Thanks for your time and assistance.
    Richard

  • How can I have use the same div ID multiple times on the same page?

    Okay so a problem I encounter a lot is that often times I want to use the same div ID several times on the same page. An example of this is when I'm creating table like designs.
    Let's say for instance I create a div ID called 'product-container'. I want to use 'product-container' multiple times on the same page but if I do this it is improper XHTML and will throw errors in any XHTML validator (you are only allowed to use a div ID once on any XHTML page in order for it to be standards compliant).
    Now the first option is that I could define 'product-container' in my CSS style sheet multiple times by doing something like this...
    #product-container {
         width: 300px;
    #product-container-2 {
         width: 300px;
    #product-container-3 {
         width: 300px;
    #product-container-4 {
         width: 300px;
    What you will see there however is that it seems pointless to define the same ID numerous times over (just adding a number on the end) when each ID is the exact same thing and has the exact same attributes.
    Now what I have noticed is that there are some sites out there who manage to have the same ID appear several times in the code but add a number to it just like above. The difference is that they only have one definition for 'product-cointainer' in their CSS document but in their actual XHTML code they have IDs for 'product-container' but with numbers on the end like 2,3,4,5, etc. It's almost as if JavaScript or some other code is automatically appending a number on the end of the ID so the validator won't consider the markup to be invalid, but yet it knows that it's using the same 'product-container' style that is contained in the CSS style sheet.
    I hope I explained this correctly. I'm just hoping to find a way that I can put the same div ID on a page multiple times without having to define it over and over again in my CSS.
    Any help is much appreciated!

    Because it seems like by using a class you can't make this position as 
    well as you can by using an ID. Am I wrong?
    An ID name can be used only one time per page.  A class name can be used multiple times per page.
    .product {
    width: 300px;
    text-align:left;
    color: #FF0000
    border: 2px solid #666;
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists
    www.alt-web.com/
    www.twitter.com/altweb
    www.alt-web.blogspot.com

  • Display specific row to display multiple time in jsf table 11.1.1.2.0 with

    HI ALL,
    I'm using jdeveloper 11.1.1.2.0 with ADF 11g.
    I have to display the values in jsf frm table where i'm using DislayCertDetailVO . In dis VO i'm having a column no.of certificaties .taking dis column value when i navigate to other page jsf by selecting a specific row. here i have to display the selected row in multiple times based on the no.of.certificates column value.
    I want to display specific row to display multiple time to repeat same row in a table in jsf based on the value from bean or table in database.
    Edited by: user9010551 on Apr 28, 2010 6:14 AM
    Edited by: user9010551 on Apr 28, 2010 10:33 PM

    Hi, Trying it once more to give more clarity of my scenario.
    I have to navigate from 1 screen to the other by picking a given table record/row from the 1st screen. While displaying the record on the 2nd screen the catch is that, I have to display it as many times as the value in a cell of the selected record.
    eg.
    screen 1
    col1   col2     col3
    2 order1 item1
    [next]
    On clicking next it should look like
    screen2
    col1           col2            col3           col4
    order1 item1
    order1 item1
    where col3 and col4 will be editable by the user and col1 is the value depends how many times i have repeat the row/record
    Hope this give more clarity.

  • Using multiple timer in the same SessionBean

    Hello,
    Is it possible to use multiple timer in the same Stateless Session Bean. In my application a user can schedule some task to execute. To do so I was thinking of creating a Session Bean which would create calendar timer on user request and, when one of the timer expires, retrieve the task to execute thanks to the information stored in the timer.
    When I tried the solution explained above, it seems that the @timeout method is synchronized on 1 timer. For example if I create a timer that will be executed every 10 seconds and another one executed every 30 seconds, the timeout callback is called every 30 seconds but 4 times.
    My code looks like that :
    @Stateless
    @LocalBean
    public class TimeManager {
        public void onUserRequest(ScheduleExpression expression) {
            Timer timer = timerService.createCalendarTimer(expression, timerCfg);
        @Timeout
        void timeout(Timer timer) {
            logger.log(Level.INFO, (String) timer.getInfo());
    }Is there a way to do what I want?
    Thank you

    This doesn't make any sense to me. If i were to write a bunch of schemas for a particular applicaion, would
    I have them all in the same namespace? You would normally have one schema that describes the information model associated with the one namespace that the different documents in your application use.
    If so, why can't I load more than one in the same name space?The parser chooses the schema based on the namespace alone. There is no other information used to decide which schema to use, so you can only have one schema for the namespace.
    They all have different root elements.You can have different root elements in the one schema.
    I don't even need the namespaces, but I can't
    figure out how to get rid of them (the schema isn't valid with out them according to XML Spy). You can set the schema explicitily before parsing, but not (AFAIK) set after parsing has begun, except by using the mapping of namespace to schema location.
    I have also tried to use the external-noNameSpaceSchemaLocationproperty, but it doesn't seem like you can pass in an array of schemas to that one. It only expects a
    String as the Object you pass in to setProperty. Yes, you can only validate a document against the one schema.
    So, how can I load all my schemas so I don't have to reference them in the XML documents? Either combine your schemas so you have one schema for your namespace that validates elements which are defined in that namespace (the formal/correct way of doing it), or construct a filter that inserts a PI to point to the schema once the root element is opened (the pragmatic/bit of a hack way of doing it).
    Pete

  • How to delete empty row without validation error in ADF Table(EMP)

    Hi Everyone,
    I am using EMP Table in ADF jspx page to insert the data into database.when i insert a row into table by createInsert operation,it inserting the row.But I need to delete that row immediately with out entering any value.
    But it showing some validation error at empno.Is there any ways to delete the empty row?if not,what are the reasons that we can't delete the row.
    could any one tell me the reasons!!
    Thanks in advance!!
    With Best Regards,
    Amar
    Edited by: 973755 on Dec 11, 2012 6:42 AM

    Amar,
    I am little confused with your logic here.....
    but if you are trying to remove the row by clicking Remove button, you can set the immediate property to true and that remove function will run without executing any entity validation.......
    -R

  • Finalize() method being called multiple times for same object?

    I got a dilly of a pickle here.
    Looks like according to the Tomcat output log file that the finalize method of class User is being called MANY more times than is being constructed.
    Here is the User class:
    package com.db.multi;
    import java.io.*;
    import com.db.ui.*;
    import java.util.*;
    * @author DBriscoe
    public class User implements Serializable {
        private String userName = null;
        private int score = 0;
        private SocketImage img = null;
        private boolean gflag = false;
        private Calendar timeStamp = Calendar.getInstance();
        private static int counter = 0;
        /** Creates a new instance of User */
        public User() { counter++;     
        public User(String userName) {
            this.userName = userName;
            counter++;
        public void setGflag(boolean gflag) {
            this.gflag = gflag;
        public boolean getGflag() {
            return gflag;
        public void setScore(int score) {
            this.score = score;
        public int getScore() {
            return score;
        public void setUserName(String userName) {
            this.userName = userName;
        public String getUserName() {
            return userName;
        public void setImage(SocketImage img) {
            this.img = img;
        public SocketImage getImage() {
            return img;
        public void setTimeStamp(Calendar c) {
            this.timeStamp = c;
        public Calendar getTimeStamp() {
            return this.timeStamp;
        public boolean equals(Object obj) {
            try {
                if (obj instanceof User) {
                    User comp = (User)obj;
                    return comp.getUserName().equals(userName);
                } else {
                    return false;
            } catch (NullPointerException npe) {
                return false;
        public void finalize() {
            if (userName != null && !userName.startsWith("OUTOFDATE"))
                System.out.println("User " + userName + " destroyed. " + counter);
        }As you can see...
    Every time a User object is created, a static counter variable is incremented and then when an object is destroyed it appends the current value of that static member to the Tomcat log file (via System.out.println being executed on server side).
    Below is the log file from an example run in my webapp.
    Dustin
    User Queue Empty, Adding User: com.db.multi.User@1a5af9f
    User Dustin destroyed. 0
    User Dustin destroyed. 0
    User Dustin destroyed. 0
    User Dustin destroyed. 0
    User Dustin destroyed. 0
    USER QUEUE: false
    INSIDE METHOD: false
    AFTER METHOD: false
    User Dustin destroyed. 1
    User Dustin destroyed. 1
    User Dustin destroyed. 1
    User Dustin destroyed. 1
    USER QUEUE: false
    INSIDE METHOD: false
    AFTER METHOD: false
    User Dustin destroyed. 2
    User Dustin destroyed. 2
    User Dustin destroyed. 2
    User Dustin destroyed. 2
    User Dustin destroyed. 2
    User Dustin destroyed. 2
    User Dustin destroyed. 2
    User Dustin destroyed. 2
    USER QUEUE: false
    INSIDE METHOD: false
    AFTER METHOD: false
    User Dustin destroyed. 3
    User Dustin destroyed. 3
    User Dustin destroyed. 3
    User Dustin destroyed. 3
    User Dustin destroyed. 3
    User Dustin destroyed. 3
    User Dustin destroyed. 3
    User Dustin destroyed. 3
    User Dustin destroyed. 3
    USER QUEUE: false
    INSIDE METHOD: false
    AFTER METHOD: false
    User Dustin destroyed. 4
    User Dustin destroyed. 4
    User Dustin destroyed. 4
    User Dustin destroyed. 4
    User Dustin destroyed. 4
    User Dustin destroyed. 4
    User Dustin destroyed. 4
    User Dustin destroyed. 4
    User Dustin destroyed. 4
    USER QUEUE: false
    INSIDE METHOD: false
    AFTER METHOD: false
    User Dustin destroyed. 5
    User Dustin destroyed. 5
    User Dustin destroyed. 5
    User Dustin destroyed. 5
    User Dustin destroyed. 5
    User Dustin destroyed. 5
    User Dustin destroyed. 5
    User Dustin destroyed. 5
    User Dustin destroyed. 5
    USER QUEUE: false
    INSIDE METHOD: false
    AFTER METHOD: false
    User Dustin destroyed. 6
    User Dustin destroyed. 6
    User Dustin destroyed. 6
    User Dustin destroyed. 6
    User Dustin destroyed. 6
    User Dustin destroyed. 6
    User Dustin destroyed. 6
    User Dustin destroyed. 6
    User Dustin destroyed. 6
    User Dustin destroyed. 6
    Joe
    USER QUEUE: false
    INSIDE METHOD: false
    AFTER METHOD: false
    User Dustin pulled from Queue, Game created: Joe
    User Already Placed: Dustin with Joe
    User Dustin destroyed. 7
    User Dustin destroyed. 7
    User Dustin destroyed. 7
    User Dustin destroyed. 7
    User Dustin destroyed. 7
    User Dustin destroyed. 7
    User Dustin destroyed. 7
    User Dustin destroyed. 7
    User Dustin destroyed. 7
    User Dustin destroyed. 7
    INSIDE METHOD: false
    INSIDE METHOD: false
    USER QUEUE: true
    INSIDE METHOD: false
    INSIDE METHOD: false
    User Dustin destroyed. 9
    User Joe destroyed. 9
    User Dustin destroyed. 9
    User Dustin destroyed. 9
    User Dustin destroyed. 9
    User Dustin destroyed. 9
    INSIDE METHOD: true
    INSIDE METHOD: false
    USER QUEUE: true
    INSIDE METHOD: false
    INSIDE METHOD: false
    INSIDE METHOD: true
    INSIDE METHOD: false
    USER QUEUE: true
    INSIDE METHOD: false
    INSIDE METHOD: false
    It really does seem to me like finalize is being called multiple times for the same object.
    That number should incremement for every instantiated User, and finalize can only be called once for each User object.
    I thought this was impossible?
    Any help is appreciated!

    Thanks...
    I am already thinking of ideas to limit the number of threads.
    Unfortunately there are two threads of execution in the servlet handler, one handles requests and the other parses the collection of User objects to check for out of date timestamps, and then eliminates them if they are out of date.
    The collection parsing thread is currently a javax.swing.Timer thread (Bad design I know...) so I believe that I can routinely check for timestamps in another way and fix that problem.
    Just found out too that Tomcat was throwing me a ConcurrentModificationException as well, which may help explain the slew of mysterious behavior from my servlet!
    The Timer thread has to go. I got to think of a better way to routinely weed out User objects from the collection.
    Or perhaps, maybe I can attempt to make it thread safe???
    Eg. make my User collection volatile?
    Any opinions on the best approach are well appreciated.

  • Message Driven Bean reading multiple times from a jms queue

    Hi,
    I am facing a strange problem with my message driven bean. Its configured to read message from a jms queue. But sometimes it read the same message multiple times from the jms queue.
    We are using weblogic server 8.1 sp5.
    Please find below our descriptor files
    ejb-jar.xml  
    <ejb-jar>  
      <display-name>ClarifyCRM_Process_Manager_13.1</display-name>  
      <enterprise-beans>  
        <session>  
          <display-name>ProcessManager</display-name>  
          <ejb-name>ProcessManager</ejb-name>  
          <home>com.clarify.procmgr.ejb.ProcessManagerHome</home>  
          <remote>com.clarify.procmgr.ejb.ProcessManagerRemote</remote>  
          <ejb-class>com.clarify.procmgr.ejb.ProcessManagerEJB</ejb-class>  
          <session-type>Stateless</session-type>  
          <transaction-type>Container</transaction-type>  
        </session>  
        <message-driven>  
          <display-name>ProcessManagerListener</display-name>  
          <ejb-name>ProcessManagerListener</ejb-name>  
          <ejb-class>com.clarify.procmgr.ejb.ProcessManagerMDB</ejb-class>  
          <transaction-type>Bean</transaction-type>  
          <acknowledge-mode>Auto-acknowledge</acknowledge-mode>  
          <message-driven-destination>  
            <destination-type>javax.jms.Queue</destination-type>  
          </message-driven-destination>  
        </message-driven>  
      </enterprise-beans>  
      <assembly-descriptor>  
        <container-transaction>  
          <method>  
            <ejb-name>ProcessManager</ejb-name>  
            <method-name>*</method-name>  
          </method>  
          <trans-attribute>Required</trans-attribute>  
        </container-transaction>  
      </assembly-descriptor>  
    </ejb-jar>  
    weblogic-ejb-jar.xml  
    <weblogic-ejb-jar>  
      <weblogic-enterprise-bean>  
        <ejb-name>ProcessManager</ejb-name>  
        <stateless-session-descriptor>  
          <pool>  
            <max-beans-in-free-pool>100</max-beans-in-free-pool>  
            <initial-beans-in-free-pool>10</initial-beans-in-free-pool>  
          </pool>  
        </stateless-session-descriptor>  
        <enable-call-by-reference>False</enable-call-by-reference>  
        <jndi-name>ProcessManagerHome</jndi-name>  
        <dispatch-policy>PMExecuteQueue</dispatch-policy>  
        <remote-client-timeout>0</remote-client-timeout>  
      </weblogic-enterprise-bean>  
      <weblogic-enterprise-bean>  
        <ejb-name>ProcessManagerListener</ejb-name>  
        <message-driven-descriptor>  
          <pool>  
            <max-beans-in-free-pool>100</max-beans-in-free-pool>  
            <initial-beans-in-free-pool>10</initial-beans-in-free-pool>  
          </pool>  
          <destination-jndi-name>clarify.procmgr.jms.queue.Execution</destination-jndi-name>  
          <connection-factory-jndi-name>clarify.procmgr.jms.factories.ExecConnection</connection-factory-jndi-name>  
        </message-driven-descriptor>  
        <enable-call-by-reference>True</enable-call-by-reference>  
        <dispatch-policy>PMListenerExecuteQueue</dispatch-policy>  
        <remote-client-timeout>0</remote-client-timeout>  
      </weblogic-enterprise-bean>  
    </weblogic-ejb-jar>   The MDB is sometimes reading multiple times from clarify.procmgr.jms.queue.Execution
    Also i would like to add here that the connection factory we are using clarify.procmgr.jms.factories.ExecConnection is having the following properties
    ServerAffinity Enabled=true
    XA connection factory enabled=false.
    Please help me out here!!

    Maybe, your MDB "sometimes" throws an Exception in onMessage.
    Check if this happens when you set <max-beans-in-free-pool>1</max-beans-in-free-pool>.

  • How to stop someone from filling out pdf form multiple times?

    My customers order my service by down loading a .pdf form. They then fill out the form and submit the form to my email. How do I stop a customer from submitting the form multiple times. I would like for the customer to submit the form only once filled out. If I need more info I could follow up to their order manually via email. Thanks for your help!

    One of the main reasons why you have a customer posting multiple submits would be because for some reason he/she doesn't know the first one was successful.
    Add a property your form to record whether or not a valid submit has already happened. Use script to set that property on submit. Check each time the submit operation is fired to see if the property is set. If it is display an error dialog and stop the submit from occurring.
    If someone wants to open multiple copies of your form and fill it out and send it to you, well there's nothing you can do about that.

Maybe you are looking for

  • How to find the enhance pack in my current system

    Hi, We have upgraded from 4.6c to ECC 6.00. How to find out the enhancement pack of my current installation. Thanks in advance Raman

  • Cannot download skype to my iPhone

    I had downloaded skype to my iPhone was having problems with it skype. I deleted it and I am now trying to download again to pmt phone but I cannot download.

  • JDeveloper 11.1.2.1.0 versioning tip needed...

    Hello folks! I looking for something handy on JDeveloper 11.1.2.1.0 We just start using versioning with trunk and branches etc. Right now when I'm confused where I'm working in, I go to Versioning > Switch in order to make it clear to myself in which

  • Items in music library do not appear in itunes

    After the recent updates, several of my iTunes tracks were missing--actually they had been redistributed to "podcasts" and "audiobooks," and a few of the photos were misplaced. A bit of a mess. Spotlight help relocate most of the files, and I put mos

  • Dragging pattern to swatch menu...

    Hi! I'd LOVE some quick help! Normally I can create a pattern and have excess hanging off of my board and just drag and drop it to the swatches and it creates a swatch. For some reason it's not working! I'm on a deadline for a customer and everytime