How to unload dynamically loaded modules?

Hi,
I have a problem with unloading module, which I loads dynamically.
Here is a fragment my code:
<TitledWindow .......creationComplete="init()"/>
<mx:Accordion id="lista_ryzyk">
</mx:Accordion>
<mx:Script>
public function init():void
{    CairngormEventDispatcher.getInstance().addEventListener(LoadRisksEvent.EVENT_RESULT, populateAccordion);
public function populateAccordion(event:CairngormEvent):void
     lista_ryzyk.removeAllChildern();
     for (i in risks)
          var m:ModuleLoader = new ModuleLoader();
          m.url = path_to_module;
          m.label = module_label;
          m.loadModule();
     lista_ryzyk.addChildAt(m,Number(i));
</mx:Script>
The modules loads fine. Each module adds own eventListener for some event. It works fine, but ONLY for first time. For next invoke populateAccordion function, the modules loads, but don't reacts for event. I investigate !!! that for events reacts that modules, which was loaded for the first time!!! How to remove it????

Using array, didn't solve my problem, but it is possible that I'm doing something wrong.
I still can't catch event in second time loaded module :-((( I have tried to solve this problem from wednesday! it goes me crazy!
Could you, or anybody, try to inspect my code and help me? I have no idea how to manage it.
I know exactly what is wrong, but I can't improve that. In module's creationComplete function I display the UID of this module, and in body of eventHandler function I do the same. In case of FIRST time  the displayed UID are the same, but when I load the module second time, the UID of the loaded module displayed in creationComplete function is new, but the UID displayed in handler function is the same as the first loaded module. So my event is catch by the wrong modul, and I don'tknow how to change it, how to process event in my newly loaded module.

Similar Messages

  • Dynamically loading modules

    hi
    i have a menubar with these menuitems build from an xml , in
    that xml i have a field wich indicates what to do when that item is
    choosed and that is, loading a module. Now, i'm using module
    manager to load my modules using an event listener to know when
    it's ready , when i call the ready handler i create an instance of
    a display object and add it to the stage, all is fine, following an
    example from adobe, but my question how can i load modules
    dynamically using the ModuleManager ?
    thanks

    from the help:
    <?xml version="1.0"?>
    <!-- modules/ModuleLoaderApp.mxml -->
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    creationComplete="initApp()">
    <mx:Script>
    <![CDATA[
    import mx.events.ModuleEvent;
    import mx.modules.ModuleManager;
    import mx.modules.IModuleInfo;
    public var info:IModuleInfo;
    private function initApp():void {
    info = ModuleManager.getModule("ColumnChartModule.swf");
    info.addEventListener(ModuleEvent.READY, modEventHandler);
    // Load the module into memory. Calling load() makes the
    // IFlexModuleFactory available. You can then get an
    // instance of the class using the factory's create()
    // method.
    info.load();
    private function modEventHandler(e:ModuleEvent):void {
    // Add an instance of the module's class to the
    // display list.
    vb1.addChild(info.factory.create() as ColumnChartModule);
    ]]>
    </mx:Script>
    <mx:VBox id="vb1"/>
    </mx:Application>

  • How to unload externally loaded swf which contains 3D Carousel?

    Hello to all
    I am learning AS3 and have been taking on various tutorials found on the net. While learning about AS3 I came across a lesson on http://tutorials.flashmymind.com/2009/05/vertical-3d-carousel-with-actionscript-3-and-xml/ titled "Vertical 3D Carousel with AS3 and XML".
    I completed the tutorial and all worked fine so I then wanted to load the swf into a existing project. The loading of the swf goes fine and when I unload my loader it is removed but only visually as in my output panel in flash CS5 I get an error as follows
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
    at carousel_c_fla::MainTimeline/moveCarousel()
    this error repeats over and over again slowing my swf movie.
    So does this mean my main flash movie trying to still play / find my unloaded 3D Carousel?
    If so how do I unload remove all the AS3 that is trying to run from the 3D Carousel?
    I have included the AS3 below from the tutorial page and I understand that this is what I have to remove to "break free" from the 3D Carousel swf when it is unloaded. This is where I am stuck as my knowledge of AS3 is limited - Can you guys / girls help?
    //Import TweenMax
    import com.greensock.*;
    //The path to the XML file (use your own here)
    // old var from tutorial - var xmlPath:String = "http://tutorials.flashmymind.com/XML/carousel-menu.xml";
    var xmlPath:String = "carousel-menu.xml";
    //We'll store the loaded XML to this variable
    var xml:XML;
    //Create a loader and load the XML. Call the function "xmlLoaded" when done.
    var loader = new URLLoader();
    loader.load(new URLRequest(xmlPath));
    loader.addEventListener(Event.COMPLETE, xmlLoaded);
    //This function is called when the XML file is loaded
    function xmlLoaded(e:Event):void {
         //Make sure that we are not working with a null variable
         if ((e.target as URLLoader) != null ) {
              //Create a new XML object with the loaded XML data
              xml = new XML(loader.data);
              //Call the function that creates the menu
              createMenu();
    //We need to know how many items we have on the stage
    var numberOfItems:uint = 0;
    //This array will contain all the menu items
    var menuItems:Array = new Array();
    //Set the focal length
    var focalLength:Number = 350;
    //Set the vanishing point
    var vanishingPointX:Number = stage.stageWidth / 2;
    var vanishingPointY:Number = stage.stageHeight / 2;
    //We calculate the angleSpeed in the ENTER_FRAME listener
    var angleSpeed:Number = 0;
    //Radius of the circle
    var radius:Number = 128;
    //This function creates the menu
    function createMenu():void {
         //Get the number of menu items we will have
         numberOfItems = xml.items.item.length();
         //Calculate the angle difference between the menu items (in radians)
         var angleDifference:Number = Math.PI * (360 / numberOfItems) / 180;
         //We use a counter so we know how many menu items have been created
         var count:uint = 0;
         //Loop through all the <button></button> nodes in the XML
         for each (var item:XML in xml.items.item) {
              //Create a new menu item
              var menuItem:MenuItem = new MenuItem();
              //Calculate the starting angle for the menu item
              var startingAngle:Number = angleDifference * count;
              //Set a "currentAngle" attribute for the menu item
              menuItem.currentAngle = startingAngle;
              //Position the menu item
              menuItem.xpos3D = 0;
              menuItem.ypos3D = radius * Math.sin(startingAngle);
              menuItem.zpos3D = radius * Math.cos(startingAngle);
              //Calculate the scale ratio for the menu item (the further the item -> the smaller the scale ratio)
              var scaleRatio = focalLength/(focalLength + menuItem.zpos3D);
              //Scale the menu item according to the scale ratio
              menuItem.scaleX = menuItem.scaleY = scaleRatio;
              //Position the menu item to the stage (from 3D to 2D coordinates)
              menuItem.x = vanishingPointX + menuItem.xpos3D * scaleRatio;
              menuItem.y = vanishingPointY + menuItem.ypos3D * scaleRatio;
              //Add a text to the menu item
              menuItem.menuText.text = item.label;
              //Add a "linkTo" variable for the URL
              menuItem.linkTo = item.linkTo;
              //We don't want the text field to catch mouse events
              menuItem.mouseChildren = false;
              //Assign MOUSE_OVER, MOUSE_OUT and CLICK listeners for the menu item
              menuItem.addEventListener(MouseEvent.MOUSE_OVER, mouseOverItem);
              menuItem.addEventListener(MouseEvent.MOUSE_OUT, mouseOutItem);
              menuItem.addEventListener(MouseEvent.CLICK, itemClicked);
              //Add the menu item to the menu items array
              menuItems.push(menuItem);
              //Add the menu item to the stage
              addChild(menuItem);
              //Assign an initial alpha
              menuItem.alpha = 0.3;
              //Add some blur to the item
              TweenMax.to(menuItem,0, {blurFilter:{blurX:1, blurY:1}});
              //Update the count
              count++;
    //Add an ENTER_FRAME listener for the animation
    addEventListener(Event.ENTER_FRAME, moveCarousel);
    //This function is called in each frame
    function moveCarousel(e:Event):void {
         //Calculate the angle speed according to mouseY position
         angleSpeed = (mouseY - stage.stageHeight / 2) * 0.0002;
         //Loop through the menu items
         for (var i:uint = 0; i < menuItems.length; i++) {
              //Store the menu item to a local variable
              var menuItem:MenuItem = menuItems[i] as MenuItem;
              //Update the current angle of the item
              menuItem.currentAngle += angleSpeed;
              //Calculate a scale ratio
              var scaleRatio = focalLength/(focalLength + menuItem.zpos3D);
              //Scale the item according to the scale ratio
              menuItem.scaleX=menuItem.scaleY=scaleRatio;
              //Set new 3D coordinates
              menuItem.xpos3D=0;
              menuItem.ypos3D=radius*Math.sin(menuItem.currentAngle);
              menuItem.zpos3D=radius*Math.cos(menuItem.currentAngle);
              //Update the item's coordinates.
              menuItem.x=vanishingPointX+menuItem.xpos3D*scaleRatio;
              menuItem.y=vanishingPointY+menuItem.ypos3D*scaleRatio;
         //Call the function that sorts the items so they overlap each other correctly
         sortZ();
    //This function sorts the items so they overlap each other correctly
    function sortZ():void {
         //Sort the array so that the item which has the highest
         //z position (= furthest away) is first in the array
         menuItems.sortOn("zpos3D", Array.NUMERIC | Array.DESCENDING);
         //Set new child indexes for the item
         for (var i:uint = 0; i < menuItems.length; i++) {
              setChildIndex(menuItems[i], i);
    //This function is called when a mouse is over an item
    function mouseOverItem(e:Event):void {
         //Tween the item's properties
         TweenMax.to(e.target, 0.1, {alpha: 1, glowFilter:{color:0xffffff, alpha:1, blurX:60, blurY:60},blurFilter:{blurX:0, blurY:0}});
    //This function is called when a mouse is out of an item
    function mouseOutItem(e:Event):void {
         //Tween the item's properties
         TweenMax.to(e.target, 1, {alpha: 0.3, glowFilter:{color:0xffffff, alpha:1, blurX:0, blurY:0},blurFilter:{blurX:1, blurY:1}});
    //This function is called when an item is clicked
    function itemClicked(e:Event):void {
         //Navigate to the URL that's assigned to the menu item
         var urlRequest:URLRequest=new URLRequest(e.target.linkTo);
         navigateToURL(urlRequest);

    Hi Ned thanks for the reply,
    Ok so I have a button in my main movie that loads the external swf
    stop();
    var my_loader:Loader = new Loader();
    var my_btn:Button = new Button();
    var my_pb:ProgressBar = new ProgressBar();
    my_pb.source = my_loader.contentLoaderInfo;
    my_btn.addEventListener(MouseEvent.CLICK,startLoading);
    function startLoading(e:MouseEvent):void{
    my_loader.load(new URLRequest("carousel.swf"));
    addChild(my_pb);
    my_loader.contentLoaderInfo.addEventListener(Event.COMPLETE, finishloading);
    function finishloading(e:Event):void{
    addChild(my_loader);
    my_loader.addEventListener("killMe",
    killLoadedClip);
    removeChild(my_pb);
    function killLoadedClip(e:Event):void {
    my_loader.removeEventListener("killMe",
    killLoadedClip);
    my_loader.unloadAndStop();
    removeChild(my_loader);
    Then I have a button in my loaded swf that closes the loader
    This is spread over 2 frames
    Frame1
    function closeIt(e:MouseEvent):void {
    parent.dispatchEvent(newEvent("killMe"));
    Frame 2
    back_btn.addEventListener(MouseEvent.CLICK, closeIt);
    Frame 2 also holds all the code for the carousel
    Thanks for your time and help in advance people ; )

  • Errors when using Spark Buttons in dynamically loaded modules loaded by dynamically loaded modules

    Ok ... I have to admit this issue is rather special ;-)
    I have a flex application that loads a list of modules after the user logs in, depending on the permissions of the user.
    One of these modules contains a component, that allows the user to configure settings for different types of objects.
    For each object type (can be extended) there exists one module swf.
    The strange problem I am having now is that as soon as a Spark Button (or anything derived from one ... CheckBox) inside the settings-module. I get the following error (unfortunately in german ... but I'll try to translate).
    This error happens when using a spark CheckBox (Which is derived from Spark Button):
    ArgumentError: Error #2004: Einer der Parameter ist ungültig.
    at flash.display::Graphics/drawRect()
    at mx.graphics::RectangularDropShadow/drawShadow()[E:\dev\4.x\frameworks\projects\framework\ src\mx\graphics\RectangularDropShadow.as:575]
    at mx.skins.spark::BorderSkin/updateDisplayList()[E:\dev\4.x\frameworks\projects\sparkskins\ src\mx\skins\spark\BorderSkin.mxml:174]
    at mx.core::UIComponent/validateDisplayList()[E:\dev\4.x\frameworks\projects\framework\src\m x\core\UIComponent.as:8709]
    at mx.managers::LayoutManager/validateDisplayList()[E:\dev\4.x\frameworks\projects\framework \src\mx\managers\LayoutManager.as:663]
    at mx.managers::LayoutManager/doPhasedInstantiation()[E:\dev\4.x\frameworks\projects\framewo rk\src\mx\managers\LayoutManager.as:718]
    at mx.managers::LayoutManager/doPhasedInstantiationCallback()[E:\dev\4.x\frameworks\projects \framework\src\mx\managers\LayoutManager.as:1072]
    When having a look at the problem the cause is that width and height are not set (NaN).
    If I use a plain Button I get the same error in "drawRoundRect".
    As soon as I change back to a mx-Button/Checkbox, everything is fine.
    In my current Case I wanted to use a custom TreeItemRenderer to display a CheckBox in the tree. This tree Item renderer is included in a custom Lib that is used by all modules.
    I have one Second Level module using this renderer. I have one Third Level Module thas uses the exact same tree definition. If I use the MX CheckBox I get CheckBoxes in the Second- and Third-Level Module. If I use the Spark-CheckBox I get a CheckBox in my Second Level Module and the above Error in the Third Level Module.
    To make everything even stranger: I have a custom component loading my modules and I use this in the Top Level Module to load the Second Level Modules and in my Second Level Module to load my Third Level Modules (So I would guess If my loader is broken, then the Second Level Modules should not work either).
    Help is greatly appreciated :-)
    Regards,
          Chris

    Ok, I managed to find out what was going wrong and to get my stuff working again. I have to admit that I have no idea why my application / flex was showing this behaviour. The only way I could track this down was by undoing the Subversion checkins one by one. Finding out what was happening using common sense seems to be out of the question with this issue.
    My application is built up of a main application swf that loads module swfs and a library swc that contains common stuff and is used in the main application and the modules.
    I now had some custom TreeItemRenderers in my modules. The problem was caused by moving a custom TreeItemRenderer from one module to the library-swc. I could successfully reproduce this. If I add only one class extending TreeItemRenderer to my library (I don't even have to use it), the entire flex system goes haywire. As soon as I remove that class, everything is ok. I checked, if there might be a problem with third party libs containing flex core classes which might be used instead of the sdk ones, but after looking at the catalogs of the third party swcs I couldn't find a reference to TreeItemRenderer.
    Any Ideas? I sort of dislike the idea of being able to run into such strange problems. Is there a tool that allows me to check for class compatibility issues?

  • How to use dynamic loaded embeded font?

    I have loaded fonts.swf on startup. I don't use TextLayout
    Embeded fonts feature. Then i have loaded some xml and assign xml
    to TextLayout. How I can use loaded font for display?

    Are you using Flash CS4 or Flex?
    Check out the following blog post, it contains instructions
    for font embedding that may help you out:
    Embedded
    Font Subsetting Using DefineFont4

  • How to style dynamically loading text?

    Hi,
    I am dynamically loading a .txt file into CS3 using
    ActionScript 3.0. I want to style the text using CSS/HTML. The only
    thing I can get to function using CSS/HTML is the "a tag", I can't
    seem to get bold, colour, font, etc working. Should i be using CSS
    or should I be doing this styling from ActionScript in the swf
    files? I have checked the help files but I could get their tags to
    work.
    Any suggestions very welcome.
    Thanks.

    you will have more control over all of this if you feed in an
    xml file rather than a txt file. you can stipulate your class
    attributes within the xml then
    if you want to style the dynamic content using just your txt
    file and the controls within the fla you could embed the typeface
    glyphs you want to use within your output swf file and colour them
    / change weight etc within the fla
    hope that is of some use
    ;-)

  • How do I dynamically load a SWF that was compiled from an Fla with a linked external class file

    I am dynamically loading external SWFs in a Main Fla in response to clicks on a menu.
    The loading code is standard and works fine for all of the SWFs except one. When I try to load it I get the following error:
    Error #2044: Unhandled IOErrorEvent:. text=Error #2035: URL Not Found.
    I am certain that the URL to the problem SWF is correct. The SWF itself doesn't load any other SWFs or images.
    The problem SWF is linked to an external class file and compiled with it.
    i.e. in the properties panel of the main timeline of the problem SWF's Fla I have entered the path to the external class.
    1. there is no problem compiling this SWF with the class (it works fine by itself)
    2. if I remove the external class from the properties panel and don't use it the resulting SWF imports without a problem into the Main Fla mentioned before
    So the problem seems to be the fact that the external class is linked in the properties panel. Is this a path problem?
    Would appreciate any suggestions,
    Thanks!

    despite what you say, that loaded swf most likely is loading something and that's the cause of the error.
    you could test that by putting the main swf's embedding html file in the same directory with problematic swf.  if the problem is as explained above, you'll have no problem when the main html is in the same directory with the loaded swf.

  • How Can I Dynamically Load And Run Another VI In Parallel To My Main VI?

    Hi,
    This question is supposed to be answered here. 
    http://digital.ni.com/public.nsf/allkb/CB109EC8325252A18625735B0049830B
    where it points to the example file 
    Example Program: Using VI Server to Call SubVIs that Run Parallel and Independently of the Calling V...
    However, this file is not there at the above link. Would appreciate if someone can share this program with me or any other advise.
    Thanks,
    Pulkit
    Solved!
    Go to Solution.

    I am attaching a VI that does this if you provide the path of the VI you want to launch dynamically (LV 8.5).
    HTH.
    PS: if the VI is already opened, it just brings it to the front (you may want that, if not, just remove that case and the corresponding test).
    Attachments:
    Run Vi.vi ‏23 KB

  • How to resize dynamically loaded Base64 Image?

    Hi all,
    I'm currently writing a flex component which renders a
    formular from a
    xml definition file. I get the image as Base64 and decode it
    whith some
    flex internal methods.
    private function addBgImage(base64Image:String):void{
    var base64Decoder:Base64Decoder = new Base64Decoder();
    base64Decoder.decode(base64Image);
    var byteArray:ByteArray = base64Decoder.flush();
    var loader:Loader = new Loader();
    loader.loadBytes( byteArray );
    var img:Image = new Image();
    img.addChild(loader);
    this.addChild(img);
    This works fine. Now i want to resize the image, but nothing
    works. I
    tried:
    img.width = 100;
    img.maxWidth = 100;
    img.explicitWidth = 100;
    loader.width = 100;
    But nothing works. Can somebody help me? Do I need to wait
    till the
    ByteArray is loaded?
    Best regards,
    Christian

    solved.
    solution:
    I have to wait till the loader finished loading and then i
    can resize the image in this method.
    private var loader:Loader;
    private function addBgImage(base64Image:String):void{
    var base64Decoder:Base64Decoder = new Base64Decoder();
    base64Decoder.decode(base64Image);
    var byteArray:ByteArray = base64Decoder.flush();
    loader = new Loader();
    loader.loadBytes( byteArray );
    loader.contentLoaderInfo.addEventListener(Event.COMPLETE,
    imgLoaded);
    var img:Image = new Image();
    img.addChild(loader);
    this.addChild(img);
    private function imgLoaded(event:Event):void{
    loader.width = 100;
    }

  • Removal of flicker with loaded modules

    I have a framework that hosts dynamically loaded Flex modules.  Imagine that I dynamically load a module and then add that module is an element to an existing spark container.  Prior to adding the loaded module (cast to an IVisualElement) to the container, I remove all children from the container.  Later on, I repeat this process to load a different dynamically loaded module.
    What I am finding is that when I hit the load button, there is a noticable flicker as the container first has its elements removed and then immediately has a new element added.
    Is there any way to avoid/remove this flicker?  Can I ask Flex to double buffer the drawing?
    Neil

    I found that I could delete the music that came with phone, if I deleted it in the album folder instead of the actual song, so just scroll through your album titles until you come to one you don't recognise, and you will be able to delete it easily on your phone.

  • Saving my loaded module as a JPG with Flex 3?

    Is there a tutorial for Flex 3 that can guide me on how to
    save a loaded module as a JPG?
    Thanks everyone.

    "Sailor_Sea" <[email protected]> wrote in
    message
    news:gdim5q$rgl$[email protected]..
    > Is there a tutorial for Flex 3 that can guide me on how
    to save a loaded
    > module as a JPG?
    >
    > Thanks everyone.
    Google ImageSnapshot
    HTH;
    Amy

  • How do I dynamically open a VI and load values into its connector pane?

    I'm trying to open a VI as a prompt to another VI without opening the second VI's front panel until the user clicks OK in the first window. The second VI takes inputs from the first thru its connector pane. How do I dynamically open the second VI?

    I think what you mean is call by reference dynamically loading VI's
    You can read up on it here
    If you want to make a static call to the sub vi just set the  Front Panel Options to "Open Front Panel when called"
    See here for more info
    Hope that answers your question

  • How can you display a dynamically loaded vi to the Web Server?

    I am working with LabView 6.1 and the Web Server. I can call a subvi and have it display on a remote machine using a browser with no problem. But what I would like to do is dynamically load and run a vi and have it display on the remote computer using only a browser. I have tried a small example of a front panel that invokes the run vi method (and fp.open prop) on another vi when a button is pressed, but the invoked vi is displayed only on the local computer. Is there any way of viewing dynamically loaded vi's on a remote machine without having a copy of LabView running on it?

    If i understand your question correctly, you want to monitor vi that are dynamically loaded on a remote machine without having LabVIEW installed on the machine from witch you want the monitor. I don't think it's possible how ever a good reference book would be Internet applications in LabVIEW. You can find it on BARNES&NOBLE.
    Hope i could help

  • How to dynamically load jar files - limiting scope to that thread

    Dynamically loading jar files has been discussed a lot. I have read a quite a few posts, articles, and demo code for doing just that. However, I have yet to find a solution to my problem. Most people modify their system class loader and are happy. I have done that and was happy for a time. Occasionally, you will see reference to an application server or tomcat or some other large project that have successfully been able to load and unload jar files, allow for dynamic deployment of code, etc. However, I have not been able to achieve similar success; And my problem is much less complicated.
    I have an application that executes a thread to send a given file/message to a standard JMS Server Queue. Depending on the parameters selected by the user, this thread may need to communicate with one of a number of JMS Servers, ie. JBoss, WebLogic, EAServer, Glassfish, etc. All of which can be done with the same code, but each needs to load their own flavor of JMS Client Jar files. In this instance, spawning a separate JVM for each communication would work from a classloader perspective. However, I need to keep it in the family and run under the same JVM, albeit each JMS Server Connection will be created and maintained in separate Threads.
    I am close, I am doing the following...
    1. Creating a new URLClassLoader in the run() method of each thread.
    2. Set this threads contextClassLoader to the new URLClassLoader.
    3. Load the javax.jms.JMSException class with the URLClassLoader.loadClass() method.
    4. Create an initialContext object within this thread.
    Note: I read that the initialContext and subsequent conext lookup calls would use the Thread�s
    contextClassLoader for finding/loading classes.
    5. Perform context.lookup calls for a connectionFactory and Queue name.
    6. Create JMS Connection, etc. Send Message.
    Most of this seems to work. However, I am still getting a NoClassDefFoundError exception for the javax.jms.JMSException class ( Note step #3 - tried to cure unsuccessfully).
    If I include one of the JMS Client jar files ( ie wljmsclient.jar for weblogic ) in the classpath then it works for all the different JMS Servers, but I do not have confidence that each of the providers implemented these classes that now resolve the same way. It may work for now, but, I believe I am just lucky.
    Can anyone shine some light on this for me and all the others who have wanted to dynamically load classes/jar files on a per Thread basis?

    Thanks to everyone - I got it working!
    First, BenSchulz' s dumpClassLoader() method helped me to visualize the classLoader hierarchy. I am still not completely sure I understand why my initial class was always found by the systemClassLoader, but knowning that - was the step I needed to find the solution.
    Second, kdgregory suggested that I use a "glue class". I thought that I already was using a "glue class" because I did not have any JMSClient specific classes exposed to the rest of the application. They were all handled by my QueueAdmin class. However...
    The real problem turned out to be that my two isolating classes (the parent "MessageSender", and the child "QueueAdmin") were contained within the same jar file that was included in the classpath. This meant that no matter what I did the classes were loaded by the systemClassLoader. Isolating them in classes was just the first step. I had to remove them from my jar file and create another jar file just for those JMSClient specific classes. Then this jar file was only included int custom classLoader that I created when I wanted to instantiate a JMSClient session.
    I had to create an interface in the primary jar file that could be loaded by the systemClassLoader to provide the stubs for the individual methods that I needed to call in the MessageSender/QueueAdmin Classes. These JMSClient specific classes had to implement the interface so as to provide a relationship between the systemClassLoader classes and the custom classLoader classes.
    Finally, when I loaded and instantiated the JMSClient specific classes with the custom classLoader I had to cast them to the interface class in order to make the method calls necessary to send the messages to the individual JMS Servers.
    psuedu code/concept ....
    Primary Jar File   -  Included in ClassPath                                                      
    Class<?> cls = ClassLoader.loadClass( "JMSClient.MessageSender" )
    JMSClientInterface jmsClient = (JMSClientInterface) cls.newInstance()                            
    jmsClient.sendMessage()                                                                      
    JMSClient Jar File  -  Loaded by Custom ClassLoader Only
    MessageSender impliments Primary.JMSClientInterface{
        sendMessage() {
            Class<?> cls=ClassLoader.loadClass( "JMSClient.QueueAdmin" )
            QueueAdmin queueAdmin=(QueueAdmin) cls.newInstance()
            queueAdmin.JMSClientSpecificMethod()
        }

  • How to disable the inputfield using radio button dynamically in module pool

    How to disable the inputfield on the screen using radio button dynamically in module pool.
    Please suggest .
            Thanks.
    Edited by: Lavanya YH1504 on Jul 30, 2010 1:20 PM

    I got it thank you.
    LOOP AT SCREEN.
        if  screen-GROUP1 = 'LA1'.
           If RADIO1 = 'X'.
            SCREEN-INPUT = '0'.
            MODIFY SCREEN.
         ELSEIF RADIO2 = 'X'.
           screen-input = '1'.
          ENDIF.
          MODIFY SCREEN.
        ENDIF.
      ENDLOOP.
    ENDMODULE.                 " STATUS_0100  OUTPUT
    Edited by: Lavanya YH1504 on Jul 30, 2010 1:51 PM

Maybe you are looking for

  • HP Laserjet 1022n & Windows 7 64-bit & spooling

    My home network has three desktop computers, one laptop and one tablet. Two of the desktops, plus the tablet are all running Windows 8.1. The laptop is running Windows 7 64-bit Professional, while the third desktop is running Windows 7 64-bit Home. A

  • TS1702 how  do you change the contact app to appear first name last name once it is in another setup mode

    how do you change the setup in the contact app to first name, last name once it is in differently

  • Backing up Leopard DVD

    I made a backup of the Leopard DVD to install several machines (yes I bought the family pack) and discovered that using a Macintosh to make the copy didn't copy the Bootcamp information. Moral: if you make a backup (and you should) of the Leopard dis

  • Flash lite application

    hi , has anyone done any flash applications that requires the usage of advanced encryption standard? anyone care to share or provide some reading materials?

  • DIP synchronization from Domino LDAP to OID

    Hi, has anyone tried using DIP to synchronize users and groups from Lotus Domino LDAP to OID? There is a connector available with OIM, but since I don't need provisioning was hoping to get away without extra OIM infrastructure. (I will use OIM if I h