Is it possible to bind an instance of a class(Object)

Hi All
Is it possible to bind an instance i.e an Object to a name in JNDI and later when
U look up I should get the same object with the state as of the object when I
had bound the Object.
For Ex: Suppose there is a class A having two variables x and y.
Now I will create an object with name objA using
A objA = new A();
objA.setX(2)
objA.setY(6)
now I will bind objA to JNDI tree.
Later I will look up for objA which I had bound.
now what does objA.getX will return?
Please clarify my doubt
Thanks
Mrutyunjay
now objA.getX

ziggy wrote:
I need to pass an instance of "Properties" to it but i dont want to change the signature of the method to add a new argument to it. I have been struggling with this for the last couple of days and have tried a couple of options - see http://stackoverflow.com/questions/5134462/sending-in-an-object-of-type-object-instead-of-string-polymorphism
The class that calls the parsing method "ParserManager" knows of the properties object. Is there a way for the MessageParser to find the properties object without it being passed to it?I completely agree with Kayaman if you can get away with only the passing the Properties once (as he suggests, at construction time).
If you can't (ie, you must pass the Properties with each message), then I suspect you have a new type of Parser, and your design will have to reflect that.
One possibility would be to extend Parser with a PropertiesParser interface that defines a new parse() method and either update the current ParserManager to "understand" the difference, or create a new one.
The problem with the first option is that the manager then becomes a dispatcher, which kind of goes against the grain of OO programming (what if you need to add a third type of parser, or a fourth?).
Another possibility (probably better) would be to create a variant of your MessageObject class that includes Properties, and a variant of your MessageCParser that knows how to deal with such an object.
There are many ways to go, and only you probably know which is best.
That said, if you can get away with passing the Properties once, definitely follow Kayaman's advice.
Winston

Similar Messages

  • Binding multiple instance variables of multiple objects

    So I got this problem and cant figure out a solution. It seems to be a quite simple pattern but Im really new to jfx....
    Follows an imaginary code that kind of represents the problem in my real code:
    class A {
      public var vA: String;
      //...code that updates vA according to a specific logic
    class B {
      var seq: A[];
      public function addA(a: A) {
        insert a into seq;
      public function removeA....
      //how to monitor if one of the elements (OR logic) in seq have changed vA to say print the new value?
      //I mean, how can I bind each vA of each instance in seq to a trigger that will print the new value?
    }Note: The size of sequence increases/decreases as the user add or remove elements dynamically.
    This does not work since the bind dependencies in the for are not affected by varA:
    var newseq: String[] = bind for(a in seq) {a.varA} on replace {println(newseq)}This is not allowed by the compiler:
    var newseq: String[] on replace {println(newseq)};
    for(a in seq) {
      newseq[i] = bind a.varA; //incorrect syntax: seems that its not allowed to bind each individual sequence element through indexing
      i +=1;
    }Is there any obvious solution to this problem? Am I'm taking the wrong path?
    Thanks.

    OK, here is my latest version:
    class A
        public var vA: String on replace
            notifier(this);
        public-init var notifier: function (a: A): Void;
        public override function toString() { return vA; }
    class B {
        public-read var seq: A[] = for (i in [ 1 .. 10 ]) getA()
                on replace prevSeq[ lowIdx .. highIdx ] = usedSeq
            if (usedSeq == [])  // Delete operation
                delta = prevSeq[lowIdx].toString();
            else
                delta = usedSeq[0].toString();
        public-read var delta: String;
        public function add(): Void
            insert getA() into seq;
        public function remove(): Void
            def p = (Math.random() * (sizeof seq)) as Integer;
            delete seq[p];
        public function changeObj(): Void
            def p = (Math.random() * (sizeof seq)) as Integer;
            seq[p] = getA();
        public function changeVar(): Void
            def p = (Math.random() * (sizeof seq)) as Integer;
            def val = getVal();
            seq[p].vA = val;
            println(val);
        function getVal(): String
            def dt = DateTime {}
            return "{%1$tH:%1$tM:%1$tS:%1$tL dt.instant}"
        function getA(): A
            return A { vA: getVal(), notifier: updated }
        function updated(a: A): Void
            delta = "Value changed: {a.vA}";
    var b = B {}
    var scene: Scene;
    Stage
        title: "Sequence Update Observer"
        scene: scene = Scene
            width: 200
            height: 700
            content:
                VBox
                    layoutX: 20, layoutY: 20
                    spacing: 10
                    content:
                        Button { text: "Add", action: b.add }
                        Button { text: "Del", action: b.remove }
                        Button { text: "Change Obj", action: b.changeObj }
                        Button { text: "Change Var", action: b.changeVar }
                        Text
                            content: bind b.delta
                        ListView
                            items: bind b.seq
    }Note: when I change the value, the ListView doesn't change its content, as it is not aware either of any change.
    I haven't investigated to see how to compensate the issue, since that's not the main topic of the thread.

  • Is it possible to send a instance to error hospital for business errors?

    I have a business cenario where if an error is returned from an external service the first time it will automatically retry. The second time it will need to be sent for manual resolution which I was thinking of doing in the error hospital (human intervention) does anyone know if it is possible to send an instance for human-intervention from within the process rather from the fault policies?

    We have an instance where sometimes we are sending embedded tiff images to an external service and if the image is corrupt we need to allow the users to terminate the process. Unfrotunately there are no capabilities to send any notifications (email/sms/fax/voicemail) and need to notify the user of the corrupt image and to terminate the process. We could use a worklist task and but the business have defined this as a support team responsibility and want to use the same manual recovery console for all errors. (activities tab)

  • Is it possible to integrate multiple instances with single OAM (Oracle Acce

    Hi All,
    Please could anyone clarify,is it possible to integrate multiple instance with single OAM(Oracle Access Manager).
    We have two instance in development environment, Among them one is already integrated with OAM 11g,Now we want to integrate the second one with OAM 11g. For this already configured OAM is enough or we need to configure the another OAM separately.
    Application Version is 12.1.1
    Database Version : 11.1.0.7
    OS : RHEL 5.3 64 bit
    Thanks in advance.

    Hi Hussein ,
    I Ran below script,
    ant -f txkEBSAuth.xml \
    -Dwlshosturl=appora.corp.hexaware.com:7021 \
    -Dwlsuser=weblogic \
    -Dwlspwd=password1 \
    -DuseDefaults=true \
    -DforceDataSource=true \
    -DdataSourceName=DEV \
    -DdataSourceJNDIName=jndi/DEV \
    -DasadminUser=SSO11GLOGIN \
    -DasadminPassword=welcome1 \
    -DdbcFile=/u06/oamfmw/Middleware/appsutil/accessgate/DEV/DEV.dbc \
    -DserverName=AdminServer \
    -DdeploymentName=ebsauth_DEV \
    -DfndauthWarFile=/u06/oamfmw/Middleware/appsutil/accessgate/DEV/fndauth.war \
    -DplanPath=/u06/oamfmw/Middleware/appsutil/accessgate/DEV/plan/plan.xml \
    -DforceDeployment=true \
    -DSSOServerRelease=11 \
    -DSSOServerURL=http://appora.corp.hexaware.com:14100 \
    -DWebgateLogoutURL=http://appora.corp.hexaware.com:7780/public/oacleanup.html \
    -DlogConfigfile=/u06/oamfmw/Middleware/appsutil/accessgate/DEV/sample/logging.properties
    -bash: ant: command not found
    Thanks in advance

  • Is it possible to clone an instance without any data?

    Hi,
    Is it possible to clone an instance without any data?
    Say I want to clone an instance to make a new instance on some other server so that the new clone will be same like a fresh installation without any customization and data in it.
    Thanks

    EBS with empty database
    One option you have is to do another fresh install, apply all of the patches that have been applied on the current instance, then use iSetup to migrate your setups from source to target.
    http://docs.oracle.com/cd/E18727_01/doc.121/e12899/toc.htm
    HTH
    Srini

  • Is it possible to find an instance of an object without it being passed to

    Hi all,
    I have a parser class "MessageParser" which i pass a message which is of type "String" to it for it to be parsed. The parsing method signature for the class is
    public void parse(String message);
    I need to pass an instance of "Properties" to it but i dont want to change the signature of the method to add a new argument to it. I have been struggling with this for the last couple of days and have tried a couple of options - see http://stackoverflow.com/questions/5134462/sending-in-an-object-of-type-object-instead-of-string-polymorphism
    The class that calls the parsing method "ParserManager" knows of the properties object. Is there a way for the MessageParser to find the properties object without it being passed to it?
    Thanks
    ps - also posted in http://stackoverflow.com/questions/5140795/is-it-possible-to-find-an-instance-of-an-object-without-it-being-passed-to-the-me

    ziggy wrote:
    I need to pass an instance of "Properties" to it but i dont want to change the signature of the method to add a new argument to it. I have been struggling with this for the last couple of days and have tried a couple of options - see http://stackoverflow.com/questions/5134462/sending-in-an-object-of-type-object-instead-of-string-polymorphism
    The class that calls the parsing method "ParserManager" knows of the properties object. Is there a way for the MessageParser to find the properties object without it being passed to it?I completely agree with Kayaman if you can get away with only the passing the Properties once (as he suggests, at construction time).
    If you can't (ie, you must pass the Properties with each message), then I suspect you have a new type of Parser, and your design will have to reflect that.
    One possibility would be to extend Parser with a PropertiesParser interface that defines a new parse() method and either update the current ParserManager to "understand" the difference, or create a new one.
    The problem with the first option is that the manager then becomes a dispatcher, which kind of goes against the grain of OO programming (what if you need to add a third type of parser, or a fourth?).
    Another possibility (probably better) would be to create a variant of your MessageObject class that includes Properties, and a variant of your MessageCParser that knows how to deal with such an object.
    There are many ways to go, and only you probably know which is best.
    That said, if you can get away with passing the Properties once, definitely follow Kayaman's advice.
    Winston

  • Is it possible to bind 3 T1 circuits for greater bandwidth?

    I have 3 T1 circuits with 3 serial interfaces w/built-in DSU/CSU. Is it possible to bind these 3 circuits to increase the bandwidth?

    Yes. You can group them together under
    a mulitlink interface using MPPP (see the
    multilink-group command).
    You might try a test to compare this performance
    against the performance of just using CEF switching.
    Your BW is still fixed at 3 T1's either way,
    but CEF may respond faster than MPPP.

  • Is it possible to bind spry:region dynamically?

    Using jQuery or Javascript is it possible to bind spry:region to a unique div?
    A case might be that a page passes query parameter which is fetched on body load and passed to a function, which then gets filepath, xpath and binds the spry:region to any div. Is something like this possible

    hi urbashi.......
          it is possible..
           you should first pass the id of he ui element and then bind it.
           for ex:
             if there is an input field, you can get the attribute that is bound, using cl_wd_input_field->bound_value.
             if you want to set an attribute, use cl_wd_input_field->bind_value.
             the first one will give an idea of how a valueshould be given.
    ---regards,
       alex b justin

  • Is it possible to add and instance if of a class as managed bean at runtime

    Greetings,
    I am developing an application where i need to develop an UI (backed by an backingbean). Now this UI can be different based on the back-end data.
    Can i create the instance of a class with all the UI components and set it as a managed bean of a task flow programmatically at runtime?
    Thanks,
    PShah

    The UI Components in a managed bean may created at runtime.
    A managed bean is initialized at runtime, but is required to be created beofre runtime.

  • Is it possible to bind an IB Control to an arbitrary NSView?

    Hi,
    The only "Bind To:" options I see in IB, for a control, are:
    (My) Controller object
    Files's Owner
    Application
    So how I do I bind to a value from any one of my NSViews?
    Thanks
    Steve

    Hi Steve -
    I don't think IB supports binding a view to a view. This might be IB's way of persuading us to use MVC, but in any case I don't think there's a safe way to force the "Bind To:" list to include an object when IB has decided the object is a window or view (You can trick IB, e.g., by adding a NSObject to your xib, then setting its class to NSView, but IB probably won't let you put that view into the hierarchy the way you want). From Using Cocoa Controller Objects in the +IB User Guide+:
    Although you can bind the views of your user interface to any key-value coding (KVC) and key-value observing (KVO) compliant object, it is strongly recommended that you use an intermediate Cocoa controller object to manage the bindings for you.
    I take the above to mean we can make spaghetti bindings in code, but we can't expect IB to cooperate with our plans to subvert MVC.
    \- Ray

  • How can I write an instance of a class in a static variable

    Hi !
    I have an instance of a class
    Devisen dev = new Devisen();
    In an other class I have a static method and I need there the content of some variables from dev.
    public static void abc()
    { String text=dev.textfield.getText()
    I get the errormessage, that the I cannot use the Not-static variable dev in a static variable.
    I understand that I cannot reference to the class Devisen because Devisen is not static I so I had to reference to an instance. But an instance is the same as a class with static methodes. (I think so)
    Is there a possibility, if I am in a static method, to call the content of a JTextField of an instance of a class ?
    Thank you Wolfgang

    Hallo, here is more code for my problem:
    class Login {
       Devisen dev=new Devisen();
    class Devisen {
       JTextField field2;
       if (!Check.check_field2()) return; // if value not okay than return
    class Check {
       public static void check_field2()
         HOW TO GET THE CONTENT OF field2 HERE ?
    One solution ist to give the instance to the static function, with the keyword "this"
    if (!Check.check_field2(this)) return;and get the instance
    public static void check_field2(Devisen dev)BUT is that a problem for memory to give every method an instance of the class ? I have 50 fields to control and I dont want do give every check_method an instance of Devisen, if this is a problem for performance.
    Or do I only give the place where the existing instance is.
    Hmm...?
    Thank you Wolfgang

  • How to pass process instance id to callable object?

    Hello,
    using the SAP NetWeaver CE 7.1 EhP 1 SP 2 I have modeled a small approval workflow with Guided Procedures.
    At runtime, I want to pass the id of the running process instance to a callable object (WD4VC composite view). Is this possible and how?
    Alternatively, is there any way to fetch the id of the current process instance from withina WD4VC composite view?
    Kind regards
    Alexander

    Hi,
    I hope you have executionContext in callable object.
    You can get the ProcessID by calling function "executionContext.getProcessId()".
    Regards,
    Niraj

  • Is it possible to download/Upload more that one AOL objects using FNDLOAD.

    Hi,
    I need to download responsibilities and then its will need to migrate in PRD using fndload.
    in my case, i have more 50 responsibilities. i want to download all responsibilities in one shot using FNDLOAD commnad. same way to upload in other instance in one shot.
    Is it possible to download/upload more than one AOL object like Repsonsibilities,menu, function, lookup, flexfield etc using FNDLOAD in Oracle Apps R12.
    configuration :
    EBS : r12.1.2
    DB : 11gR3.
    Thank you,
    Nitin

    Try this
    $ FNDLOAD apps/apps 0 Y DOWNLOAD $FND_TOP/patch/115/import/afscursp.lct file_name.ldt FND_RESPONSIBILITY RESP_KEY="%SYS%"
    Log filename : L2117062.log
    Report filename : O2117062.out
    $ more L2117062.log
    L2117062.log
    +---------------------------------------------------------------------------+
    Application Object Library: Version : 12.0.0
    Copyright (c) 1979, 1999, Oracle Corporation. All rights reserved.
    module:
    +---------------------------------------------------------------------------+
    Current system time is 25-MAR-2013 11:48:55
    +---------------------------------------------------------------------------+
    Downloading FND_RESPONSIBILITY to the data file file_name.ldt
    Downloaded FND_APPLICATION WMS
    Downloaded FND_RESPONSIBILITY WMS DW_SYSADMIN
    Downloaded FND_RESPONSIBILITY WMS LSP_SYSADMIN_KEY
    Downloaded FND_APPLICATION CS
    Downloaded FND_RESPONSIBILITY CS CS_KB_SYSTEM_ADMIN
    Downloaded FND_RESPONSIBILITY CS CS_KB_SYS_ADMIN
    Downloaded FND_APPLICATION ICX
    Downloaded FND_APPLICATION FND
    Downloaded FND_RESPONSIBILITY ICX SYSTEM_ADMINISTRATION
    Downloaded FND_APPLICATION PA
    Downloaded FND_RESPONSIBILITY PA PROJECTS SYSTEM ADMINISTRATOR
    Downloaded FND_APPLICATION SYSADMIN
    Downloaded FND_RESPONSIBILITY SYSADMIN XX_SYSADMIN_CUSTOM
    Downloaded FND_RESPONSIBILITY SYSADMIN SYSTEM_ADMINISTRATOR
    Downloaded FND_APPLICATION PV
    Downloaded FND_RESPONSIBILITY PV SYS ADMIN
    Downloaded FND_APPLICATION CSS
    Downloaded FND_RESPONSIBILITY CSS CSS_DEF_SYS_ADMIN_RESP
    Downloaded FND_RESPONSIBILITY CSS CSS_DEF_SYS_ADM
    Downloaded FND_APPLICATION FLM
    Downloaded FND_RESPONSIBILITY FLM SYSTEM_ADMINISTRATOR-71451394
    Downloaded FND_APPLICATION GMA
    Downloaded FND_RESPONSIBILITY GMA OPM_SYSTEMS
    Downloaded FND_APPLICATION IBU
    Downloaded FND_RESPONSIBILITY IBU IBU_SYS_ADMIN
    Downloaded FND_APPLICATION IBY
    Downloaded FND_RESPONSIBILITY IBY IBY_OAUI_ADMIN_SYS_RESP
    Downloaded FND_APPLICATION JA
    Downloaded FND_RESPONSIBILITY JA JAI_SYSADMIN
    Downloaded FND_APPLICATION JTF
    Downloaded FND_RESPONSIBILITY JTF JTF_FM_SYSTEM_MANAGER
    Downloaded FND_APPLICATION MSD
    Downloaded FND_RESPONSIBILITY MSD MSD_EOL_SYSADMIN
    Downloaded FND_RESPONSIBILITY MSD MSD_SOP_SYSADMIN
    Downloaded FND_RESPONSIBILITY MSD MSD_SYSADMIN
    Downloaded FND_APPLICATION XDP
    Downloaded FND_RESPONSIBILITY XDP OP_SYSADMIN
    Downloaded FND_RESPONSIBILITY XDP OP_SYS_ADMIN
    Downloaded FND_APPLICATION XNP
    Downloaded FND_RESPONSIBILITY XNP NP_SYS_ADMIN
    Downloaded FND_RESPONSIBILITY XNP NP_SYSADMIN
    Downloaded FND_APPLICATION AHM
    Downloaded FND_RESPONSIBILITY AHM OHM_SYSTEM_ADMINISTRATOR
    Downloaded FND_APPLICATION CN
    Downloaded FND_RESPONSIBILITY CN CN_INC_SYS_ADMIN
    Downloaded FND_APPLICATION IMT
    Downloaded FND_RESPONSIBILITY IMT IMT_SYSADMIN
    Downloaded FND_RESPONSIBILITY IMT IMT_SYS_MONITOR
    +---------------------------------------------------------------------------+
    Concurrent request completed successfully
    Current system time is 25-MAR-2013 11:48:55
    +---------------------------------------------------------------------------+HTH
    Srini

  • How can i have a refrence of a java class object instance in my c++ project

    Hi!
    How can i have a refrence of a java class object instance in my c++ project. Is there a way?

    hahaxia wrote:
    The second question is the big one. The first question is half of the problem of "c++ to java" invocation and access. But the other half which is "java to c++ " invocation and access is still not solved. jni only provide the "java to c++ " DLL invocation Wrong,
    Using JNI your java classes can have methods implemented in C/C++.
    Using JNI you can call java classes.
    There is no other possible interaction between C++ and java, so it does it all.

  • About create instance of a BOR Object

    hi expert
    I do hope any one can help me out of trouble...
    when I want to use a method of a BOR Object, I find the method is an instance dependent method, so I have to create an instance for the BOR Object to initialize the key field, right ? but I do not know how to create , how to use a instance-dependent method.....
    can any one heple me ????

    Hi
    Goto SWO1 Tcode
    enter the main Object (say BUS2032 -sales order)
    press subtype button
    enter ZBus2032 and program(some Z), name, description, application (V) etc
    save ,  activate
    If you want you can create your own method  or event by keeping the cursor on the events or methods
    generate the program, says errors go to the program and generate
    implement the object method and object and release it.
    Now it is available
    Do the delegation type for this object by replacing this Z object in the place of Std object, so that all the methods of std are transferred to the copied one.
    Now creata a Task and use this Object and its method.
    define the triggereing event and define Binding etc and use
    Regards
    Anji

Maybe you are looking for

  • Custom event handler not executing

    Hello. I'm to set an event handler to execute after a user gets added a role. I have my plugin.zip file like this: -lib/(myjar).jar -plugin.xml Plugin.xml looks like this: <?xml version="1.0" encoding="UTF-8" ?> <oimplugins>      <plugins pluginpoint

  • Why can't the finder in Mountain Lion 10.8.2 find files that have successfully downloaded, or that other programs can find?

    Why can't the finder in Mountain Lion 10.8.2 find files that have successfully downloaded, or that other programs can find? This happens with maybe 1 out of 5 files. These are files that have either an ."aa" extention, or or are libraries that icloud

  • Tax code on plant  material and vendor combination

    Hi , I have created Tax code in FTXP and I have maintained conditions in FV11 in combintaion plant,vendor and material combination along with Tax code but while creating PO Tax code is not defaulting automatically. Am I doing correctly or I should do

  • Rename a path in action

    Is it possible to rename a path as part of an action?

  • Playlists and selecting songs

    We have numerous playlists for various members of our family. One person may checkmark only some of the songs in their playlist for download. When they check or uncheck a song, that same action occurs to that song in everyone elses playlist. How do y