glassfish
  1. glassfish
  2. GLASSFISH-16332

Allow ConnectorRuntime to return a ProbeProviderFactory

    Details

    • Type: New Feature New Feature
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 3.1
    • Fix Version/s: None
    • Component/s: jca
    • Labels:
      None

      Description

      The connector architecture doesn't (seem to) currently support injection, therefore if one wants to provide custom monitoring for a resource adapter, the only option seems to be to create an OSGI component instead of a WAR. The alternative to creating a OSGI component is to inject a org.glassfish.flashlight.provider.ProbeProviderFactory object and manually register the probe providers, however as injection isn't supported, this is impossible.

      A simple solution would be to add the following to the com.sun.enterprise.connectors.ConnectorRuntime class

      @Inject
      private ProbeProviderFactory probeProviderFactory;

      public ProbeProviderFactory getProbeProviderFactory(){
      return probeProviderFactory;
      }

      this means that a jca component can simply call

      ConnectorRuntime.getRuntime().getProbeProviderFactory().getProbeProvider(xxxx);

      A similar mechanism seems to be in place in the EJB components which offer

      ppf=EjbContainerUtilImpl.getInstance().getProbeProviderFactory();

      Alternatively a mechanism for injecting this (and possibly other resources) directly would be much appreciated...

      Thanks

        Activity

        Hide
        Jagadish added a comment -

        There is no support for resource injection in a resource-adapter artifact.

        There are two options :
        1) Similar to injection, we can look at making ProbeProviderFactory available via naming lookup.
        2) As you have suggested, we can look at providing an API.
        However, "EjbContainerUtil" is not a public API.
        We can look at providing a public API from connector-runtime.

        Show
        Jagadish added a comment - There is no support for resource injection in a resource-adapter artifact. There are two options : 1) Similar to injection, we can look at making ProbeProviderFactory available via naming lookup. 2) As you have suggested, we can look at providing an API. However, "EjbContainerUtil" is not a public API. We can look at providing a public API from connector-runtime.
        Hide
        jsl123 added a comment -

        I'm happy with either solution. I used ConnectorRuntime as it seemed fitting and as this isn't in the specs, wasn't too worried about it being glassfish only and not having a public api. Happy to test whatever is decided upon.

        Thanks

        Show
        jsl123 added a comment - I'm happy with either solution. I used ConnectorRuntime as it seemed fitting and as this isn't in the specs, wasn't too worried about it being glassfish only and not having a public api. Happy to test whatever is decided upon. Thanks

          People

          • Assignee:
            Jagadish
            Reporter:
            jsl123
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:

              Time Tracking

              Estimated:
              Original Estimate - 1 minute
              1m
              Remaining:
              Remaining Estimate - 1 minute
              1m
              Logged:
              Time Spent - Not Specified
              Not Specified