Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 /*
  * RmiSessionServer.java
  *
  * Created on January 10, 2000, 4:47 PM
  
  * Copyright © 2011 jbundle.org. All rights reserved.
  */
 package org.jbundle.base.screen.control.swing.activator;
 
import  org.jbundle.util.osgi.bundle.BaseBundleService;
import  org.osgi.framework.BundleContext;
import  org.osgi.framework.ServiceEvent;
public class AppletActivator extends BaseBundleService
	protected BaseAppletReference applet = null;
    String[] args = {
//x    		"menu=dev.tourapp.com",
//x    		"background=backgrounds/worldmapalpha.gif",
//x    		"backgroundcolor=#EEEEFF",
//x    		"mainSharedDBName=main_base",
//x    		"local=Jdbc",
//x    		"remote=Jdbc",
//x    		"table=Jdbc",
    		};	// TODO(don) Fix this
	/*
	 * (non-Javadoc)
	 * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
	 */
	public void start(BundleContext contextthrows Exception {
		super.start(context);
	}
	/*
	 * (non-Javadoc)
	 * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
	 */
	public void stop(BundleContext contextthrows Exception {
		super.stop(context);
	}
    @Override
    public void serviceChanged(ServiceEvent event) {
        if (event.getType() == ServiceEvent.REGISTERED)
        { // Osgi Service is up, Okay to start the server
            ..println("Starting Applet");
    		if ( == null)
    		{
    	        Map<String,ObjectpropertiesTemp = new Hashtable<String,Object>();
    	        Util.parseArgs(propertiesTemp);
    	        //?server = new SApplet(args);
    	        SApplet.main();
    	         = Application.getRootApplet();
//?    	        Environment env = new Environment(propertiesTemp);
    	        // Note the order that I do this... this is because MainApplication may need access to the remoteapp during initialization
    		}
        }
        if (event.getType() == ServiceEvent.UNREGISTERING)
        {
            if ( != null)
            {
            	if (((Task)()).getApplication() != null)
            		((Task)()).getApplication().free();
            	else
            		.free();
            }
             = null;
        }        
    }
New to GrepCode? Check out our FAQ X