ABAP Objects with Workflows / Classes and Instances

Hello,
I am currently designing a workflow using an ABAP-Objects. So far I have been been able to get my Workflow to run with my class, but I have a couple of problems:
- I am using the Function 'SAP_WAPI_START_WORKFLOW' to start other subflows, which enables me to decide which subflow to start at runtime. All of the subflows have standart importing-parameters in their containers, such as the key of my class. In each workflow I instantiate my class using a self-written method, which checks the table T_INSTANCES in my object, and then either returns the object reference to an existing instance or creates a new one. Obviously all of the subflows that I call from my main workflow should be able to find the instance. As far as I can see in their protocolls, this happens without any problems. The problem starts when I make changes to the instance. For example the changing of attributes (with setter methods) seems not to work. After the subflows are finished, in my main workflow, I do not see (with getter methods) any changes that has been made to the object. Is local persistence really limited to one workflow ?
- My second problem is basically about the workflow container in workflow protocoll. In the same workflow, I can change the attributes of my object. Nevertheless, the protocoll always show the initial attribute, even though, my task with the getter-method returns the new value of the attribute.
I appreciate any help and thanks a lot in advance.

Hello Pauls,
Thank you for your answer. I think we are misunderstanding each other. The problem occurs (I think) because my class is not a singleton class. Or am I mistaken ?
When I directly start a subflow from my main workflow, then the instance that I have created in my main workflow is also visible to the subflow. As well as the static table which actually keeps track of the instances. So, in this case the subflows finds the instance and then can use the object as is.
When I start a subflow from my main workflow using the function I mentioned above, then even though the same object key is used, there is a new instance. And the static table (I assume that you mean a static variable from type table, when you say "class table") is completely empty. In this case, my "new" instance is created which overwrites every attribute that I have set in the main workflow, before I started the subflow. More interestingly, my main workflow instantiates another new object, as soon as the subflow has finished. (I am using an event to wait for the subflow to finish.)
On the other hand, I am not quite sure that I understood your approach with refresh and how it could help me. This method is not well documented anywhere, and all of the examples that I have found are about "leave it empty"
As far as I understood, this method is called by the workflow between the steps, when an object is used. I slowly start to think that I need advanced information about Workflows and Memory Management.
Thanks a lot again. Apparently, I am the only person who came across such a problem
Greetz
G.Fendoglu

Similar Messages

  • MapBuilder Error:Can not find a GeoRaster object with specified rdt and rid

    Hello,
    I can't GeoRaster data in the preview of the MapBuilder and MapViewer. The GeoRasterViewer shows the Raster images without problems.
    MapBuilders error message:
    19.11.2008 13:07:11 oracle.sdovis.theme.GeoRasterThemeProducer prepareData
    SCHWERWIEGEND: GeoRaster load Exception:
    oracle.spatial.georaster.GeoRasterException: Can not find a GeoRaster object with specified rdt and rid.
         at oracle.spatial.georaster.JGeoRaster.validateConn(JGeoRaster.java:608)
         at oracle.sdovis.theme.GeoRasterThemeProducer$JGeoRasterGTP.<init>(GeoRasterThemeProducer.java:2037)
         at oracle.sdovis.theme.GeoRasterThemeProducer.prepareData(GeoRasterThemeProducer.java:694)
         at oracle.sdovis.GeoRasterTheme.prepareData(GeoRasterTheme.java:95)
         at oracle.sdovis.LoadThemeData.run(LoadThemeData.java:75)
    19.11.2008 13:07:11 oracle.sdovis.LoadThemeData run
    SCHWERWIEGEND: Exception fetching data for theme RAS_DGK.
    Message:GeoRaster load Exception: Can not find a GeoRaster object with specified rdt and rid.
    Description:
         at oracle.sdovis.theme.GeoRasterThemeProducer.prepareData(GeoRasterThemeProducer.java:1109)
         at oracle.sdovis.GeoRasterTheme.prepareData(GeoRasterTheme.java:95)
         at oracle.sdovis.LoadThemeData.run(LoadThemeData.java:75)
    19.11.2008 13:07:11 oracle.sdovis.MapMaker buildDataMBR
    WARNUNG: null MBR resulted from buildDataMBR.
    The errror message of MapViewer is nearly the same with some more informations about the spatial query and the coordintes of the query window. If I run that spatial query in the sqldeveloper it returns a result!
    I did following stebs:
    - saved a tiff-Image in a GeoRaster table with pyramid an tiled images.
    - checked the sdo_geom_metadata --> they are correct
    - checked the sdo_georaster object for the rdt table name and rasterid --> they are correct
    - checked the rdt table --> objects with that rid are saved
    - checked the mdsys.sdo_geor_sysdata table --> entry is correct
    - validate the geraster with the sdo_geor.validategeoraster function --> object is valid
    - updated the spatial extend of the image and try again the preview functio--> the same error
    The databse server is a virtual Linux server with Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit.
    The web server is a Window 2003 R2 Server with a weblogic server and mapviewer patch 5 (Ver1033p5_B081010).
    For a test I did the same (the same table script, the same raster data, the same import method) on a developer pc (WinXP Pro SP2) with Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 (32bit) the same mapbuilder version but with the MapViewer QuickStartKid and it works fine!!!
    Has anyone an idea?
    Greeting,
    Cord
    Edited by: Corti on Nov 19, 2008 2:14 PM

    Hi Joao,
    Thanks so far.
    I'm previewing a GeoRaster theme. I created it with the MapBuilder GeoRaster wizard. The theme difinition is (out of the export file):
    RAS_DGK|
    null|
    RAS_DGK|
    GEORASTER|
    <?xml version="1.0" standalone="yes"?>
    <styling_rules theme_type="georaster">
    </styling_rules>|
    (GeoRaster table name is "RAS_DGK", theme name is also "RAS_DGK")
    I get following log information:
    preview without a coordinate or scale:
    MapBuilder Error (as pop up): MAPVIEWER 01005: no spatial data to render
    log file:
    20.11.2008 10:17:27 oracle.sdovis.LoadThemeData run
    FEINER: LoadThemeData running thread: Thread-43
    20.11.2008 10:17:27 oracle.sdovis.theme.GeoRasterThemeProducer prepareData
    FEINER: Original query window: -Infinity,-Infinity,NaN,NaN
    20.11.2008 10:17:27 oracle.sdovis.theme.GeoRasterThemeProducer prepareData
    FEINER: [Query] select grt.GEORASTER, grt.GEORASTER.metadata.getClobVal() from RAS_DGK grt
    20.11.2008 10:17:27 oracle.sdovis.theme.GeoRasterThemeProducer prepareData
    FEINER: Fetch size: 100
    20.11.2008 10:17:27 oracle.sdovis.theme.GeoRasterThemeProducer prepareData
    SCHWERWIEGEND: GeoRaster load Exception:
    oracle.spatial.georaster.GeoRasterException: Can not find a GeoRaster object with specified rdt and rid.
         at oracle.spatial.georaster.JGeoRaster.validateConn(JGeoRaster.java:608)
         at oracle.sdovis.theme.GeoRasterThemeProducer$JGeoRasterGTP.<init>(GeoRasterThemeProducer.java:2037)
         at oracle.sdovis.theme.GeoRasterThemeProducer.prepareData(GeoRasterThemeProducer.java:694)
         at oracle.sdovis.GeoRasterTheme.prepareData(GeoRasterTheme.java:95)
         at oracle.sdovis.LoadThemeData.run(LoadThemeData.java:75)
    20.11.2008 10:17:27 oracle.sdovis.LoadThemeData run
    SCHWERWIEGEND: Exception fetching data for theme RAS_DGK.
    Message:GeoRaster load Exception: Can not find a GeoRaster object with specified rdt and rid.
    Description:
         at oracle.sdovis.theme.GeoRasterThemeProducer.prepareData(GeoRasterThemeProducer.java:1109)
         at oracle.sdovis.GeoRasterTheme.prepareData(GeoRasterTheme.java:95)
         at oracle.sdovis.LoadThemeData.run(LoadThemeData.java:75)
    20.11.2008 10:17:27 oracle.sdovis.MapMaker buildDataMBR
    WARNUNG: null MBR resulted from buildDataMBR.
    preview with a center coordinate of the image and a scale:
    20.11.2008 10:18:43 oracle.sdovis.SRS getOptimalQueryWindow
    AM FEINSTEN: *** isGeodetic=false, unit=METER
    20.11.2008 10:18:43 oracle.sdovis.LoadThemeData run
    FEINER: LoadThemeData running thread: Thread-45
    20.11.2008 10:18:43 oracle.sdovis.theme.GeoRasterThemeProducer prepareData
    FEINER: Original query window: 2550045.7746478873,5608500.0,2551954.2253521127,5609500.0
    20.11.2008 10:18:43 oracle.sdovis.theme.GeoRasterThemeProducer prepareData
    FEINER: [Query] select grt.GEORASTER, grt.GEORASTER.metadata.getClobVal() from RAS_DGK grt WHERE MDSYS.SDO_FILTER(grt.GEORASTER.spatialextent, MDSYS.SDO_GEOMETRY(2003, 31466, NULL, MDSYS.SDO_ELEM_INFO_ARRAY(1, 1003, 3), MDSYS.SDO_ORDINATE_ARRAY(?,?,?,?)), 'querytype=WINDOW') = 'TRUE'
    20.11.2008 10:18:43 oracle.sdovis.theme.GeoRasterThemeProducer prepareData
    FEINER: Fetch size: 100
    20.11.2008 10:18:43 oracle.sdovis.theme.GeoRasterThemeProducer prepareData
    SCHWERWIEGEND: GeoRaster load Exception:
    oracle.spatial.georaster.GeoRasterException: Can not find a GeoRaster object with specified rdt and rid.
         at oracle.spatial.georaster.JGeoRaster.validateConn(JGeoRaster.java:608)
         at oracle.sdovis.theme.GeoRasterThemeProducer$JGeoRasterGTP.<init>(GeoRasterThemeProducer.java:2037)
         at oracle.sdovis.theme.GeoRasterThemeProducer.prepareData(GeoRasterThemeProducer.java:694)
         at oracle.sdovis.GeoRasterTheme.prepareData(GeoRasterTheme.java:95)
         at oracle.sdovis.LoadThemeData.run(LoadThemeData.java:75)
    20.11.2008 10:18:43 oracle.sdovis.LoadThemeData run
    SCHWERWIEGEND: Exception fetching data for theme RAS_DGK.
    Message:GeoRaster load Exception: Can not find a GeoRaster object with specified rdt and rid.
    Description:
         at oracle.sdovis.theme.GeoRasterThemeProducer.prepareData(GeoRasterThemeProducer.java:1109)
         at oracle.sdovis.GeoRasterTheme.prepareData(GeoRasterTheme.java:95)
         at oracle.sdovis.LoadThemeData.run(LoadThemeData.java:75)
    20.11.2008 10:18:43 oracle.sdovis.DBMapMaker renderEm
    INFO: **** time spent on loading features: 234ms.
    20.11.2008 10:18:43 oracle.sdovis.RenderingEngine prepareForRendering
    AM FEINSTEN: xfm: 0.284 0.0 0.0 -0.284 -724212.9999999999 1593097.9999999998
    20.11.2008 10:18:43 oracle.sdovis.ImageRenderer renderGeoRasterTheme
    WARNUNG: GeoRaster theme RAS_DGK has no rendered images.
    20.11.2008 10:18:43 oracle.sdovis.VectorRenderer render
    FEINER: time to render theme RAS_DGK with 0 styled features: 0ms
    20.11.2008 10:18:43 oracle.sdovis.DBMapMaker renderEm
    INFO: **** time spent on rendering: 16ms
    If I run the sql statement in the log file, it returns a result.
    select grt.georid, grt.GEORASTER, grt.GEORASTER.metadata.getClobVal()
    from ras_dgk grt
    WHERE MDSYS.SDO_FILTER(grt.GEORASTER.spatialextent,
    MDSYS.SDO_GEOMETRY(2003, 31466, NULL,
    MDSYS.SDO_ELEM_INFO_ARRAY(1, 1003, 3),
    MDSYS.SDO_ORDINATE_ARRAY(2550045.7746478873,5608500.0,2551954.2253521127,5609500.0)), 'querytype=WINDOW') = 'TRUE';
    GEORID
    2
    GEORASTER
    MDSYS.SDO_GEORASTER(20001,MDSYS.SDO_GEOMETRY(2003,31466,null,MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,3),MDSYS.SDO_ORDINATE_ARRAY(2550000,5608000,2552000,5610000)),RDT_RAS_DGK,522,oracle.xdb.XMLType@194a7ec)
    GEORASTER.metadata.getClobVal()
    <georasterMetadata xmlns="http://xmlns.oracle.com/spatial/georaster">
    <objectInfo>
    <rasterType>20001</rasterType>
    <isBlank>false</isBlank>
    <defaultRed>1</defaultRed>
    <defaultGreen>1</defaultGreen>
    <defaultBlue>1</defaultBlue>
    </objectInfo>
    <rasterInfo>
    <cellRepresentation>UNDEFINED</cellRepresentation>
    <cellDepth>8BIT_U</cellDepth>
    <totalDimensions>2</totalDimensions>
    <dimensionSize type="ROW">
    <size>6299</size>
    </dimensionSize>
    <dimensionSize type="COLUMN">
    <size>6299</size>
    </dimensionSize>
    <ULTCoordinate>
    <row>0</row>
    <column>0</column>
    </ULTCoordinate>
    <blocking>
    <type>REGULAR</type>
    <totalRowBlocks>4</totalRowBlocks>
    <totalColumnBlocks>4</totalColumnBlocks>
    <rowBlockSize>2048</rowBlockSize>
    <columnBlockSize>2048</columnBlockSize>
    </blocking>
    <interleaving>BSQ</interleaving>
    <pyramid>
    <type>DECREASE</type>
    <resampling>NN</resampling>
    <maxLevel>6</maxLevel>
    </pyramid>
    <compression>
    <type>NONE</type>
    </compression>
    </rasterInfo>
    <spatialReferenceInfo>
    <isReferenced>true</isReferenced>
    <SRID>31466</SRID>
    <modelCoordinateLocation>UPPERLEFT</modelCoordinateLocation>
    <modelType>FunctionalFitting</modelType>
    <polynomialModel rowOff="0" columnOff="0" xOff="0" yOff="0" zOff="0" rowScale="1" columnScale="1" xScale="1" yScale="1" zScale="1">
    <pPolynomial pType="1" nVars="2" order="1" nCoefficients="3">
    <polynomialCoefficients>17668678.695368 0 -3.14949718277477</polynomialCoefficients>
    </pPolynomial>
    <qPolynomial pType="1" nVars="0" order="0" nCoefficients="1">
    <polynomialCoefficients>1</polynomialCoefficients>
    </qPolynomial>
    <rPolynomial pType="1" nVars="2" order="1" nCoefficients="3">
    <polynomialCoefficients>-8031218.31607409 3.14949718277477 0</polynomialCoefficients>
    </rPolynomial>
    <sPolynomial pType="1" nVars="0" order="0" nCoefficients="1">
    <polynomialCoefficients>1</polynomialCoefficients>
    </sPolynomial>
    </polynomialModel>
    </spatialReferenceInfo>
    <layerInfo>
    <layerDimension>BAND</layerDimension>
    <subLayer>
    <layerNumber>1</layerNumber>
    <layerDimensionOrdinate>0</layerDimensionOrdinate>
    <layerID>1</layerID>
    <colorMap>
    <colors>
    <cell value="0" blue="255" red="255" green="255" alpha="255"/>
    <cell value="1" blue="0" red="0" green="0" alpha="255"/>
    </colors>
    </colorMap>
    </subLayer>
    </layerInfo>
    </georasterMetadata>
    I checked also the content of rdt table and it contains entries with that raster id (= 522).
    Finally the log file when I use the preview directly on the GeoRaster table without a theme:
    20.11.2008 10:23:46 oracle.sdovis.LoadThemeData run
    FEINER: LoadThemeData running thread: Thread-55
    20.11.2008 10:23:46 oracle.sdovis.theme.GeoRasterThemeProducer prepareData
    FEINER: Original query window: -Infinity,-Infinity,NaN,NaN
    20.11.2008 10:23:46 oracle.sdovis.theme.GeoRasterThemeProducer prepareData
    FEINER: [Query] select grt.GEORASTER from RAS_DGK grt where grt.GEORASTER.rasterid = ? and grt.GEORASTER.rasterdatatable = ?
    20.11.2008 10:23:46 oracle.sdovis.theme.GeoRasterThemeProducer prepareData
    FEINER: Fetch size: 100
    20.11.2008 10:23:46 oracle.sdovis.theme.GeoRasterThemeProducer prepareData
    SCHWERWIEGEND: GeoRaster load Exception:
    oracle.spatial.georaster.GeoRasterException: Can not find a GeoRaster object with specified rdt and rid.
         at oracle.spatial.georaster.JGeoRaster.validateConn(JGeoRaster.java:608)
         at oracle.sdovis.theme.GeoRasterThemeProducer$JGeoRasterGTP.<init>(GeoRasterThemeProducer.java:2037)
         at oracle.sdovis.theme.GeoRasterThemeProducer.prepareData(GeoRasterThemeProducer.java:694)
         at oracle.sdovis.GeoRasterTheme.prepareData(GeoRasterTheme.java:95)
         at oracle.sdovis.LoadThemeData.run(LoadThemeData.java:75)
    20.11.2008 10:23:46 oracle.sdovis.LoadThemeData run
    SCHWERWIEGEND: Exception fetching data for theme RAS_DGK.
    Message:GeoRaster load Exception: Can not find a GeoRaster object with specified rdt and rid.
    Description:
         at oracle.sdovis.theme.GeoRasterThemeProducer.prepareData(GeoRasterThemeProducer.java:1109)
         at oracle.sdovis.GeoRasterTheme.prepareData(GeoRasterTheme.java:95)
         at oracle.sdovis.LoadThemeData.run(LoadThemeData.java:75)
    20.11.2008 10:23:46 oracle.sdovis.MapMaker buildDataMBR
    WARNUNG: null MBR resulted from buildDataMBR.
    If you need more information - please ask for it.
    Cord

  • Part interchangeability with FFF class and FFFC - HERB material type

    Experts-
    Have you worked with Part interchangeability with FFF class and FFFC or HERB material type?
    I am looking for cross-reference functionality for interchangeable materials from maintenance/service perspective. We have users changing manufacturer's part number as and when needed and maintaining cross-reference via classification. Maintaining SAP part number and HERS is too much data maintenance, so we are looking for simple solution.
    We are in standard ECC 6.0. (No APO). I checked OSS 181764, but it doesn't help us in instructions for enhancement.
    If this needs activation for DIMP or A&D, do you know enhancement for this?
    Thanks for your help.
    RP

    Hi
    I have been involved with a client who is interested to know the implementation of FFF functionality. Can you share your experience  in a bit more details.
    The client is interested in using parts where multiple models are available in the market and few of them are interchangeable. They would like to purchase it as an asset and then manage the inventory as non valued material. How does it work throuh the APO for forecasting and demand planning functionalities.
    Thanks in advance.

  • Hello. I need to define a mesure in a picture: I took a picture of an object with a ruler and I want to signify to photoshop "this segment = 1 cm". How to do? Thank you!

    Hello. I need to define a mesure in a picture: I took a picture of an object with a ruler and I want to signify to photoshop "this segment = 1 cm". How to do? Thank you!

    That's a good precaution, norm.  It should be no problem is you have an object on a flat surface next to a ruler. It gets trickier in security camera frames.
    Anyway that is one example. Anne can look further into the measuring tools of  Photoshop Extended to see if it helps.
    A note on the screen resolution thing. When I calculate the screen resolution, I go into Photoshop > Preferences > Units and Rulers
    and enter it here in place of the default 72 ppi.  Then when I use View > Print Size, the on-screen rulers will match a physical ruler.
    That's if you wanted to look at the actual printed document size onscreen.
    Gene

  • How to spin an object with both x and z-rotation in M3G?

    I want to spin an object with both x and z-rotation in M3G. I get a good result when I implement this in OpenGL, but the combined rotation doesn't get right when I try to do this in M3G. The x rotation and the z rotation looks like they should when I only use one of them. This is achieved by adding only spinAnimationTrack or rotationAnimationTrack. The problem is that the rotation gets messed up when I add both spinAnimationTrack and rotationAnimationTrack. What am I doing wrong? This is my code:
    KeyframeSequence spinKeyframes =
    new KeyframeSequence(3, 4, KeyframeSequence.SLERP);
    spinKeyframes.setRepeatMode(KeyframeSequence.LOOP);
    spinKeyframes.setDuration(4000);
    spinKeyframes.setKeyframe(0, 0,
    getRotationQuaternion(-50.0f, new float[]{1.0f, 0.0f, 0.0f}));
    spinKeyframes.setKeyframe(1, 2000,
    getRotationQuaternion(50.0f, new float[]{1.0f, 0.0f, 0.0f}));
    spinKeyframes.setKeyframe(2, 4000,
    getRotationQuaternion(-50.0f, new float[]{1.0f, 0.0f, 0.0f}));
    AnimationTrack spinAnimationTrack =
    new AnimationTrack(spinKeyframes,
    AnimationTrack.ORIENTATION);
    AnimationController animatorS = new AnimationController();
    spinAnimationTrack.setController(animatorS);
    animatorS.setSpeed(0.4f * speed, 0);
    KeyframeSequence rotationKeyframes =
    new KeyframeSequence(2, 4, KeyframeSequence.SLERP);
    rotationKeyframes.setRepeatMode(KeyframeSequence.LOOP);
    rotationKeyframes.setDuration(4000);
    rotationKeyframes.setKeyframe(0, 0,
    getRotationQuaternion(359.0f, new float[]{0.0f, 0.0f, 1.0f}));
    rotationKeyframes.setKeyframe(1, 4000,
    getRotationQuaternion(0.0f, new float[]{0.0f, 0.0f, 1.0f}));
    AnimationTrack rotationAnimationTrack1 =
    new AnimationTrack(rotationKeyframes,
    AnimationTrack.ORIENTATION);
    rotationAnimationTrack1.setController(animatorR1);
    animatorR1.setSpeed(0.4f * speed, 0);
    mesh1.addAnimationTrack(spinAnimationTrack);
    mesh1.addAnimationTrack(rotationAnimationTrack1);

    People often make this harder than it is. It's usually not necessary to using clipping paths or to make cuts confined to the areas of overlap to make objects appear to intertwine. Usually, you can simply cut where objects do not overlap. There are no masks, clipping paths, pathfinders, etc., involved in this knot:
    Your specific situation may be somewhat complicated by the use of drop shadows, depending on the specific parameters.
    JET

  • Abap Objects With or Without persistence

    Hi forum!
    I'm looking for examples of abap OO programs with BD interaction using persistence or not, when do you suggest to use persistence in abap programing?, and, when i do easy reports?, i'm working in R3 enterprise 4.7 basis 6.20.
    Thanks in advance,
    John.

    I think it depend on your requirement.
    I have some experience on persistence class.
    It will generate a class combine with a table, and you can populate the table with this class, include select, insert, modify.
    It offer you a way to populate table in a OO way.
    But unfortunatly, single persistence class can only combine one table. And after you save the combine relation of the class and table, it is difficult to do further change.
    So if your application need to populate multiple table in same time, and do some join select, persistence class won't help too much.
    I think BO (business object) will be helpful to you.
    If you don't want to access the relate table directly.
    But BO is not a OO way.
    thanks

  • Class And instance name

    how can i access a movieclip via a instance name in 1 class file (Not The Main Document)
    And Make The class reconize  the movieclip when i use a code like this :   this.y = player.y
    player is the instance name.
    thanks

    Already I had seen some thread over the forum and did not have a proper solution for this, but after a long hours I found a solution with the minimal effort:
    1. Create a flash file with a single movieclip named instance testMC
    2. On the timeline write the following code to declare Object of the class
        var obj:TestingAccess=new TestingAccess(stage);
       Here you should pass the stage as an argument to the constructor of the class
    3. Create a class file and write the following code:
       package  {
        import flash.display.MovieClip;
        import flash.events.Event;
        import flash.display.Sprite;
        import flash.display.Stage;
        public class TestingAccess extends MovieClip {
            var stagRef:Stage;
            var rootMC:MovieClip;
            public function TestingAccess(stag:Stage) {
                // constructor code
                stagRef=stag;
                rootMC=MovieClip(stagRef.getChildAt(0));
                rootMC.testMC.rotation=45;
        }//Class
    }//Package
    I Just a made a rotation for that Movieclip. It works

  • Question about abstract classes and instances

    I have just read about abstract classes and have learned that they cannot be instantiated.
    I am doing some exercises and have done a class named "Person" and an abstract class named "Animal".
    I want to create a method in "Person" that makes it possible to set more animals to Person objects.
    So I wrote this method in class Person and compiled it and did not get any errors, but will this work later when I run the main-method?
    public void addAnimal(Animal newAnimal)
         animal.add(newAnimal);
    }Is newAnimal not an instance?

    Roxxor wrote:
    Ok, but why is it necessary with constructors in abstract classes if we don�t use them (because what I have understand, constructors are used to create objects)?Constructors don't create objects. The new operator creates objects. An object's c'tor is invoked after the object has already been created. The c'tors job is to initialize the newly-created object to a valid state. Whenever a child object is created, the parent's c'tor is run before the child's c'tor, so that by the time we're inside the child's c'tor, setting up the child's state, we know that the parent (or rather the "parent part" of the object we're initializing) is in a valid state.
    Constructor rules:
    1) Every class has at least one ctor.
    1.1) If you do not define an explicit constructor for your class, the compiler provides a implicit constructor that takes no args and simply calls super().
    1.2) If you do define one or more explicit constructors, regardless of whether they take args, then the compiler no longer provides the implicit no-arg ctor. In this case, you must explicitly define a public MyClass() {...} if you want one.
    1.3) Constructors are not inherited.
    2) The first statement in the body of any ctor is either a call to a superclass ctor super(...) or a call to another ctor of this class this(...) 2.1) If you do not explicitly put a call to super(...) or this(...) as the first statement in a ctor that you define, then the compiler implicitly inserts a call to super's no-arg ctor super() as the first call. The implicitly called ctor is always super's no-arg ctor, regardless of whether the currently running ctor takes args.
    2.2) There is always exactly one call to either super(...) or this(...) in each constructor, and it is always the first call. You can't put in more than one, and if you put one in, the compiler's implicitly provided one is removed.

  • JNDI lookup couldn't find any objects in MBean class and -userThreads issue

    Hi,
    We had used some MBean classes in a jboss j2ee project. Now we need to migrate it to oc4j. We also need to use Thread class and jndi looking up in these MBean classes.
    I encountered two problems when I migrate these MBeans.
    1. The first problem is:
    If I create a InitialContext object just like the following:
    InitialContext result = new InitialContext();
    Then I lookup an ejb,I can't find anything from this InitialContext.
    However,If I create a InitialContext object just like below:
    Properties props = new Properties();
    props.put( Context.PROVIDER_URL, "***" );
    props.put( Context.INITIAL_CONTEXT_FACTORY, "***");
    //props.put( Context.URL_PKG_PREFIXES, "***" );
    props.put( Context.SECURITY_PRINCIPAL, "***");
    props.put( Context.SECURITY_CREDENTIALS, "***" );
    InitialContext result = new InitialContext(props);
    I can find that ejb. Why?
    Is it possible to get InitialContext just like InitialContext result = new InitialContext()?
    2. The second problem is:
    I had used a thread class to do the above mentioned jndi looking up in one MBean method. This method is not be invoked by oc4j EM. It is invoked by another class. There is an exception throws just like below:
    javax.naming.NamingException: Not in an application scope - start OC4J with the -userThreads switch if using user-created threads
    I had add -userThreads argument in the startup command just like below:
    java -Xdebug -Xnoagent -Djava.compiler=NONE -Doc4j.jmx.security.proxy.off=true -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=4000 -Dnl=en_US %JAVA_OPTS% %JAVA_SYSPROP% -jar %ORACLE_HOME%/j2ee/home/oc4j.jar
    -userThreads
    Does anyone know why there is an jndi problem in MBean class?
    Thanks,
    Eternal

    Hi,
    We had used some MBean classes in a jboss j2ee project. Now we need to migrate it to oc4j. We also need to use Thread class and jndi looking up in these MBean classes.
    I encountered two problems when I migrate these MBeans.
    1. The first problem is:
    If I create a InitialContext object just like the following:
    InitialContext result = new InitialContext();
    Then I lookup an ejb,I can't find anything from this InitialContext.
    However,If I create a InitialContext object just like below:
    Properties props = new Properties();
    props.put( Context.PROVIDER_URL, "***" );
    props.put( Context.INITIAL_CONTEXT_FACTORY, "***");
    //props.put( Context.URL_PKG_PREFIXES, "***" );
    props.put( Context.SECURITY_PRINCIPAL, "***");
    props.put( Context.SECURITY_CREDENTIALS, "***" );
    InitialContext result = new InitialContext(props);
    I can find that ejb. Why?
    Is it possible to get InitialContext just like InitialContext result = new InitialContext()?
    2. The second problem is:
    I had used a thread class to do the above mentioned jndi looking up in one MBean method. This method is not be invoked by oc4j EM. It is invoked by another class. There is an exception throws just like below:
    javax.naming.NamingException: Not in an application scope - start OC4J with the -userThreads switch if using user-created threads
    I had add -userThreads argument in the startup command just like below:
    java -Xdebug -Xnoagent -Djava.compiler=NONE -Doc4j.jmx.security.proxy.off=true -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=4000 -Dnl=en_US %JAVA_OPTS% %JAVA_SYSPROP% -jar %ORACLE_HOME%/j2ee/home/oc4j.jar
    -userThreads
    Does anyone know why there is an jndi problem in MBean class?
    Thanks,
    Eternal

  • How to make an object of inner class and use it ?

    Hi tecs,
    In my JSF application i have a need to make an inner member class in one of my bean class.
    How can i make the object of this class?(what should be the entry in faces-config)
    And there are text box and check box (in the JSP) associated with the elements of this inner class. What should be the coding in JSP so that elements in the JSP can be linked with the corresponding members of the inner class ?
    Plz help.
    Thnx in advance.

    Hi
    I am havin 10 text boxes in my application.
    But out of 10 , 3 will be always together(existence of one is not possible without the other two.)
    Now i want to create a vector of objects ( here object will consist of the value corresponding to these three boxes),there can be many elements in this vector.
    So i m thinking to make an inner class which have three String variables corresponding to these text boxes that exists together.
    What can b done ?

  • Abap Objects generating List Trees and Grids

    Hi Friends,
      Please provide me the Information for how to work with ABAP OBJECTS creating(and manipulating)the combination of List Trees and Grids.
    Regards,
    Sowjanya

    There are a couple of examples programs,  You can start by checking out transaction DWDM for some of the basic ABAP oo controls.  You can also check out any program which begins with BCALV* for examlple of ALV grids, trees, and lists.
    REgards,
    Rich Heilman

  • How to register RMI object with runnign Weblogic Server instance?

    I need to write some RMI objects(non EJB) and register it with the already running weblogic server so that I can access them from a RMI client.
    Can some help me with this?

    So more precisely the way I am doing it is
    I have a remote interface
    package com.myserv.rmi;
    public interface NSPQueryExecutionService extends java.rmi.Remote
    public void getQueryExecutionDelegate();
    I have the Implementation as
    package com.myserv.rmi;
    import java.util.Properties;
    import javax.naming.Context;
    import javax.naming.InitialContext;
    public class NSPQueryExecutionServiceImpl
    implements NSPQueryExecutionService
    public static final void main (String[] arg) {
    try {
    Properties properties = null;
    properties = new Properties();
    properties.put (Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
    Context context = new InitialContext(properties);
    context.bind("QueryExecutionService", new NSPQueryExecutionServiceImpl());
    System.out.println("================================> QueryExecutionService Bound");
    } catch (Exception ex){
    ex.printStackTrace();
    System.out.println("Unable to start QueryExecutionService");
    public NSPQueryExecutionServiceImpl()
    public void getQueryExecutionDelegate()
    System.out.println("inside remote");
    I compile these classes and I do a weblogic.rmic as
    java weblogic.rmic com.myserv.rmi.NSPQueryExecutionServiceImpl
    I run the NSPQueryExecutionServiceImpl class to bind the RMIObject with the weblogic server.
    Finally when I try to access this from my client it is able to access the object but when I invoke an operation on it gives the exception that RJVM is already shutdown.
    Edited by kuldeep.sharma at 02/15/2007 9:37 AM

  • Help with Runtime class and timeout of Process

    Hi,
    Question regarding using Runtime class, and yes I have looked at the javadocs, but I am still confused and frustrated.
    Here is part of my code.
    Process p;
    Runtime runtime = Runtime.getRuntime();
    p = runtime.exec("rsh localhost ls");
    if you are not familiar with rsh all it does is remote shell into the computer localhost and executes the command ls.
    Now, I dont have rsh running on my computer so it will hang at that line for about 40 sec and eventually time out on its own. Is there anyway I can specify a timeout argument like there is for the ping command? Like if there is no response from localhost after 3 sec, then just kill the process?
    I looked at the Runtime javadoc and Process javadoc and the closest thing I could come to with is something to do with envp (environment parameters), but I dont know what that is.
    Thanks guys.

    You can't timeout the "runtime.exec("rsh localhost ls");" call but if you execute the call in a seperate thread you can "timeout" and continue executing on the original thread (while letting the "runtime" thread to timeout on its own).
    Check the following class that I created for cases like this:
    abstract public class TimeoutHelper implements Runnable
        private Throwable error;
        private boolean running = true;
        private Object retValue;
        protected String name;
        private long waitTime;
        private Thread thread;
         * Creates a new helper. Use {@link #start} to run the code.
         * @param name A name that will be used in the helper thread name
         * @param waitTime The time (in msec) to wait before timeout.
        public TimeoutHelper(String name, long waitTime)
            this.name = name;
            this.waitTime = waitTime;
        public Object start() throws Throwable
            return asyncExecute();
        abstract protected Object execute() throws Throwable;
        private synchronized Object asyncExecute() throws Throwable
            createThread().start();
            if (running)
                try
                    wait(waitTime);
                    if (running)
                        // Timeout!!
                        abortThread();
                        throw new TimeOutException("Timeout for: " + name);
                catch (InterruptedException ie)
                    // Ignore
            if (error != null)
                throw error;
            return retValue;
        private void abortThread()
            if (thread != null)
                thread.interrupt();
        protected Thread createThread()
            thread = new Thread(this, name);
            return thread;
        public void run()
            try
                retValue = execute();
            catch (Throwable th)
                error = th;
            synchronized (this)
                running = false;
                notifyAll();
    }You use the class by extending it and implementing "execute". For example:
            TimeoutHelper helper = new TimeoutHelper("Runner", 5000)
                protected Object execute() throws Throwable
                    Runtime runtime = Runtime.getRuntime();
                    return runtime.exec("rsh localhost ls");
            try
                Process p = (Process)helper.start();
            catch (TimeOutException e)
                // Handle timeout here
            catch (Exception e)
                // Handle other errors here.
            }

  • Object with multiple states and slider in folio are rasterized, settings seem correct.

    I am having trouble keeping An object with multiple text states from being rasterized, as well as a slider that is also rastering.
    I have read that you are supposed to set the folio and article up to be .pdf and that the slider should have the vector option chosen.
    I haven't found anything for the multi state object to for these settings.
    What happens is when I output the folio to Adobe Content Viewer, only the text in those items is rasterized. All other text is crisp. Tested on both iPad Mini and iPad Retina and the both are blurry.
    Is there a way to force the vector option? It seems even with the correct options selected it is still rastering the test in interactive elements.
    Thanks!

    Here is the MSO with the folio.
    Here is the Slider with folio overlays panel.

  • Write message to Job log with message class and message number

    hi folk,
    When running a background job I'm able to write a message to the job log using the statement - Message "some text..." type 'I'.
    In the Job log I can see the message "some text.." with a "default" message class and message number (but in my report i don't specify any message ID) so I have no idea it comes from.
    Then I try to send a message where I specify the message class/number etc...using message id 'Z1' number 000 with "some text..." In the job log I now can see the "right" message class "Z1" and the number 000, but the message is empty?
    Please advice how to write a message with the message class and message number.
    Best regards
    LinhNg

    Hi Linh,
    How did you provide the text "Some message"? Did you hard code it or used a text element?
    Regards,
    Immanuel.

Maybe you are looking for

  • Capturing Outbound Interface (In UDF)

    Hi, I have designed a Outbound Interface: <?xml version="1.0" encoding="UTF-8"?> <MT_DMS_FINAL>    <Record>       <Row>          <FirstName/>       </Row>    </Record> </MT_DMS_FINAL> Now i write a Adapter Module to get the File name when the Sender

  • Saved texts deleted after turning iMessage off

    All my saved texts were deleted after I turned iMessage off.  Anyone know why and how to get messages back without restoring?

  • Wich objecttype for coloms should i use for storing different types of file

    Hello, Could someone tell me which objecttype i should use for a colom in a table that is used to store any type of files, by example: bmp,doc,txt,jpg etc. I'm thinking of a BLOB or CLOB, because i think that those types are for such kind of files, b

  • How to make 1 Library out of 3?

    Hi, I got 3 different Libraries and want to put them all together now into one. Is there a easy way to do that? Or do I have to export each one (ca. 100GB) and then Import again?? Thanks R

  • Fetch data from SAP Standard Reports

    Hi, I want to fetch the data of internal Table from SAP-Standard Reports. After than I can use in different report of these data. So Please guide me how to do this. How to fetch the data for use in different programs at run time of new object. Thanks