How to access data in an instance of a class?

I have a class LoadXML, that charge and extracts data from an XML file. I use these data to my main class by creating a new class of LoadXML. I now want to use these data for my other classes but without having to create another instance of LoadXML. As global variables do not exist in A3, I tried creating LoadXML methods get and back then these values into variables in the desired classes. This is how I have tried:

public class ProductSummaryLabel extends Sprite
{  
   public var loadXML : LoadXML; 
  private var xmlData: XML = loadXML.getXMLData(); // BRINGS BACK ERROR
  private var uebersicht : Array;
  private var website : Array;
  private var numOfProducts : int;  
  private var numOfCategories : int;
   
  //____________________________________________________________________________Constructor
  
  public function ProductSummaryLabel() : void
  { 
     numOfCategories = loadXML.getNumOfCategories(); // THIS BRINGS BACK AN ERROR
     trace("number of categories" + numOfCategories);
  }

That's what my LoadXML class looks like:

public class LoadXML extends EventDispatcher 
{
  //__________________________________________________________________________XML vars
 
  private var loader : URLLoader = new URLLoader();
  private var productPath : URLRequest = new URLRequest("produkte1.xml");
  public var xmlData : XML = new XML();
  public var maxProducts : int;
  public var numOfProducts : int;
  public var numOfCategories : int;
  //____________________________________________________________________________Arrays
      
   public var kategorie : Array = new Array();
   public var hintergrund : Array = new Array(); 
   public var titel : Array = new Array(); 
   public var pfad : Array = new Array(); 
   public var website : Array = new Array();
   public var uebersicht : Array = new Array();
   
  //__________________________________________________________________________Constructor
  
  
  // Load XML text data
  public function LoadXML() : void
  { 
   loader.addEventListener(Event.COMPLETE, extractXMLdata);  // Specifies which data to load
   loader.addEventListener(IOErrorEvent.IO_ERROR, handleXMLError);
   
   try 
   {
    loader.load(productPath);
    trace("Step 1: Product path loaded correctly.");
    trace("Product path: " + productPath);
   }
   catch(e : Error)
   {
    trace("Error loading file");
   }
  }
  
  //__________________________________________________________________________Methods
  
  private function extractXMLdata(e:Event) : void
  { 
   // Extract data
   trace("Step 2: Data extracted");
   
   // The reference to e.target below refers to the object that loaded the XML file. 
          xmlData = new XML(e.target.data);
   trace("XML Data assigned as target data.");
   ParseData(xmlData);
  }
  
  private function ParseData(dat : XML) : void
       {
   numOfProducts = xmlData.*.length();
   trace("Number of Products (LoadXML class): " + numOfProducts);

  trace("Step 3: Parsing data.");
  
   for (var i: uint = 0; i < numOfProducts; i++)
   {
    // This was in the wrong format: kategorie[i] = xmlData.produkte.produkt.kategorie.attributes()[i];
    kategorie[i] = xmlData.produkt[i].kategorie;
    website[i] = xmlData.produkt[i].website;
    uebersicht[i] = xmlData.produkt[i].uebersicht;
    hintergrund[i] = xmlData.produkt[i].bild.hintergrund;
    titel[i] = xmlData.produkt[i].bild.titel;
    pfad[i] = xmlData.produkt[i].bild.pfad;
    trace("\n Data Parsed for Array " + i);
   }

 // When LoadXML class loaded, load onBackgr() from Main class
    dispatchEvent(new Event(Event.COMPLETE));

  }
  
  
  //__________________________________________________________________________________ Getters
  
  public function getXMLData(): XML
  {
   return xmlData;
  }
    public function getCategory(): Array
  {
   return kategorie;
  }
  
(... rest of get methods)

  
  //____________________________________________________________________________Error catching
  
  private function handleXMLError( event:IOErrorEvent ):void 
       {
         trace("Fehler beim Aufrufen von XML.");
       }
 }
}

Instead of Globals, you can use a class with the static member variable

class GlobalVars

{

public static var MyVar: VarType.

}

and you can get and set the value of MyVar where each at any time like this

GlobalVars.MyVar

Tags: Adobe Animate

Similar Questions

  • How can access data in the rman 'daily.log' output file

    Hi all

    I used the following question for rman out
    the output file "daily.log" has been created, but there is no data.

    How can access the data in the output file 'daily.log '.


    bash-3. $00 sh rmant.sh

    Recovery Manager: release 10.2.0.3.0 - Production Thu Jun 30 16:54:16 2011

    Copyright (c) 1982, 2005, Oracle. All rights reserved.

    connected to target database: DEV (DBID = 45558086)

    RMAN > Journal of coil to daily.log;
    2 > run
    3 > {}
    4 > backup databas.
    {5 >}
    6 > spool log off;
    7 >
    Winding began in the log file: daily.log

    Recovery Manager10.2.0.3.0

    From backup 30 June 11
    using the control file of the target instead of recovery catalog database
    allocated channel: ORA_DISK_1
    channel ORA_DISK_1: sid = 634 devtype = DISK
    channel ORA_DISK_1: additional start-up compressed 0 datafile backupset
    channel ORA_DISK_1: specifying datafile (s) in backupset
    input datafile fno = name=/u02/proddata/a_int01.dbf 00014
    input datafile fno = name=/u02/proddata/a_txn_data01.dbf 00022
    input datafile fno = name=/u02/proddata/a_txn_data02.dbf 00023
    input datafile fno = name=/u02/proddata/a_txn_data03.dbf 00024
    input datafile fno = name=/u02/proddata/a_txn_data04.dbf 00039
    input datafile fno = name=/u02/proddata/undo02.dbf 00038
    input datafile fno = name=/u02/proddata/a_txn_ind03.dbf 00027
    input datafile fno = name=/u02/proddata/a_txn_ind04.dbf 00028
    input datafile fno = name=/u02/proddata/undo01.dbf 00012
    input datafile fno = name=/u02/proddata/a_media01.dbf 00015
    input datafile fno = name=/u02/proddata/a_txn_ind01.dbf 00025
    input datafile fno = name=/u02/proddata/a_txn_ind02.dbf 00026
    input datafile fno = name=/u02/proddata/a_txn_ind05.dbf 00029
    input datafile fno = name=/u02/proddata/a_summ01.dbf 00021
    input datafile fno = name=/u02/proddata/a_ref01.dbf 00019
    input datafile fno = name=/u02/proddata/a_ref02.dbf 00020
    input datafile fno = 00001 name=/u02/proddata/system01.dbf
    input datafile fno = name=/u02/proddata/system02.dbf 00002
    input datafile fno = name=/u02/proddata/system03.dbf 00003
    input datafile fno = name=/u02/proddata/system04.dbf 00004
    input datafile fno = 00005 name=/u02/proddata/system05.dbf
    input datafile fno = name=/u02/proddata/system06.dbf 00006
    input datafile fno = name=/u02/proddata/system07.dbf 00007
    input datafile fno = name=/u02/proddata/system08.dbf 00008
    input datafile fno = name=/u02/proddata/system09.dbf 00009
    input datafile fno = name=/u02/proddata/system10.dbf 00010
    input datafile fno = name=/u02/proddata/system11.dbf 00011
    input datafile fno = name=/u02/proddata/a_archive01.dbf 00013
    input datafile fno = name=/u02/proddata/sysaux01.dbf 00036
    input datafile fno = name=/u02/proddata/a_nolog01.dbf 00016
    input datafile fno = name=/u02/proddata/izu01.dbf 00037
    input datafile fno = name=/u02/proddata/a_queue01.dbf 00017
    input datafile fno = name=/u02/proddata/a_queue02.dbf 00018
    input datafile fno = name=/u02/proddata/odm.dbf 00031
    input datafile fno = name=/u02/proddata/portal01.dbf 00034
    input datafile fno = name=/u02/proddata/sfx01.dbf 00035
    input datafile fno = name=/u02/proddata/ctxd01.dbf 00030
    input datafile fno = name=/u02/proddata/olap.dbf 00032
    input datafile fno = name=/u02/proddata/owad01.dbf 00033
    channel ORA_DISK_1: starting total, 1 to June 30, 11
    channel ORA_DISK_1: finished piece 1 at June 30, 11
    total, handle = / sw/weekly_cum_database_DEV_t755196858_c1_s24_p1 tag = WEEKLY_CUM_DAT
    ABASE comment = NONE
    channel ORA_DISK_1: complete set of backups, time: 00:32:55
    channel ORA_DISK_1: additional start-up compressed 0 datafile backupset
    channel ORA_DISK_1: specifying datafile (s) in backupset
    including the current control in backupset file
    including current SPFILE in backupset
    channel ORA_DISK_1: starting total, 1 to June 30, 11
    channel ORA_DISK_1: finished piece 1 at June 30, 11
    total, handle = / sw/weekly_cum_database_DEV_t755198834_c1_s25_p1 tag = WEEKLY_CUM_DAT
    ABASE comment = NONE
    channel ORA_DISK_1: complete set of backups, time: 00:00:02
    Backup completed on June 30, 11

    Queue log disabled

    Recovery Manager10.2.0.3.0

    Complete recovery manager.
    bash-3. $ 00

    No need to mention to the coil of logoff.

    coil disconnection;

    out this above command and run again.

  • How to access a physical file of a java class DataModel?

    Hello

    I have a ViewObjectImpl file needs access to a physical file.

    for example, my VOImpl located in the oracle.web.datamodel.queries package (directory of window: C:\JDeveloper\jdev\mywork\WEB\DataModel\classes\oracle\web\datamodel\queries), if I put the file in the directory of "C:\JDeveloper\jdev\mywork\WEB\DataModel\public_html\fileABC.txt", how can I write the relative path for the VOImpl java class to access the fileABC.txt?

    The absolute path to the file works fine, but I want to know the relative path to make it work if I deploy it on the server.

    Thank you very much!

    OK, one more time:
    If you use the file, you must specify the absolute path that you shouldn't do it because you don't know the path on a server that you deploy the application to.
    I recommend to use getResourceAsStream instead, because it allows you to specify the path to the file from the path of the class of applications:

        public String getABCFile()
        {
            String path = "oracle/web/datamodel/queries/fileABC.txt";
            InputStream is = this.getClass().getClassLoader().getResourceAsStream(path);
            if (is == null)
            {
                System.out.println("ABC NOT FOUND!");
            }
            else
            {
                System.out.println("BINGO ABC FOUND");
                byte[] data = new byte[500];
                try
                {
                    is.read(data);
                }
                catch (IOException e)
                {
                    e.printStackTrace();
                }
                String res = new String(data);
                System.out.println(res);
                return res;
            }
            return null;
        }
    

    Code assunes that the fileABC.txt file is in the location/web/datamodel/applications oracle. All you have to do is to make sure that the file is deployed to this place (in the classpath).

    Timo

  • How to transfer data from a DLL Delphi pascal class to a LabView data cluster?

    Hi all

    I have the following problem:

    I use a dll written in Delphi Pascal to transfer data to LabView by using the "Call library function node".

    My Delphi dll contains this class:

    TFlash = class
    Fi: TFileInfo;
    constructor Create;
    procedure LoadFi (Filedir_and_nametring);
    end;

    TFileInfo = record
    IDX:smallint;
    IdxLstSpl:array [0.4] of longint;
    Ms: Word;
    [0.4] SP:array of the word;
    end;

    I created the record datastructure of TFileInfo in a cluster of LabView to have the 'same' variable.

    My plan was to call a DLL Deplhi function with the "call library function node" and pass the address of the folder TFileInfo, so the data would be transmitted to the cluster of LabView.

    When I do a simple delphi dll function as this works because I only spend a small integer to Labview (without reference to the data structure):

    ...

    var data: TFlash;

    ...

    function GetNrOfRows(FilePath:_string):integer; STDCALL;
    Start
    Data: = tflash. Create;
    Data.LoadFi (FilePath); This function returns the number of lines in the selected file.
    Result: = Data.Fi.Idx;
    end;

    When I try to use this procedure instead of the above function, in order to pass the address of the data set structure complex 'Data' (TFileInfo), I am unable to get the information of 'Data' in my Labview cluster:

    procedure LoadFileInfo (FilePath: string;) DataPointer: Pointer); STDCALL;
    Start
    Data: = tflash. Create;
    Data.LoadFi (FilePath);
    DataPointer:=@Data;
    end;

    Parameters of call library function node:

    -stdcall (WINAPI)

    -Run in the UI Thread

    -Function prototype: void LoadFileInfo (PStr FilePath, void * DataPointer);

    * DataPointer--> Type: "adapt the type" and the format of the data: "pointers to the sleeves.

    * FilePath--> Type: 'string', format of the string: "pascal string pointer.

    I'm struggeling with this problem for almost a week now and I can't really find a solution on the forum or google.

    I also read the following posts:

    http://forums.NI.com/NI/board/message?board.ID=170&message.ID=229930&requireLogin=false

    http://forums.NI.com/NI/board/message?board.ID=170&message.ID=77947&requireLogin=false

    http://forums.NI.com/NI/board/message?board.ID=170&message.ID=51245&requireLogin=false

    (or did I miss something in these messages?)

    Hope my explanation is clear.

    THX

    A little further:

    Seems like it's not possible to pass data from Delphi to Labview through a DLL when I create a cluster with 2 bays in it in Labview.

    This part of Delphi, I've had to make in Labview:

    TFileInfo = record
    IDX:smallint; {integer; Convert tool}
    IdxLstSpl:array [0.4] of longint;
    Ms: Word;
    [0.4] SP:array of the word;
    end;

    Instead of using 1 cluster with all the different data in it, I did a unit (1) with my 2 items (smallint and word).

    To pass my data in my tables from delphi to labview, I created another group (2) in the unit (1) with 5 elements of longint (because my delphi is going to 0.4) and another group (3) in the unit (1) with 5 Word elements.

    Right-click on the unit (1) and the clusterorder in the right order. First the smallint, then the longint table, then the word and the Word table.

    When I then use this code in my dll Delphi, IT WORKS! :

    procedure LoadFileInfo (FilePath: string;) DataPointer: PtrTFileInfo); STDCALL;
    Start
    Data: = tflash. Create;
    Data.LoadFi (Copy (FilePath, 2, length (FilePath)-1));         --> I need to cut the first part of the pascal string because it's length, and I only need the string itself
    DataPointer ^: = Data .fi;       --> pass the record structure to the cluster of Labview
    end;

    Thanks for the info Ralf!

  • How to access the material data (ACPI)?

    Since there seems to be no solution comes the question how to access data from hardware ACPI functions with Linux (Ubuntu).

    Windows device management indicates a driver for the fan control and the temperature. So, apparently, there is the ability to view and order the material. The question remains: how to read or conbtrol of Linux.

    Research in/proc/acpi has not shown the results.
    Maybe in the area/sys.
    Someone here to give a hint on this problem?

    Best regards / gwhh

    Hello

    Perhaps this thread could help you:
    http://forums.computers.Toshiba-Europe.com/forums/thread.jspa?threadID=64329
    The Linux ASPM function will save some power but is not enabled by default
    You can try to activate this manually using the parameter:

    pcie_aspm = force

  • To access data from different pages

    Hello

    I want to know who, how to access data from an html page to another html page using Javascript or HTML5?

    Thank you and best regards,

    Tejas

    After the installation of new WebWorksSDk, my problem is resolved automatically...

  • How to access and recover photos and data from icloud?

    How to access and recover photos and data from icloud?

    Sign up for settings/iCloud and turn on the various switches in sync. On a computer, go to system/iCloud Preferences, log in and check the different items to synchronize.

  • How to access the data in the row (text of children) in a pragmatic control tree?

    In LabVIEW 2010, I entered the data in row a tree with pragmatism control using the Add item and providing the child text table and the child tag for the line. When a row in the tree control is selected, I can get the line label in the Value property of the tree. But how do I access the data in the child text table when the line is selected? I can't seem to find a tree control property or method which will return data back.

    What I'm trying to do is: once a line in a tree is selected and a button is pressed, if the line tag is valid, I want to transfer all the data in row in another tree the same formatting. For this I need the data for the tree line and the line that was selected. I don't find a way to get access to these data of the line when it was composed in the tree.

    Can someone tell me how to access pragmatically the child text or row data in a tree control from a selected line in the tree? I have the label of the line, but how do I access data?

    Thank you for your help.

    Looking through numerous examples, I found how to do this using the properties ActiveItemRow and ActiveColNum, but I can't find these documented properties anywhere using LabVIEW. Even research through aid could not do anything about them.

    Where these important parameters are documented?

    Why they do not appear in the help?

    Are there other ways to access the data in the row (child text) form a selected line in a tree control?

  • HOW TO FILTER DATA IN MICROSOFT ACCESS

    HOW TO FILTER DATA IN MICROSOFT ACCESS BASED ON THE DATE AND TIME AND GIVE THE RESULT IN A TABLE?

    I need a few examples of files, can someone help me please?

    Fix your keyboard. If it has not been broken, be a little more polite and stop screaming.

    Research, are thousands of examples on the web related to the jet and sql database. This is a very basic select statement. Access to a query wizard that can then show the sql code. If you don't know how to design a query in access, you need a Basic for this tutorial. No question of LabVIEW here.

  • (Question LVOOP) How one access the data of another class in another class?

    Hello-

    Ass title suggests, how do I access another class (or is it class?) data from another (different) class?  I will attach a picture showing where my problem is...

    I was told this:

    http://zone.NI.com/reference/en-XX/help/371361H-01/lvhowto/setting_scope_classes/

    May contain some helful info, but I can still understand how to unbundle Renault of classes inside the component class data (as seen in the attached photo).

    I think there could be something simple I'm missing here when it comes LVOOP or OBJECT-oriented programming in general... If any of you are willing to help me, it would be much appreciated!

    Thank you!

    -pat

    Personal data are always private, you can never set public. Unbundle cluster function can be used only on the thread of class when he is in the class. If you need to access private data, you must create accessors.

    It of simple, just the class right click and select new, VI for access data members. He invites you to a dialog box to fill you with what you want to create, elements of data and if you want them available through property nodes (recommended). Once completed, this will generate the Afterward screw., you can use in any other VI. The nice thing about making them nodes of property is that you can plop down a property node and it thread class, and all the created accessor functions will appear in the list.

  • Multiple column trees: how to access the data in columns? There is a bug?

    Hello

    I have a strange problem. I use tree column multi like this:

    In this case, I have the tree column and two other custom columns.

    Now, how to access the data in the SECOND column?

    We can write all the data in a row thanks the EditElementTree:AddElement:ChildText, because it is an array of strings.

    However, when I want to read the data, I use ActiveCelltring, meaning that a SINGLE string and not a string table oO (so I only have the value of the first column and never others.

    So, I can do what I want? Is this a bug?

    Thank you very much

    R0b1n

    OK, I have the solution.

    We play with the ActiveColumnNumber attribute, to read the values of different...

    I left the message, it may be useful for later someboby

    R0b1n

  • How to access the file data of QML

    Hi all

    I save my data foler xml file after I have download from Server compnay.

    So I hope that I can access data foler to load the XML to display the list.

    Does anyone know how to set up the data source of the qml?

    {To ListView

    objectName: "objVehicleListView."

    dataModel: {XmlDataModel}

    Source: "file://data/vehicles.xml".<--  how="" to="" point="" to="" data="">

    }

    listItemComponents:]

    {ListItemComponent}

    type: "vehicle".

    {StandardListItem}

    Title:ListItemData.unitName

    Description: ListItemData.licencePlate

    status: ListItemData.vehicleOwnerName

    }

    }

    ]

    }

    I think that it is not possible to get the path using QML pure code. By using the code BBSJdev, you can get the path in C++ and export it to QML.

    Add the following code after the qml loading, but before creating rootObject:

    QDeclarativePropertyMap *filenames = new QDeclarativePropertyMap;
    filenames->insert("vehicles", QVariant(QString(
            QDir::homePath() + "/vehicles.xml")));
    qml->setContextProperty("filenames", filenames);
    

    Then you can use QML:

    ListView {
      dataModel: XmlDataModel {
        source: filenames.vehicles
    
  • How to access a certain date in the date and time field SQL Server

    I have a field named job_date in a table in my database of the 8 SQL Server.

    The data type is datetime.

    Thus, the values for the fields as the 2013-03-11 15:55:52.000 look.

    How to query this field to include only the values of a certain date?

    For example

    < cfquery name = "get_job_name" datasource = 'abc' >

    SELECT FROM job_info job_date WHERE Job_name = March 12, 2013"

    < / cfquery >

    When I query the field now I get NO RECORDS.

    This is because as the fields like this 15:55:52.000 2013-03-11. instead of this March 12, 2013"

    How to access a certain date in the date and time field SQL Server when its formatting as this 15:55:52.000 2013-03-11. ?

    where job_date > = TheDateYouWant

    and job_date<>

    In addition, the format is irrelevent.  The only issue of date formats time is when you want to display.

  • How to access the BitmapData instance on the class that extends the charger?

    Hello. I use Flash CS6 to create an AIR application that loads an image from the computer, and then a pixel counts using its bitmap data.

    MyImg is a class that represents the loaded image.

    package com.utils {}

    import flash.display.Loader;

    SerializableAttribute public class extends {charger MyImg

    public void MyImg (): void {}

    }

    }

    }

    In my main class I manage the selection of files and loading.

    private var _myImage:MyImg = new MyImg();

    private var _file:FileReference;

    private var _fileTypes:FileFilter = new FileFilter ("Imagens: (*.jpeg, *.jpg, *.gif, *.png)", "*.jpeg;") *.jpg; *.gif; *.png");

    When the user clicks on a "load image" button on the stage, it calls loadMyImg().

    public void loadMyImg($e:MouseEvent):void {}

    chooseFile();

    }

    The user then selects the file he wants to do.

    private function chooseFile (): void {}

    Inasmuch = new FileReference();

    _File.addEventListener (Event.SELECT, fileSelected);

    _File.browse ([_fileTypes]);

    }

    Once you have selected the file, it is loaded as a byte array.

    private void fileSelected($e:Event):void {}

    _File.removeEventListener (Event.SELECT, fileSelected);

    _File.addEventListener (Event.COMPLETE, fileLoaded);

    _File.load ();

    }

    When it finishes loading it loads the byte array in _myImage.

    private void fileLoaded($e:Event):void {}

    _File.removeEventListener (Event.COMPLETE, fileLoaded);

    _myImage.contentLoaderInfo.addEventListener (Event.COMPLETE, dataReady);

    _myImage.loadBytes (_File.Data);

    }

    Once it's done I try to use the _myImage BitmapData, but cannot...

    private void dataReady($e:Event):void {}

    $e.target.loader.contentLoaderInfo.removeEventListener (Event.COMPLETE, dataReady);

    trace ($e.target + $e.target.content + $e.target.content.name + $e.target.content.bitmapData); Returns [object LoaderInfo] [object Bitmap] instance 155 [BitmapData object]

    trace (_myImage + _myImage.content + _myImage.content.name + _myImage.contentLoaderInfo + _myImage.contentLoaderInfo.content.name); instance of [object LoaderInfo] 155 155 instance [object Bitmap] returns [object MyImg]

    trace (_myImage.content.bitmapData) //compiler error: 1119 of bitmapData property possibly access not defined through a reference with static type flash.flashDisplay:DisplayObject.

    error //same trace (_myImage.contentLoaderInfo.content.bitmapData)

    }

    I don't understand what I'm doing wrong. Instances have the same name so that they are identical. They both trace as bitmaps, yet when I didn't access it from the event I do not get the bitmapData. Can someone tell me what I am doing wrong? I need to use the bitmapData of the classroom MyImg. I guess I could create a BitmapData variable in the class and give it the value of $e.target.content.bitmapData, but I still want to know why it can't be simpler.

    Thank you!

    Cast _myImage.content as bitmap:

    Bitmap (_myImage.Content)

  • How access AM / VO instance of a class of Service Java

    Hello

    I have a Java service class that is loaded by Java ServiceLoader (http://download.oracle.com/javase/6/docs/api/java/util/ServiceLoader.html) at run time, and I need to access the tables of database within this class of service. So is there no way AM I can access / instances VO from the Java class to read the database table? Thank you.

    Kind regards

    K huh

    You can access a module application with the two methods below:

        YOURAppModule mAM;
    
        public void setUpAM()
            throws NamingException
        {
            try
            {
                String AMDefName = "YOUR_APP_DEF_NAME";
                Hashtable env = new Hashtable(2);
                env.put(JboContext.INITIAL_CONTEXT_FACTORY, JboContext.JBO_CONTEXT_FACTORY);
                env.put(JboContext.DEPLOY_PLATFORM, JboContext.PLATFORM_LOCAL);
                ApplicationModule am = null;
                InitialContext ic = new InitialContext(env);
                ApplicationModuleHome home = (ApplicationModuleHome) ic.lookup(AMDefName);
                am = home.create();
                // Connect the AM to a database connection
                String jndiDB = "jdbc/HRDS";
                am.getTransaction().connectToDataSource(null, jndiDB, false);
                boolean connected = am.getTransaction().isConnected();
                mAM = (YOURAppModule) am;
            }
            catch (NamingException nex)
            {
                // do some error processing
                throw nex;
            }
            catch (Exception eee)
            {
                // do some error processing
                throw eee;
            }
        }
    
        public void tearDownAM()
        {
            if (mAM != null)
            {
                if (mAM .getTransaction().isConnected())
                {
                    mAM .getTransaction().disconnect();
                    mAM .remove();
                }
            }
        }
    

    You will find the YOUR_APP_DEF_NAME in your request module to the title of "Configurations"-> AppModuleJndiName.
    Make sure you that you shoot each AM you set up. Otherwise you are short of resources fast enough.

    Timo

Maybe you are looking for