Package org.apache.openejb.monitoring

Examples of org.apache.openejb.monitoring.ObjectNameBuilder


        return new PojoEndpoint(loader, bus, port, context, target, transportFactory, bindings, serviceConfiguration);
    }

    @Override
    protected ObjectName registerMBean() {
        final ObjectName name = new ObjectNameBuilder("openejb.management")
            .set("j2eeType", "JAX-WS")
            .set("J2EEServer", "openejb")
            .set("J2EEApplication", null)
            .set("EndpointType", "POJO")
            .set("name", target.getSimpleName())
View Full Code Here


        Collections.sort(resourcesToLog);

        for (final Logs.LogResourceEndpointInfo resource : resourcesToLog) {

            // Init and register MBeans
            final ObjectNameBuilder jmxName = new ObjectNameBuilder("openejb.management")
                .set("j2eeType", "JAX-RS")
                .set("J2EEServer", "openejb")
                .set("J2EEApplication", base)
                .set("EndpointType", resource.type)
                .set("name", resource.classname);

            final ObjectName jmxObjectName = jmxName.build();
            LocalMBeanServer.registerDynamicWrapperSilently(
                new RestServiceMBean(resource),
                jmxObjectName);

            jmxNames.add(jmxObjectName);
View Full Code Here

        return null;
    }

    protected static ObjectName getObjectName(final String serviceName) {
        final ObjectNameBuilder jmxName = new ObjectNameBuilder("openejb");
        jmxName.set("type", "ServerService");
        jmxName.set("name", serviceName);
        return jmxName.build();
    }
View Full Code Here

                    SystemInstance.get().getBase().getDirectory("."));
            ((HOWLLog)txLog).doStart();
        }

        final GeronimoTransactionManager geronimoTransactionManager = new GeronimoTransactionManager(defaultTransactionTimeoutSeconds, xidFactory, txLog);
        final ObjectNameBuilder jmxName = new ObjectNameBuilder("openejb.management")
                .set("j2eeType", "TransactionManager");
        LocalMBeanServer.registerDynamicWrapperSilently(
                new TransactionManagerMBean(geronimoTransactionManager, defaultTransactionTimeout, txLog),
                jmxName.build());

        return geronimoTransactionManager;
    }
View Full Code Here

                instance = bm.getReference(bean, clazz, creationalContext);
            }

            final MBeanServer server = LocalMBeanServer.get();
            try {
                final ObjectName leaf = new ObjectNameBuilder("openejb.user.mbeans")
                                            .set("application", id)
                                            .set("group", clazz.getPackage().getName())
                                            .set("name", clazz.getSimpleName())
                                            .build();
View Full Code Here

        Collections.sort(resourcesToLog);

        for (final Logs.LogResourceEndpointInfo resource : resourcesToLog) {

            // Init and register MBeans
            final ObjectNameBuilder jmxName = new ObjectNameBuilder("openejb.management")
                .set("j2eeType", "JAX-RS")
                .set("J2EEServer", "openejb")
                .set("J2EEApplication", base)
                .set("EndpointType", resource.type)
                .set("name", resource.classname);

            final ObjectName jmxObjectName = jmxName.build();
            LocalMBeanServer.registerDynamicWrapperSilently(
                new RestServiceMBean(resource),
                jmxObjectName);

            jmxNames.add(jmxObjectName);
View Full Code Here

                instance = bm.getReference(bean, clazz, creationalContext);
            }

            final MBeanServer server = LocalMBeanServer.get();
            try {
                final ObjectName leaf = new ObjectNameBuilder("openejb.user.mbeans")
                                            .set("application", id)
                                            .set("group", clazz.getPackage().getName())
                                            .set("name", clazz.getSimpleName())
                                            .build();
View Full Code Here

            LOGGER.error("can't register the mbean for the entity manager factory {0}", getPUname());
        }
    }

    private ObjectName generateObjectName() {
        ObjectNameBuilder jmxName = new ObjectNameBuilder("openejb.management");
        jmxName.set("ObjectType", "persistence-unit");
        jmxName.set("PersistenceUnit", getPUname());
        objectName = jmxName.build();

        MBeanServer server = LocalMBeanServer.get();
        if (server.isRegistered(objectName)) { // if 2 pu have the same name...a bit uglier but unique
            jmxName.set("PersistenceUnit", getPUname() + "(" + getId() + ")");
            objectName = jmxName.build();
        }

        return objectName;
    }
View Full Code Here

        }
    }

    private static ObjectName getDiscoveryRegistryObjectName() {
        if (null == objectName) {
            final ObjectNameBuilder jmxName = new ObjectNameBuilder("openejb");
            jmxName.set("type", "Server");
            jmxName.set("name", "DiscoveryRegistry");
            objectName = jmxName.build();
        }
        return objectName;
    }
View Full Code Here

        return null;
    }

    protected static ObjectName getObjectName(final String serviceName) {
        final ObjectNameBuilder jmxName = new ObjectNameBuilder("openejb");
        jmxName.set("type", "ServerService");
        jmxName.set("name", serviceName);
        return jmxName.build();
    }
View Full Code Here

TOP

Related Classes of org.apache.openejb.monitoring.ObjectNameBuilder

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.