[
https://issues.jboss.org/browse/AS7-772?page=com.atlassian.jira.plugin.sy...
]
Brian Stansberry commented on AS7-772:
--------------------------------------
This isn't really complete as the ManagementResourceRegistration is available via the
OperationContext but its really the DeploymentUnitProcessors that need it; a new task
needs to be opened. Stefano Maestri also posted about the missing aspects on the dev list
in July. Here's an IRC snippet with Scott Marlow that illustrates the issue:
[1:08pm] smarlow: if the /deployment=foo.ear/subsystem-jpa/... structure is going to
change, as I evolve the support, that would probably break the cli users, I would think
[1:08pm] bstansberry: correct; the structure should be nailed down
[1:09pm] smarlow: so, might need to build more long term support now but I'm
conflicting with doing more than is needed
[1:09pm] smarlow: okay, good to know
[1:09pm] bstansberry: but I don't think you can really do that across JPA providers
[1:09pm] bstansberry: there's no contract of what people are supposed to expose
[1:10pm] bstansberry: I could see
/deployment=foo.ear/subsystem-jpa/provider=hibernate/session-factory=xxx
[1:10pm] smarlow: I was thinking that it would be nice to allow people to do hibernate 4
stuff, eventually, someone will want to see hibernate 3 stuff possibly also. And OGM
[1:11pm] bstansberry: so /deployment=foo.ear/subsystem-jpa/provider=hibernate -- anything
under that should be stable
[1:12pm] bstansberry: but /deployment=foo.ear/subsystem-jpa/provider=ogm -- whatever under
that is provided by the ogm guys
[1:12pm] bstansberry: and whether /deployment=foo.ear/subsystem-jpa/provider=hibernate
exists or not depends on whether hibernate is the provider
[1:12pm] bstansberry: which is fine
[1:13pm] smarlow: If I start out with only support for
/deployment=foo.ear/subsystem-jpa/provider=hibernate and later have other things, I think
that is locked down enough
[1:13pm] bstansberry: BTW, see org.jboss.as.webservices.dmr.WSExtension for how they
register their stuff under /deployment=foo.ear/subsystem=webservices
[1:13pm] bstansberry: right
[1:15pm] bstansberry:
https://github.com/jbossas/jboss-as/blob/master/webservices/server-integr...
[1:17pm] smarlow: hmm
[1:17pm] smarlow: final ManagementResourceRegistration deployments =
subsystem.registerDeploymentModel(new DescriptionProvider() {
[1:18pm] smarlow: this is subsystem start time code?
[1:18pm] smarlow: or app deployment time?
[1:18pm] smarlow: I guess the method name tells registerDeploymentModel
[1:19pm] bstansberry: this is Extension initialization code; so normally boot time
[1:19pm] bstansberry: it's the same as your JPAExtension
[1:20pm] bstansberry: but instead of just registering resources for the
/subsystem=webservices part of the tree, the subsystem.registerDeploymentModel will make
them available for use use /deployment=*/subsystem=webservices/
[1:21pm] bstansberry: the tricky part for you is you don't know what providers to
register
[1:22pm] bstansberry: how are providers integrated?
[1:23pm] smarlow: sound like I need to register this management code statically for all
known providers that I want to manage
[1:23pm] bstansberry: you could do a ServiceLoader thing
[1:24pm] bstansberry: if the modules for the providers are going to be visible to the JPA
extension module when JPAExtension is called
[1:24pm] smarlow: currently, the provider can be packaged with the app (picked up via
ServiceLoader thing) or can be an AS7 module (org.hibernate:3 or org.hibernate:main
currently)
[1:24pm] bstansberry: ah, ok
[1:24pm] smarlow: or org.hibernate:ogm
[1:25pm] smarlow: there could be a eclipsement provider someday
[1:25pm] smarlow: there could be a EclipseLink provider someday
[1:25pm] • bstansberry looks at modules.xml for org.jboss.as.jpa
[1:25pm] smarlow: but I'm not worried about that this year
[1:26pm] bstansberry: ok, org.jboss.as.jpa has no dependency on
org.jboss.as.jpa.hibernate.3 or hibernate.4
[1:27pm] bstansberry: so you couldn't use a ServiceLoader to pull in an SPI impl those
modules would provide
[1:27pm] smarlow: right, its all dynamically done at deployment time now
[1:29pm] smarlow: we could include it in the org.jboss.as.jpa.hibernate:3 or
org.jboss.as.jpa.hibernate:4 integration classes
[1:29pm] smarlow: that is where the integration spi implementation classes are
[1:29pm] bstansberry:
https://issues.jboss.org/browse/AS7-772
[1:29pm] bstansberry: which only partly solves the problem
[1:30pm] bstansberry:
https://github.com/jbossas/jboss-as/blob/master/server/src/main/java/org/...
[1:31pm] bstansberry: that's the interface that's available to DUPs
[1:31pm] bstansberry: that createDeploymentSubModel method lets you create a real model
for some resource tree that was registered in JPAExtension
[1:31pm] smarlow: interesting, so I would use getDeploymentSubsystemModel +
createDeploymentSubModel
[1:32pm] bstansberry: but, you can't register your tree in JPAExtension because you
don't know
[1:32pm] bstansberry: what the available providers are
[1:32pm] smarlow: well, we could register hibernate4
[1:32pm] bstansberry: so, sounds like we need to add hooks to let you register stuff in
DeploymentUnit
[1:34pm] bstansberry: that's a bit nasty; will take some thought
....
[1:52pm] bstansberry: We're probably at some point going to have to fix the API issue
with DeploymentUnit that I mentioned above
[1:52pm] bstansberry: Stefano Maestri has a similar issue
[1:53pm] bstansberry: the management API exposed by a resource adapter is not known until
deployment time
Allow operation handlers to register child ModelNodeRegistrations
-----------------------------------------------------------------
Key: AS7-772
URL:
https://issues.jboss.org/browse/AS7-772
Project: Application Server 7
Issue Type: Feature Request
Components: Domain Management
Reporter: Brian Stansberry
Assignee: Brian Stansberry
Priority: Critical
Fix For: 7.0.0.CR1
Handlers (specifically datasource add handlers) can sometimes add services whose
management interface is not known until runtime. The context provided to handlers should
provide a hook to allow them to register child ModelNodeRegistration objects, relative to
the resource the handler is managing.
--
This message is automatically generated by JIRA.
For more information on JIRA, see:
http://www.atlassian.com/software/jira