Package org.jacorb.config

Examples of org.jacorb.config.Configuration


   
    private static LoggerFactory newLoggerFactory()
    {
        try
        {
            Configuration config = JacORBConfiguration.getConfiguration(new Properties(), null, false);
           
            LoggerFactory factory = newLog4jLoggerFactory(config);
           
            if (factory == null)
            {
View Full Code Here


public class ConfigurationTest extends TestCase
{
    public void testGetLoggerName() throws Exception
    {
        Configuration config = JacORBConfiguration.getConfiguration(new Properties(), null, false);
        assertEquals("jacorb.test.config", config.getLoggerName(getClass()));
    }
View Full Code Here

     * @param info the info object.
     */
    public void post_init(ORBInitInfo info)
    {
        final ORB orb = ((org.jacorb.orb.portableInterceptor.ORBInitInfoImpl) info).getORB();
        final Configuration config = orb.getConfiguration();
        final Logger logger = config.getNamedLogger("org.jacorb.interceptors.ior_init");

        try
        {
            int giop_minor =
                config.getAttributeAsInteger("jacorb.giop_minor_version",2);

            if( giop_minor > 0 )
            {
                info.add_ior_interceptor(new CodeSetInfoInterceptor(orb));
            }
View Full Code Here

        try {
            // Create the naming service
            org.jacorb.naming.NamingContextImpl.init(orb, rootPOA);
            NamingContextImpl ns = new NamingContextImpl(namingPOA);
            Configuration config = ((org.jacorb.orb.ORB) orb).getConfiguration();
            ns.configure(config); // configure the name service using the JacORB config
            byte[] rootContextId = "root".getBytes();
            namingPOA.activate_object_with_id(rootContextId, ns);
            namingService = NamingContextExtHelper.narrow(namingPOA.create_reference_with_id(rootContextId,
                    "IDL:omg.org/CosNaming/NamingContextExt:1.0"));
View Full Code Here

        this.orb = orb;
        this.conn_mg = conn_mg;
        this.registeredProfile = registeredProfile;
        this.client_initiated = client_initiated;

        final Configuration configuration = ((org.jacorb.orb.ORB)orb).getConfiguration();
        logger =
            configuration.getLogger("jacorb.giop.conn");

        ignoreComponentInfo = ! (configuration.getAttributeAsBoolean("jacorb.codeset", true));

        //For BiDirGIOP, the connection initiator may only generate
        //even valued request ids, and the other side odd valued
        //request ids. Therefore, we always step the counter by 2, so
        //we always get only odd or even ids depending on the counters
View Full Code Here

        try
        {
            Admin admin =
                AdminHelper.narrow( orb.resolve_initial_references("ImplementationRepository"));

            Configuration config = ((org.jacorb.orb.ORB)orb).getConfiguration();
            Logger logger = config.getLogger("jacorb.imr.manager");

            ServerInfo info = null;

            try
            {
View Full Code Here

                          GIOPConnection _connection )
    {
        super();

        this.orb = orb;
        Configuration config = orb.getConfiguration();
        this.logger = config.getLogger("jacorb.org.giop");
        this.cachePoaNames = config.getAttribute("jacorb.cachePoaNames","off").equals("on");

        this.inputStream = inStream;
        connection = _connection;

        calcTimingPolicies();
View Full Code Here

    private Policy policy2Mock;

    protected void setUp() throws Exception
    {
        final MockControl configControl = MockControl.createControl(Configuration.class);
        final Configuration configMock = (Configuration) configControl.getMock();

        configControl.expectAndReturn(configMock.getLogger("jacorb.orb.policies"), new NullLogger());

        configControl.replay();

        objectUnderTest = new PolicyManager(configMock);
View Full Code Here

    protected void configureObjectUnderTest(String name, Configurable configurable) throws Exception
    {
        MockControl configControl = MockControl
            .createControl(Configuration.class);
        Configuration configMock = (Configuration) configControl.getMock();
        configControl.expectAndReturn(configMock.getLogger("jacorb.orb.socketfactory"), new NullLogger());

        if (name.startsWith("testSetLocalhost"))
        {
            configControl.expectAndReturn(configMock.getAttribute("OAIAddr", ""), "localhost");
        }
        else if (name.startsWith("testSetHostname"))
        {
            configControl.expectAndReturn(configMock.getAttribute("OAIAddr", ""), InetAddress.getLocalHost().getCanonicalHostName());
        }
        else
        {
            configControl.expectAndReturn(configMock.getAttribute("OAIAddr", ""), "");
        }

        configControl.replay();

        configurable.configure(configMock);
View Full Code Here

    protected SocketFactory newObjectUnderTest() throws ConfigurationException
    {
        final PortRangeSocketFactory factory = new PortRangeSocketFactory();

        MockControl configControl = MockControl.createControl(Configuration.class);
        Configuration configMock = (Configuration) configControl.getMock();

        configControl.expectAndReturn(configMock.getLogger("jacorb.orb.socketfactory"), new NullLogger());
        configControl.expectAndReturn(configMock.getAttributeAsInteger(PortRangeSocketFactory.MIN_PROP), MIN);
        configControl.expectAndReturn(configMock.getAttributeAsInteger(PortRangeSocketFactory.MAX_PROP), MAX);
        configControl.replay();

        factory.configure(configMock);

        return factory;
View Full Code Here

TOP

Related Classes of org.jacorb.config.Configuration

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.