Multiple instance of a class

I have written a class, called Board. In my program, I need to create multiple instances of this class. e.g. Board1, Board2, Board3 etc.
Board Board2 = new Board();
Board2 = Board1;
However, when I change some parameters in Board1, the parameters in Board2 also get changed. Is there a way to prevent this?
I tried using the Object.clone() method, but I can't seem to invoke it due to its protected nature. If this is indeed the solution, does anybody know how to invoke it? Thanks!
Perd

I am interested in your alternative solution of
implementing clone() as a public method. However, I
don't really understand what do you mean by that.
I tried something like this:
class Board extends Cloneable
but it still doesn't work.
Can you please explain in greater detail what do you
mean? thanks!Read this: http://java.sun.com/docs/books/tutorial/java/javaOO/objectclass.html

Similar Messages

  • Creating multiple instances of a class in LabVIEW object-oriented programming

    How do you create multiple instances of a class in a loop?  Or am I thinking about this all wrong?
    For instance, I read in a file containing this information:
    Person Name #1
    Person Age #1
    Hobby #1
    Hobby #2
    Hobby #3
    Person Name #2
    Person Age #2
    Hobby #1
    Hobby #2
    Hobby #3
    Person Name #3
    Person Age #3
    Hobby #1
    Hobby #2
    Hobby #3
    If I define a Person class with name, age, and an array of strings (for the hobbies), how can I create several new Person instances in a loop while reading through the text file?
    FYI, new to LabVIEW OOP but familiar with Java OOP.  Thank you!

    First of all, let's get your terminology correct.  You are not creating multiple instances of a class.  You are creating Objects of the class.
    Use autoindexing to create an array of your class type.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Is running multiple instances of a class ok?

    hi guys,
    is it ok to have more than one instance of a class running?
    I have a console app that processes requests which have been saved in a db. this app does not need multithreading - but sometimes i may need to have multiple instances of the app running :-
    1) when there are too many requests in the db,
    2) or when i want to start another instance of the app to handle only specific duties.
    i mean this:
    i start my app:
    java myApp
    (the app is started once and does not stop for very long - heavy computing involved)
    then when i need another task to compute another task i start another instance (maybe with an option "specificDutyName" :
    java myApp specificDutyName
    Is this ok? no memory issues may arise?

    I think i am not able to follow your problem...
    when i do a java <AppName> <Any arguments/may be nothing>
    in reality I am starting off a JVM.
    If I do java <AppName> <Any arguments/may be nothing> again.... i would be starting of another JVM altogether..
    You may see two java.exe processes running in the task manager.. in case of a windows box.
    In such case if you may want to talk between applications running on two JVM's on the same machine.. you may need to resort to techniques like RMI and such...
    I dont think your requirement is so.. and this should be satisfied with simple multi-threading concepts.. you may start of a deamon thread that would keep on listening to a particular set of inputs.. which triggers of your new code path..
    Hope it makes sense..
    Vaibhav

  • Create multiple instances of same class but with unique names

    Hi,
    I'm creating an IM application in Java.
    So far I can click on a user and create a chat session, using my chatWindow class. But this means I can only create one chatWindow class, called 'chat'. How can I get the application to dynamically make new instances of this class with unique names, for examples chatWindowUser1, chatWindowUser2.
    Below is some code utlising the Openfire Smack API but hopefully the principle is the clear.
        private void chatButtonActionPerformed(java.awt.event.ActionEvent evt) {                                          
            int selectedUserIndex = rosterList.getSelectedIndex();
            String selectedUser = rostAry[selectedUserIndex].getUser();
            System.out.println("Chat with: " + selectedUser);
            if (chatBox == null) {
                JFrame mainFrame = CommsTestApp.getApplication().getMainFrame();
                chatBox = new CommsTestChatBox(mainFrame,conn,selectedUser);
                chatBox.setLocationRelativeTo(mainFrame);
            CommsTestApp.getApplication().show(chatBox);
    }  

    yes, an array would work fine, just realize that by using an array, you're setting an upper bound on the number of windows you can have open.
    As for unique names, if you mean unique variable name, you don't need one. The array index serves to uniquely identify each instance. If you mean unique title for the window, set that however you want (username, index in array, randomly generated string, etc.). It's just a property of the window object.

  • How to avoid multiple instances of a class

    I  new a class
    var myCourse=new course();
    myCourse.newCourse(value);
    add myCourse;
    Now ,I want call function newCourse many times and don`t new class again
    how to do ...?

    As long as you do not use "var myCourse=new course();" again you can use "myCourse.newCourse(value);" as often as you like without creating a new instance.

  • Memory allocation when using multiple instances of a static array.

    Hi,
    I have question regarding the amount of memory allocated using multiple instances of a class that has declared a static array, e.g.:
    package staticTest;
    import javacard.framework.*;
    public class StaticClass
         static byte[] staticArray;
         public StaticClass()
              staticArray = new byte[100];
    /* Another class */
    package statictest;
    import javacard.framework.*;
    public class MyApplet extends javacard.framework.Applet
         StaticClass staticLibA, staticLibB;
         public MyApplet()
              /* Here we use two instances */
              staticLibA = new StaticClass();          
              staticLibB = new StaticClass();
         public static void install(byte[] bArray, short bOffset, byte bLength)
              (new MyApplet()).register(bArray, (short)(bOffset + 1), bArray[bOffset]);
         public void process(APDU apdu)
              byte[] buf = apdu.getBuffer();
              switch(buf[ISO7816.OFFSET_INS])
    }When downloading and installing this applet on a gemXpresso 211 PKis (that has a ' Get free EEPROM memory' function) the card reports that the amount of memory is increased by a approx 100 bytes every time a new staticLibX is added in the MyApplet constructor. Is this correct? If yes, can someone explain to me how to declare a static array that only allocates memory once and are being shared by the instances.
    Best regards,
    Jonas N

    Hi!
    I have another issue about static variable. The following is my sample code:
    ========================================
    package com.Test01;
    import javacard.framework.*;
    import javacard.security.*;
    import javacardx.crypto.Cipher;
    public class Test01 extends Applet {
         OwnerPIN Pin;
         static DESKey[] keys;
    protected Test01(byte[] buffer, short offset, byte length) {     
    keys = new DESKey[4];
    length = 0;
    while (length < 4) {
         keys[length] = (DESKey)KeyBuilder.buildKey((byte)3, (short)0x80, false);
         length = (byte)(length + 1);
    public static void install(byte buffer[], short offset, byte length) {     
    new Test01(buffer, offset, length);
    ===========================================================
    If there are two instances, A and B, created in the package.
    My issue:
    1. Are keys[0]~ keys [3] kept while B is deleted?
    2. Does each instance have itsown object while "keys[length] = (DESKey)KeyBuilder.buildKey((byte)3, (short)0x80, false);"?
    3. follow item 2, if A and B share the same object, is the object kept while B is deleted?
    Thank you
    Best regards,
    kantie

  • Multiple instances of the same bean class in session?

    I�m trying to think of a way to have multiple instances of the same bean class in session scope using JSF. For example, let�s say that I have two <h:dataTable>s on the same page. They both use the backing bean called genericBean. Now, the content for genericBean will be different for each <h:dataTable>. In fact, the data source that backs genericBean is not known until runtime. It could be a database, web service, etc.
    What I would like is for when JSF needs access genericBean instead of looking for the value with key �genericBean� in the session map it looks for �genericBean_[some runtime ID]�. I could specify this id in EL on a custom component, as a request parameter or whatever.
    I think that I need the bean to be in session scope because the tables are complex and I want them to be editable.
    I have some ideas about how I can do this but I was wondering if someone has already solved this problem or if there is a standard way to do this using tools like Shale, etc.
    Thanks,
    Randy

    Well, I came up with an interesting solution to this so I thought that I would post it here.
    I have a page that looks like this.
    <html>
    <head>
    <title>My Page</title>
    </head>
    <body>
    <f:view>
    <f:subview id="component1">
    <jsp:include page="component.jsp">
    <jsp:param name="id" value="a" />
    </jsp:include>
    </f:subview>
    <hr>
    <f:subview id="component2">
    <jsp:include page="component.jsp">
    <jsp:param name="id" value="b" />
    </jsp:include>
    </f:subview>
    </f:view>
    </body>
    </html>
    And component.jsp looke like this.
    <f:verbatim>
    <p>
    <h1>Component
    </f:verbatim>
    <h:outputText value=" #{param.id}" />
    <f:verbatim>
    </h1>
    </p>
    </f:verbatim>
    <h:form>
    <h:outputText value="#{component.id}" />
    <h:outputText value="#{component.value}" />
    <h:commandButton value="increment" action="#{component.increment}" />
    <h:commandButton value="decrement" action="#{component.decrement}" />
    <f:verbatim>
    <input type="hidden" name="id"
    value="</f:verbatim><h:outputText value="#{param.id}"/><f:verbatim>" />
    </f:verbatim>
    </h:form>
    The idea is that I want component.jsp to be initialized differently based on the id param. The component managed bean is configured to be in session scope but I want the component instance for id a and id b to be different instances in session scope. Therefore, I added a custom variable resolver to handle this.
    public Object resolveVariable(FacesContext context, String name) {
    // This id will be different for the different subviews.
    HttpServletRequest request = (HttpServletRequest) context.getExternalContext() .getRequest();
    String id = request.getParameter("id");
    // If there is an id in the request then check if this is a bean that can have multiple
    // instances in session scope.
    if ((id != null) && (id.length() > 0)) {
    ExternalContext ec = context.getExternalContext();
    // Build the new name for the key of this bean
    String newName = name + "_" + id;
    Object value = null;
    // See if the bean instance already esists.
    if ((null == (value = ec.getRequestMap().get(newName))) &&
    (null == (value = ec.getSessionMap().get(newName))) &&
    (null == (value = ec.getApplicationMap().get(newName)))) {
         // We could not find the bean instance in scope so create the bean
         // using the standard variable resolver.
    value = original.resolveVariable(context, name);
    // Now check if the bean implements that page component interface. If it is
    // a page component then we want to rename the key to access this bean so
    // that the instance is only used when the id is provided in the request.
    // For example, if there are two components (a and b) we will have in session scope
    // component_a and component_b. The will each point to a unique instance of the
    // Component bean class.
    if (value instanceof PageComponent) {
    // Try to get the value again
    if (null != (value = ec.getRequestMap().get(name))) {
         // Initialize the bean using the id
    ((PageComponent) value).initInstance(id);
    ec.getRequestMap().remove(name);
    ec.getRequestMap().put(newName, value);
    } else if (null != (value = ec.getSessionMap().get(name))) {
    ((PageComponent) value).initInstance(id);
    ec.getSessionMap().remove(name);
    ec.getSessionMap().put(newName, value);
    } else if (null != (value = ec.getApplicationMap().get(name))) {
    ((PageComponent) value).initInstance(id);
    ec.getApplicationMap().remove(name);
    ec.getApplicationMap().put(newName, value);
    return value;
    return original.resolveVariable(context, name);
    }

  • Bug - multiple related instances of same class

    We've discovered a rather subtle bug in the process by which Kodo
    searches for reachable related objects to persist. If an instance of a
    PC class (A) has two relationships to the same PC class (B), and both
    related instances of B have the same value for their PK-field, then only
    one of the related instances of B will be persisted.
    Obviously, this problem only occurs in the context of application
    identity. We've only encountered it when all the instances involved are
    newly created and being made persistent for the first time (else the
    instances would have different PK-values). It should also be noted that
    we're assigning PK-values in jdoPreStore(). Here's the specific
    situation we encountered:
    Class A has two relationships to class B, represented by fields "B b1"
    and "B b2". In our case, A.b1 is the many-side of a bidirectional
    one-to-many relationship; the one-side is implemented by a field "List
    aList" in B. A.b2 is the navigable side of a unidirectional
    relationship; there is no corresponding field in B. (We haven't checked
    whether or how the cardinality or navigability of the relationships
    affects the problem.)
    Let "a1" be the sole instance of A. If a1.b1 is set to an instance of B
    but a1.b2 is null, and makePersistent( a1 ) is called, then a1 and b1
    are persisted correctly and the relation field b2_id in TableA is NULL.
    However, if a1.b2 is set to a second instance of B and both instances of
    B have the same initial value of their PK-field, then a.b2 is not
    persisted. Only one record is added to TableB; it corresponds to A.b1.
    Interestingly, in this case the relation field b2_id in TableA is not
    NULL, but has the default value of b2's PK-field. jdoPreStore() is not
    called on b2 and b2 is not persisted, but its PK-field is read in the
    process of persisting a1.
    Since we've placed the jdoPreStore() callback in a common non-persistent
    adapter superclass, we're currently able to work around the problem with
    a static "seed" PK value that is incremented in the superclass default
    constructor to provide a unique initial value for each PK-field. If
    anyone would like the code for this approach we'll post it, although
    it'll become unnecessary when the problem is fixed.
    Jerry Pulley
    Sr. Developer
    Commerce Technologies, Inc.

    I'm curious what behavior, besides throwing an exception, could even be
    possible. If the pm discovers two object with the same id, it seems that it
    has to choose one of them to make persistent. How could it possibly resolve
    differences in the fields of the two instances in deciding which one is the
    correct one to put in the db? Additionally, allowing this behavior could
    lead to subtle, difficult to detect bugs in your program, since ( as Abe
    points out ) JDO promises that there will only be one instance of an object
    with a given primary key per PM. Other code may make decisions based on
    this expectation ( like refreshing one of the objects after making a change
    in a different PM ), that would lead to problems for code still hanging on
    to the second instance.
    IMHO, it should throw an exception.
    -Eric
    "Abe White" <[email protected]> wrote in message
    news:[email protected]...
    Thanks for the bug report! However, I'm not entirely sure that this is a
    bug (at least not the bug you think it is); either way it's an extremely
    interesting case. The reason I say it might not be a bug is thatassigning
    pk values in jdoPreStore seems suspect.
    We know that a single PM cannot at any time contain multiple instances
    with the same oid value, app id or otherwise. This is obvious from the
    getObjectById method -- only one object can have a particular oid.
    We also know that jdoPreStore is called only for instances managed by a
    PM (duh!).
    Thus it should not be possible to see a case where jdoPreStore is
    called for 2 objects with the same initial oid.
    Now, I realize that when you're dealing with persistence-by-reachability
    things become less clear. However, I think the general point stands: at
    the time that the objects are made persistent they all must have unique
    oid values, and objects must be made persistent before jdoPreStore is
    called.
    Technically we could get around this. The current
    persistence-by-reachability algorithm is something like:
    flushed = {}
    while flushed.size < persistent.size:
    for each persistent instance:
    if instance not in flushed:
    instance.jdoPreStore // may persist more instances
    instance.persistFirstClassFields // may persist more too
    flushed += instance
    In sum this is a breadth-first method of persisting relations. It could
    be changed to a depth-first system instead of persisting all first class
    fields each one is persisted and then immediately the algorithm is
    repeated for that object before the other fields are touched. However,
    this seems like it might lead to other unexpected behavior.
    Generally, it just seems like waiting till jdoPreStore to assign the oid
    of an object seems like a bad idea. I think the real bug is that Kodo is
    not throwing an exception as soon as 2 object with the same oid are
    detected (currently it just lets one overwrite the other in the cache,
    which results in the behavior you see).
    Does anyone else have an opinion on this? I'm certainly not fixed on my
    interpretation of things; if you disagree I'd be very interested in
    hearing other arguments.

  • A Cocoa window which is used multiple times (for instances of a class)

    Hi everyone,
    I develop with newest xCode using Obj-C, Java and Cocoa.
    It works perfectly to create a window and connect it to some code: I just design it, and connect it to a class which has been instantiated previously.
    What I need now is a window, which is used multiple times. Means that I create a class where the window should be connected to, from which I create multiple instances.
    I've seen that it works to create a class in Obj-C and just generate the window by code: it works to generate multiple windows. But how would I be able to design a window with InterfaeBuilder for a class which is not yetinstantiated? A class for which I create the instances while my app is running?
    Thanks a lot for your answers!
    -Lucas

    Like PeeJay says, a custom window controller seems the way to go. Try creating a subclass of NSWindowController, with header something like this:
    #import <Cocoa/Cocoa.h>
    @interface MyWindowController : NSWindowController
    IBOutlet NSTextField *infoField;
    -(void)setInfoText:(NSString *)str;
    @end
    The implementation of the setInfoText would be something like:
    -(void)setInfoText:(NSString *)str{
    [infoField setStringValue:str];
    Create a nib file with your window in interface builder. Drop the header file for your custom window controller into the interface builder window. Set the custom class of the nib's File's Owner to MyWindowController. You can then hook up the window and infoField outlets from File's Owner to your window.
    In the body of your code where you open a new info window, add something like:
    MyWindowController *windowController=[[MyWindowController alloc] initWithWindowNibName:@"nameOfWindowNibFile"];
    [windowController setInfoText:@"Whatever"];
    [windowController showWindow:self];
    If you are going to have an undetermined amount of these custom window, it might be a good idea to store the window controller instances in a mutable array, rather than retaining instance variables for each one.
    Jim

  • How to create Multiple instances of This SingleTon class

    import java.io.*;
    import java.util.Properties;
    import java.net.URLEncoder;
    public class ddd
              // declaring variables
              static private ddd _instance;
              String connectIP;
              int connectPort;
              String systemID;
              String password;
         String systemType;
              // Constructor with arguments
              private ddd()
              globalInit();
         // method returning the ddd instance.
              public static      synchronized ddd getInstance()
              if (_instance == null)
                        _instance = new ddd();
              return _instance;
              // Global initialisations
              public void globalInit()
              systemID ="XXXXX" ;
              password ="XXXXX";
              systemType ="Null";
              public static void main(String[] args)
                   ddd sb;
                   sb = ddd.getInstance();
                   System.out.println(ddd.getInstance());

    Don't cross-post:
    http://forum.java.sun.com/thread.jsp?thread=547911&forum=54&message=2669925
    http://forum.java.sun.com/thread.jsp?thread=547912&forum=31&message=2669928
    Sorry, I can't help but think that this is one of the more foolish questions I've read in a while.
    The pattern Singleton means "I only want one of these in a single JVM". If you want multiple instances, or even a restricted number of instances, then rewrite the class (something like this):
    public class LimitedEdition
        public static final int MAX_EDITIONS = 3;
        private static int numEditions;
        public static void main(String [] args)
            try
                if (args.length > 0)
                    int numEditions = Integer.valueOf(args[0]).intValue();
                    for (int j = 0; j < numEditions; ++j)
                        LimitedEdition limited = new LimitedEdition();
                        System.out.println(limited);
            catch (Exception e)
                e.printStackTrace();
        public LimitedEdition() throws InstantiationException
            if (numEditions < MAX_EDITIONS)
                ++numEditions;
            else
                throw new InstantiationException("Only " + MAX_EDITIONS + " instances allowed");
        public String toString()
            return "[ instance # " + numEditions + "]";

  • Managing Multiple threads accessing  a single instance of a class

    Hi,
    i have to redesign a class, say X, in such a way that i manage multiple threads accessing a single instance of the class, we cannot create multiple instances of X. The class looks like this:
    Class X{
    boolean isACalled=false;
    boolean isInitCalled=false;
    boolean isBCalled=false;
    A(){
    isACalled=true;
    Init(){
    if(!isACalled)
    A();
    B();
    C();
    isInitCalled=true;
    B(){
    if(!isACalled)
    A();
    isBCalled=true;
    C(){
    if(!isACalled)
    A();
    if(!isBCalled)
    B();
    }//end of class
    Init is the method that would be invoked on the single instance of this class.
    Now i cannot keep the flags as instance variables coz different threads would have differrent status of these flags at the same time, hence i can make them local, but if i make them local to one method, the others won't be able to check their status, so the only solution i can think of is to place all the flags in a hashtable local to method INIT AND INITIALIZE ALL OF them to false, as init would call other methods, it would pass the hashtable reference as an additional parameter, the methods would set the flags in the hashtable and it would be reflectecd in the original hashtable, and so all the methods can have access to the hashtable of flags and can perform their respective checks and setting of flags.
    This all would be local to one thread, so there's no question of flags of one thread mixin with the flags of some other thread.
    My question is :
    Is this the best way, would this work?
    In java, everything is pass by value, but if i pass the hashtable reference, would the changes made inside the called method to the hashtable key-value would be visible in the original hashtable declared inside the calling method of which the hashtable is local variable?

    In Java object variables are passed "by copy of reference", and primitive variables "by value".
    The solution with HashMap/Hashtable you suggest is ok, but I think you should read about ThreadLocal class:
    http://java.sun.com/j2se/1.4.2/docs/api/java/lang/ThreadLocal.html

  • What is the best way to load multiple instances of a button into master index page?. I have looked a

    I have successfully created an animated button that opens to reveal a quotation with a nested clickable link to the source. What I would like to do is have several of these with different quotes inside them, scattered on the page. I have looked at the composition loader available via Edge Commons, and it seems that would require some sort of Edge animate Stage 'frame' to load the instances into? Is there any way to place them directly into the master page - as div elements...?
    The outer of the buttons is the same, on hover they open partialy on click fully, to reveal  their particular text - which I thought about loading it at runtime with json, or maybe handlebars...?
    I would also like to make the buttons only take the necessary space. ie. before they expand they are only buttons. ( I have set the stage to hidden but it still takes up space). To acheive this, I think perhaps I will have to target the inner components css, and set them as display:none until the button is hovered over, then set :hover and :active pseudo classes inside edge. Is this feasible?
    Thanks in advance for any ideas/suggestions...

    Hello, Thanks for your helpful input. Based on that, and the tutorial 'http://tv.adobe.com/watch/learn-edge-animate-cc/ingesting-external-data-dc/' - I have written code to drive my button's behaviour.  (copied below...)
    var textArray =new Array();
    var currentHead = 0;
    var currentText = 0;
    var currentFoot = 0;
    var s = sym.getSymbol("textContainer");
    sym.$("textContainer")$.("text").html("");
    var sh = sym.getSymbol("headContainer");
    sym.$("headContainer")$.("head").html("");
    var sf = sym.getSymbol("footContainer");
    sym.$("footContainer")$.("footer").html("");
    $.getJSON("assets/sources1.json", function(data){
              for (var i=0; i<data.length; i++){
                        textArray.push({"head":data[i].heading,
                                  "text":data[i].text,
                                  "footer":data[i].foot,
                                  "link":data[i].link});
              sym.$("headContainer")$.("head").html(textArray[currentHead]).heading;
              sym.$("textContainer")$.("text").html(textArray[currentText]).text;
              sym.$("footContainer")$.("foot").html(textArray[currentFoot]).foot;
              sym.$("footContainer")$.("link").html(textArray[currentLink]).link;
    But there is an error I don't understand at line 7...
    Also - as you can see, at present I have several symbols in parallel. Would I be better off nesting the text containers inside the outer button container? and would I be better off creating styled mini- pages of text data, and then loading them - instead of loading them as symbols? I have had to create seperate symbols because I cannot adequately stle the text - so some is bold, some is italic etc. within one text field. Or can I? I guess I could nest several text fields inside one symbol...?
    I remain unsure how to load the finished animation button instances. In your example you were still loading into an animation But from yor example, I guess I would need to place all my examples inside an outer edge composition... but then I think positioning them accurately with css, making adjustments etc. will be fairly tricky. Is there any way to place multiple instances directly into divs in index.html? Could I simply repeat the class...? I may be answering my own questions here.

  • How to reference multiple instances of the same Java object from PL/SQL?

    Dear all,
    I'm experimenting with calling Java from PL/SQL.
    My simple attempts work, which is calling public static [java] methods through PL/SQL wrappers from SQL (and PL/SQL). (See my example code below).
    However it is the limitation of the public static methods that puzzels me.
    I would like to do the following:
    - from PL/SQL (in essence it needs to become a forms app) create one or more objects in the java realm
    - from PL/SQL alter properties of a java object
    - from PL/SQL call methods on a java object
    However I fail to see how I can create multiple instances of an object and reference one particular object in the java realm through public static methods.
    My current solution is the singleton pattern: of said java object I have only 1 copy, so I do not need to know a reference to it.
    I can just assume that there will only ever be 1 of said object.
    But I should be able to make more then 1 instance of an object.
    To make it more specific:
    - suppose I have the object car in the java realm
    - from PL/SQL I want to create a car in the java realm
    - from PL/SQL I need to give it license plates
    - I need to start the engine of a scpecific car
    However if I want more then 1 car then I need to be able to refrence them. How is this done?
    Somehow I need to be able to execute the following in PL/SQL:
    DECLARE
    vMyCar_Porsche CAR;
    vMyCar_Fiat CAR;
    BEGIN
    vMyCar_Porsche = new CAR();
    vMyCar_Fiat = new CAR();
    vMyCar_Porsche.setLicensePlates('FAST');
    vMyCar_Porsche.startEngine();
    vMyCar_Fiat.killEngine();
    END;
    Thanks in advance.
    Best Regards,
    Ruben
    My current example code is the following:
    JAVA:
    ===
    CREATE OR REPLACE AND RESOLVE JAVA SOURCE NAMED CODAROUL."RMG/BO/RMG_OBJECT" as package RMG.BO;
    public class RMG_OBJECT {
    private static RMG_OBJECT instance = new RMGOBJECT();
    private String rmgObjectNaam;
    private RMG_OBJECT(){
    this.rmgObjectNaam = "NonDetermined";
    public static String GET_RMGOBJECT_NAAM () {
    String toestand = null;
    if (_instance == null) {toestand = "DOES NOT EXIST";} else { toestand = "EXISTS";};
    System.out.println("instance : " + toestand);
    System.out.println("object name is : " + _instance.rmgObjectNaam);
    return _instance.rmgObjectNaam;
    public static Integer SET_RMGOBJECT_NAAM (String IN)
    try
    _instance.rmgObjectNaam = IN;
    return 1;
    catch (Exception e)//catch
    System.out.println("Other Exception: " + e.toString());
    e.printStackTrace();
    return 5;
    } //catch
    PL/SQL Wrapper:
    ==========
    CREATE OR REPLACE FUNCTION CODAROUL.SET_RMGOBJECT_NAAM(NAAM IN VARCHAR2) return NUMBER AS
    LANGUAGE JAVA NAME 'RMG.BO.RMG_OBJECT.SET_RMGOBJECT_NAAM (java.lang.String) return java.lang.Integer';
    Calling from SQL:
    ==========
    CALL dbms_java.set_output(2000);
    select CODAROUL.GET_RMGOBJECT_NAAM() from dual;
    Edited by: RubenS_BE on Apr 6, 2012 5:35 AM
    Edited by: 925945 on Apr 6, 2012 5:41 AM

    You can do this by manually creating a new iterator binding in your binding tab.
    So instead of dragging the VO directly to the page, go to the binding tab, add a new executable iterator binding, and point to that one from your ELs in the page itself.

  • Deploy multiple instances of the same stateless session EJB

    I have a stateless session bean.
    The methods on the bean operate against DB tables.
    Q: Can I deploy multiple instances of the same stateless session bean, but specify a different JNDI/datasource name in the deployment descriptor?
    The method calls are all enclosed within a single invocation, just that I need to hit different databases (all with the same schema), and Id like to be able to lookup the EJB via a different JNDI name, and have the exact same functionality, just against different deployed datasources.
    Does the spec allow/support this?
    If not, any suggestions as to how to achieve this sort of functionality?
    Im using JBoss 3.2.1 on Solaris, so Im not sure whether or not this is a JBoss "issue" or a limitation of the EJB Spec (or me being just plain wrong and trying to do something the "wrong way")
    Nick

    I have a stateless session bean.
    The methods on the bean operate against DB tables.
    Q: Can I deploy multiple instances of the same
    stateless session bean, but specify a different
    JNDI/datasource name in the deployment descriptor?
    The method calls are all enclosed within a single
    invocation, just that I need to hit different
    databases (all with the same schema), and Id like to
    be able to lookup the EJB via a different JNDI name,
    and have the exact same functionality, just against
    different deployed datasources.
    Does the spec allow/support this?
    If not, any suggestions as to how to achieve this sort
    of functionality?
    Im using JBoss 3.2.1 on Solaris, so Im not sure
    whether or not this is a JBoss "issue" or a limitation
    of the EJB Spec (or me being just plain wrong and
    trying to do something the "wrong way")
    NickI haven't done it but judging from the deployment descriptors yes.
    For example if I have two bounded datasources java:/Database1 and java:/Database2
    Lets say I have a session bean called MySession, then in your ejb-jar.xml you would have (notice that the desc, display, and ejb-name are the only differences)
    <session>
    <description>MySessionAlpha</description>
    <display-name>MySessionAlpha</display-name>
    <ejb-name>MySessionAlpha</ejb-name>
    <home>com.mycorp.MySessionRemoteHome</home>
    <remote>com.mycorp.MySessionRemote</remote>
    <local-home>com.mycorp.MySessionLocalHome</local-home>
    <local>com.mycorp.MySessionLocal</local>
    <ejb-class>com.mycorp.MySessionFacadeBean</ejb-class>
    <session-type>Stateless</session-type>
    <transaction-type>Container</transaction-type>
    <resource-ref>
    <res-ref-name>jdbc/DataSource</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
    </resource-ref>
    </session>
    <session>
    <description>MySessionBeta</description>
    <display-name>MySessionBeta</display-name>
    <ejb-name>MySessionBeta</ejb-name>
    <home>com.mycorp.MySessionRemoteHome</home>
    <remote>com.mycorp.MySessionRemote</remote>
    <local-home>com.mycorp.MySessionLocalHome</local-home>
    <local>com.mycorp.MySessionLocal</local>
    <ejb-class>com.mycorp.MySessionFacadeBean</ejb-class>
    <session-type>Stateless</session-type>
    <transaction-type>Container</transaction-type>
    <resource-ref>
    <res-ref-name>jdbc/DataSource</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
    </resource-ref>
    </session>
    But now in the jboss.xml, we will have the following elements. What you may notice is that are bound to different remote and local jndi names. But the resource bindings are very different. The res-ref-name stays the same, but the jndi-name are different. I think this will work for you.
    <session>
    <ejb-name>MySessionAlpha</ejb-name> <jndi-name>ejb/com/mycorp/MySessionAlphaRemoteHome</jndi-name> <local-jndi-name>ejb/com/mycorp/MySessionAlphaLocalHome</local-jndi-name>
    <resource-ref>
    <res-ref-name>jdbc/datasource</res-ref-name>
    <jndi-name>java:/Database1</jndi-name>
    </resource-ref>
    </session>
    <session>
    <ejb-name>MySessionBeta</ejb-name> <jndi-name>ejb/com/mycorp/MySessionBetaRemoteHome</jndi-name> <local-jndi-name>ejb/com/mycorp/MySessionBetaLocalHome</local-jndi-name>
    <resource-ref>
    <res-ref-name>jdbc/datasource</res-ref-name>
    <jndi-name>java:/Database2</jndi-name>
    </resource-ref>
    </session>

  • Multiple Instances of OEDQ on a single server

    Hi,
    I am running a Linux Machine (Linux 2.6.18-308.1.1.0.1.el5), on which I have the latest version of Oracle 11g release 2 installed.
    I have an instance of oracle Enterprise Data Quality tool running on an apache-tomcat-7 server. Port 8080
    Now I have a requirement of Installing another instance of OEDQ on the same server, but a different APACHE_HOME directory and a different Port Number (8081).
    So the question is, Can we install multiple instances of OEDQ on a single server?
    If so, what are the prerequisites to be maintained.
    I did my bit of tries, but ended up having issues with some java errors.
    I have posted the error message below.
    SEVERE: Context initialization failed
    *org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'casemanager' defined in class path resource [conf/casemanagement.xml]: Cannot resolve reference to bean 'casedao' while setting bean property 'caseDAO';*
    The complete Error Log in the Catalina.out file is pasted below.
    INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /u100/app/PCEXDB/orpcexmt/oracle/loqate:/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
    May 13, 2013 12:50:08 AM org.apache.coyote.AbstractProtocol init
    INFO: Initializing ProtocolHandler ["http-bio-8081"]
    May 13, 2013 12:50:08 AM org.apache.coyote.AbstractProtocol init
    INFO: Initializing ProtocolHandler ["ajp-bio-8010"]
    May 13, 2013 12:50:08 AM org.apache.catalina.startup.Catalina load
    INFO: Initialization processed in 792 ms
    May 13, 2013 12:50:08 AM org.apache.catalina.core.StandardService startInternal
    INFO: Starting service Catalina
    May 13, 2013 12:50:08 AM org.apache.catalina.core.StandardEngine startInternal
    INFO: Starting Servlet Engine: Apache Tomcat/7.0.29
    May 13, 2013 12:50:08 AM org.apache.catalina.startup.HostConfig deployWAR
    INFO: Deploying web application archive /u100/app/PCEXDB/orpcexmt/oracle/OEDQ2/apache-tomcat-7.0.29/webapps/dndirector.war
    May 13, 2013 12:50:13 AM org.apache.catalina.startup.TaglibUriRule body
    INFO: TLD skipped. URI: http://struts.apache.org/tags-tiles is already defined
    May 13, 2013 12:50:13 AM org.apache.catalina.startup.TaglibUriRule body
    INFO: TLD skipped. URI: http://struts.apache.org/tags-html is already defined
    May 13, 2013 12:50:13 AM org.apache.catalina.startup.TaglibUriRule body
    INFO: TLD skipped. URI: http://struts.apache.org/tags-bean is already defined
    May 13, 2013 12:50:13 AM org.apache.catalina.startup.TaglibUriRule body
    INFO: TLD skipped. URI: http://struts.apache.org/tags-logic is already defined
    May 13, 2013 12:50:13 AM org.apache.catalina.startup.TaglibUriRule body
    INFO: TLD skipped. URI: http://struts.apache.org/tags-nested is already defined
    May 13, 2013 12:50:13 AM org.apache.catalina.startup.TaglibUriRule body
    INFO: TLD skipped. URI: http://struts.apache.org/tags-bean is already defined
    May 13, 2013 12:50:13 AM org.apache.catalina.startup.TaglibUriRule body
    INFO: TLD skipped. URI: http://struts.apache.org/tags-html is already defined
    May 13, 2013 12:50:13 AM org.apache.catalina.startup.TaglibUriRule body
    INFO: TLD skipped. URI: http://struts.apache.org/tags-logic is already defined
    May 13, 2013 12:50:13 AM org.apache.catalina.startup.TaglibUriRule body
    INFO: TLD skipped. URI: http://struts.apache.org/tags-nested is already defined
    May 13, 2013 12:50:13 AM org.apache.catalina.startup.TaglibUriRule body
    INFO: TLD skipped. URI: http://struts.apache.org/tags-tiles is already defined
    May 13, 2013 12:50:14 AM org.springframework.web.context.ContextLoader initWebApplicationContext
    INFO: Root WebApplicationContext: initialization started
    May 13, 2013 12:50:14 AM org.springframework.context.support.AbstractApplicationContext prepareRefresh
    INFO: Refreshing com.datanomic.director.startup.WebApplicationContext@2dfe88b8: display name [Root WebApplicationContext]; startup date [Mon May 13 00:50:14 CDT 2013]; root of context hierarchy
    May 13, 2013 12:50:16 AM com.datanomic.director.startup.WebApplicationContext loadBeanDefinitions
    INFO: Spring bean loading complete.
    May 13, 2013 12:50:24 AM org.springframework.web.context.ContextLoader initWebApplicationContext
    SEVERE: Context initialization failed
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'casemanager' defined in class path resource [conf/casemanagement.xml]: Cannot resolve reference to bean 'casedao' while setting bean property 'caseDAO'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'casedao' defined in class path resource [conf/casemanagement.xml]: Cannot resolve reference to bean 'casemetadata' while setting bean property 'caseMetadata'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'casemetadata' defined in class path resource [conf/casemanagement.xml]: Error setting property values; nested exception is org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessExceptions (1) are:
    PropertyAccessException 1: org.springframework.beans.MethodInvocationException: Property 'flags' threw exception; nested exception is java.lang.NullPointerException
    at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:275)
    at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:104)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1245)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1010)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:472)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429)
    at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380)
    at com.datanomic.director.startup.WebApplicationContext.refresh(WebApplicationContext.java:109)
    at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255)
    at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199)
    Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'casedao' defined in class path resource [conf/casemanagement.xml]: Cannot resolve reference to bean 'casemetadata' while setting bean property 'caseMetadata'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'casemetadata' defined in class path resource [conf/casemanagement.xml]: Error setting property values; nested exception is org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessExceptions (1) are:
    PropertyAccessException 1: org.springframework.beans.MethodInvocationException: Property 'flags' threw exception; nested exception is java.lang.NullPointerException
    at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:275)
    at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:104)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1245)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1010)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:472)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
    at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:269)
    at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:104)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1245)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1010)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:472)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429)
    at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380)
    at com.datanomic.director.startup.WebApplicationContext.refresh(WebApplicationContext.java:109)
    at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255)
    at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199)
    at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4791)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5285)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:618)
    at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:963)
    at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1600)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
    at java.util.concurrent.FutureTask.run(FutureTask.java:166)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
    at java.lang.Thread.run(Thread.java:722)
    Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'casemetadata' defined in class path resource [conf/casemanagement.xml]: Error setting property values; nested exception is org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessExceptions (1) are:
    PropertyAccessException 1: org.springframework.beans.MethodInvocationException: Property 'flags' threw exception; nested exception is java.lang.NullPointerException
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1279)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1010)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:472)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
    at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:269)
    ... 46 more
    Caused by: org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessExceptions (1) are:
    PropertyAccessException 1: org.springframework.beans.MethodInvocationException: Property 'flags' threw exception; nested exception is java.lang.NullPointerException
    at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:104)
    at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:59)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1276)
    ... 57 more
    May 13, 2013 12:50:24 AM org.apache.catalina.core.StandardContext startInternal
    SEVERE: Error listenerStart
    May 13, 2013 12:50:24 AM org.apache.catalina.core.StandardContext startInternal
    SEVERE: Context [dndirector] startup failed due to previous errors
    May 13, 2013 12:50:25 AM org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
    SEVERE: The web application [dndirector] registered the JDBC driver [oracle.jdbc.OracleDriver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
    May 13, 2013 12:50:25 AM org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
    SEVERE: The web application [dndirector] registered the JDBC driver [org.postgresql.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
    May 13, 2013 12:50:25 AM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
    SEVERE: The web application [dndirector] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@623e20db]) and a value of type [java.lang.Class] (value [class oracle.sql.TypeDescriptorFactory]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
    May 13, 2013 12:50:25 AM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
    SEVERE: The web application [dndirector] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@da1c402]) and a value of type [java.lang.Class] (value [class oracle.sql.AnyDataFactory]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
    May 13, 2013 12:50:25 AM org.apache.catalina.startup.HostConfig deployDirectory
    INFO: Deploying web application directory /u100/app/PCEXDB/orpcexmt/oracle/OEDQ2/apache-tomcat-7.0.29/webapps/docs
    May 13, 2013 12:50:25 AM org.apache.catalina.startup.HostConfig deployDirectory
    INFO: Deploying web application directory /u100/app/PCEXDB/orpcexmt/oracle/OEDQ2/apache-tomcat-7.0.29/webapps/examples
    May 13, 2013 12:50:25 AM org.apache.catalina.startup.HostConfig deployDirectory
    INFO: Deploying web application directory /u100/app/PCEXDB/orpcexmt/oracle/OEDQ2/apache-tomcat-7.0.29/webapps/manager
    May 13, 2013 12:50:25 AM org.apache.catalina.startup.HostConfig deployDirectory
    INFO: Deploying web application directory /u100/app/PCEXDB/orpcexmt/oracle/OEDQ2/apache-tomcat-7.0.29/webapps/ROOT
    May 13, 2013 12:50:25 AM org.apache.catalina.startup.HostConfig deployDirectory
    INFO: Deploying web application directory /u100/app/PCEXDB/orpcexmt/oracle/OEDQ2/apache-tomcat-7.0.29/webapps/host-manager
    May 13, 2013 12:50:25 AM org.apache.coyote.AbstractProtocol start
    INFO: Starting ProtocolHandler ["http-bio-8081"]
    May 13, 2013 12:50:25 AM org.apache.coyote.AbstractProtocol start
    INFO: Starting ProtocolHandler ["ajp-bio-8010"]
    May 13, 2013 12:50:25 AM org.apache.catalina.startup.Catalina start
    INFO: Server startup in 16882 ms
    Can someone please tell me what is going wrong here?

    Hi,
    Multiple instances of EDQ on a single server is technically possible provided the installer takes care to avoid port conflicts. It is not the case that there is a single port used by an EDQ server, for example.
    For various reasons, it is not officially supported; attempting to diagnose issues on custom installations on Tomcat is especially difficult and we do not provide documentation on this. In general, the requirement usually comes up for Dev/Test instances (as there is no performance advantage of using multiple instances on a single server), where we would recommend the use of virtualization where this is a requirement.
    Regards,
    Mike

Maybe you are looking for