Giter VIP home page Giter VIP logo

Comments (10)

glassfishrobot avatar glassfishrobot commented on August 25, 2024

Reported by abien

from ejb-spec.

glassfishrobot avatar glassfishrobot commented on August 25, 2024

jlmonteiro said:
As already discussed, that'd be great.
Just not sure if we have to create a new annotation or if we can ask JSR 255 spec lead or members, if they can release.

Thoughts?

Jean-Louis

from ejb-spec.

glassfishrobot avatar glassfishrobot commented on August 25, 2024

benoitf said:
Except that we couldn't have attributes for SLSB, it could be interesting to expose the SLSB method as JMX operations

from ejb-spec.

glassfishrobot avatar glassfishrobot commented on August 25, 2024

mvatkina said:
(Unfortunately) I'm closing this issue for the following reasons:

  • JMX usage is declining with the REST APIs being used instead. If the REST related improvements or integration points need to be addressed, let's start a separate discussion.

  • Even if there is still enough interest in the JMX improvements, any changes to the JMX support should be done across the platform, rather than in a piecemeal fashion in a subset of technologies (even worse, only in one), i.e. it would be at minimum very confusing to the users, if the EJB container provides some special JMX handling that is not available in any other technology. Anybody interested in driving the effort of adding new features to the JMX or the JMX/EE integration would need to start a new JSR for a revision of the JMX spec.

from ejb-spec.

glassfishrobot avatar glassfishrobot commented on August 25, 2024

rherschke said:
Maybe we can have at least a @resource injection of the platformmbeanserver instead?
So one can implement an interceptor with @AroundConstruct to do the registration.

This would pass the rule of separating concerns and will get a clear EJB Pojo as well.

Example:

@Inherited
@InterceptorBinding
@Target({TYPE}) @Retention(RUNTIME) public @interface MBean {
    @NotBinding String value() default "";
}

@Interceptor @MBean
public class MBeanInterceptor {

    @Resource
    MBeanServer server;

    @PostConstruct
    public void registerBean(InvocationContext ctx) {
        ctx.proceed();
        ObjectName on = ... // get objectname from annotation value
        server.register(on, ctx.getTarget());
        // or do the neccessary DynamicMBean work here...
    }

    @PreDestroy
    public void unregister(InvocationContext ctx) {
        ObjectName on = ... // get objectname from annotation
        server.unregister(on);
        ctx.proceed();
    }
}

@Singleton @Startup @MBean("com.example:type=MyMXBean")
public class MyMXBean {
// ... }

So with @resource injection, this will work even on appservers with its own MBeanServer, not only with JVM PlatformServer, but the developer do not care about this.

Next, @resource injection could be used also in a normal EJB to do some client work (observe notifications, get attributes aso.) with a registered mbean without the need to distinguish about the right MBeanServer to be used.

from ejb-spec.

glassfishrobot avatar glassfishrobot commented on August 25, 2024

mvatkina said:
This functionality, if available, should not be limited to the EJBs ("any changes to the JMX support should be done across the platform"), correct? If so, I suggest to open the request in the javaee-spec project.

from ejb-spec.

glassfishrobot avatar glassfishrobot commented on August 25, 2024

rherschke said:
@marina, you're right.

see: http://java.net/jira/browse/JAVAEE_SPEC-21

from ejb-spec.

glassfishrobot avatar glassfishrobot commented on August 25, 2024

Was assigned to mvatkina

from ejb-spec.

glassfishrobot avatar glassfishrobot commented on August 25, 2024

This issue was imported from java.net JIRA EJB_SPEC-32

from ejb-spec.

glassfishrobot avatar glassfishrobot commented on August 25, 2024

Marked as won't fix on Tuesday, July 10th 2012, 6:04:28 pm

from ejb-spec.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.