Package org.apache.geronimo.kernel.basic

Examples of org.apache.geronimo.kernel.basic.BasicKernel


* @version $Rev: 541105 $ $Date: 2007-05-24 06:27:56 +0800 (Thu, 24 May 2007) $
*/
public class GenericConnectionManagerGBeanSerializationTest extends TestCase {

    public void testSerialization() throws Exception {
        Kernel kernel = new BasicKernel("test");
        kernel.boot();
        AbstractName abstractName = new AbstractName(URI.create("foo/bar/1/car?name=ConnectionManager"));
        GBeanData data = new GBeanData(abstractName, GenericConnectionManagerGBean.GBEAN_INFO);
        data.setAttribute("transactionSupport", NoTransactions.INSTANCE);
        data.setAttribute("pooling", new SinglePool(10, 0, 5000, 5, false, false, true));
        kernel.loadGBean(data, this.getClass().getClassLoader());
        kernel.startGBean(abstractName);
        Object cm = kernel.getGBean(abstractName);
        assertTrue(cm instanceof GenericConnectionManagerGBean);
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        ObjectOutputStream out = new ObjectOutputStream(baos);
        out.writeObject(cm);
        out.flush();
View Full Code Here

TOP

Related Classes of org.apache.geronimo.kernel.basic.BasicKernel

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.