public static void main(String[] args) throws ModelException, InterruptedException
    {
        
        BSDFLogger.initInfoLogger();

        /* Args...
         needed: 1 deploymentLocation, 1 containerId, 1 containerURL
         optional: 1,N externalContainerIdentifier
         at least one service. For each service: 1 pathToPackedService
         */
        System.out.println("Launched with " + args.length + " args...");

        if (args.length < 3)
        {
            System.out.println("Usage: ContainerLauncher deploymentLocation containerId containerURL [externalContainerIdentifier] pathToPackedService");
            return;
        }

        String deploymentLocation = args[0];
        String containerId = args[1];
        String containerURL = args[2];

        // container initialization
        BSDMServiceContainer serviceContainer
                = new BSDMServiceContainer(
                        new SemanticLocator(deploymentLocation),
                        new SemanticIdentifier(containerId),
                        containerURL);

        if (args.length > 3)
        {
            int index = 3;

            // register external containers in initialized container
            while (args[index].contains("://"))
            {
                String externalContainerIdentifier = args[index];
                serviceContainer.addRemoteContainer(new SemanticIdentifier(externalContainerIdentifier));
                index++;
            }

            // register packed services in initialized container
            for (; index < args.length; index++)
            {
                String pathToPackedService = args[index];
                serviceContainer.registerService(new SemanticLocator(pathToPackedService));
            }
        }

        // launch container
        serviceContainer.start();

//        while(true)
//        {
//           Thread.sleep(1000000); 
//        }

    }
public static void main ( String [ ] args ) throws ModelException , InterruptedException { BSDFLogger . initInfoLogger ( ) ; System . out . println ( "Launched with " + args . length + " args..." ) ; if ( args . length < 3 ) { System . out . println ( "Usage: ContainerLauncher deploymentLocation containerId containerURL [externalContainerIdentifier] pathToPackedService" ) ; return ; } String deploymentLocation = args [ 0 ] ; String containerId = args [ 1 ] ; String containerURL = args [ 2 ] ; BSDMServiceContainer serviceContainer = new BSDMServiceContainer ( new SemanticLocator ( deploymentLocation ) , new SemanticIdentifier ( containerId ) , containerURL ) ; if ( args . length > 3 ) { int index = 3 ; while ( args [ index ] . contains ( "://" ) ) { String externalContainerIdentifier = args [ index ] ; serviceContainer . addRemoteContainer ( new SemanticIdentifier ( externalContainerIdentifier ) ) ; index ++ ; } for ( ; index < args . length ; index ++ ) { String pathToPackedService = args [ index ] ; serviceContainer . registerService ( new SemanticLocator ( pathToPackedService ) ) ; } } serviceContainer . start ( ) ; }
@param args the command line arguments
@throws com.hi3project.broccoli.bsdl.impl.exceptions.ModelException
@throws java.lang.InterruptedException