package org.syrup.jndi;
import org.syrup.services.BlobClient;
import javax.naming.Context;
import javax.naming.InitialContext;
/**
* Deploys a BlobClient.
*
* @author Robbert van Dalen
*/
public class BlobClientDeployment
{
static final String COPYRIGHT = "Copyright 2005 Robbert van Dalen."
+ "At your option, you may copy, distribute, or make derivative works under "
+ "the terms of The Artistic License. This License may be found at "
+ "http://www.opensource.org/licenses/artistic-license.php. "
+ "THERE IS NO WARRANTY; USE THIS PRODUCT AT YOUR OWN RISK.";
/**
* Called from the command line.
*
* @param args
* The command line arguments. Should be one entry (host:port).
*/
public static void main(String[] args) throws Throwable
{
String location = "localhost:6666";
// If the first arg is specified than this will be the connection
// specification
if (args.length > 0)
{
location = args[0];
}
Context ctx = new InitialContext();
BlobClient client = new BlobClient(location);
ctx.rebind("syrupBlobClient", client);
}
}