Can't programmatically create new bundle in JON from a Maven Repository

Solution Verified - Updated -

Issue

  • We plan to put deployable artifacts in our Maven repository, expose that as a content source in JON, and automatically create bundles from these Artifacts, in order to be able to do automatic deployment.
  • To do this, I wanted to create bundles programmatically from a plugin within the server.
  • To be able to do this, I tried two options:

    • Inject BundleManagerBean into the plugin I'm writing -> This looks to be the clean way to do it, but I get nullpointers when I try to call the injected bean. How should I inject it? I tried with both @Resource and @EJB, both on the BundleManagerBean and on the BundleManagerLocal interface.
    • I tried using the RemoteClient class (which is used by the CLI). But, there, I get:

      java.lang.RuntimeException: org.rhq.enterprise.server.auth.SubjectManagerRemoteSimple: frozen class (cannot edit)
      when logging in.
      
  • Am I right that currently, an artifact repository is not supported as content source?

  • What's the clean way to do this?

Environment

  • JBoss Operations Network (JON) 2.4.1

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.