Re: [jboss-user] [JBoss Microcontainer] - How to avoid canonical conversion of AbstractInjectionValueMetaData's value?
by Ales Justin
Ales Justin [http://community.jboss.org/people/alesj] replied to the discussion
"How to avoid canonical conversion of AbstractInjectionValueMetaData's value?"
To view the discussion, visit: http://community.jboss.org/message/536607#536607
--------------------------------------------------------------
> I was just wondering how you were able to register non-canonicalized named bean.
Asked too soon. :-)
The name is un-touched, but we do add an alias if it looks like ObjectName.
/**
* Set the aliases<p>
*
* Aliases in this list only take effect if they are set before installation on the controller
*
* @param aliases the aliases
*/
public void setAliases(Set<Object> aliases)
{
// WARNING: This code is hack for backwards compatiblity
// Here we fixup the aliases to map JMX like ObjectNames to their canonical form
// I've made it a protected method needsAnAlias so others can subclass and
// change the rules (including not doing this at all)
// NOTE: This method should be invoked from all constructors
if (aliases == null)
{
// There are no explicit aliases so just see whether the name is an ObjectName.
Object alias = needsAnAlias(name);
// No alias required
if (alias == null)
this.aliases = null;
else
// Add a single alias with canonical name
this.aliases = Collections.singleton(alias);
}
else
{
// Always clone the aliases passed it
this.aliases = new HashSet<Object>();
// Check the main name
Object alias = needsAnAlias(name);
if (alias != null)
this.aliases.add(alias);
// Check the aliases
for (Object passedAlias : aliases)
{
this.aliases.add(passedAlias);
alias = needsAnAlias(passedAlias);
if (alias != null)
this.aliases.add(alias);
}
}
}
So, your injection should be able to match it no matter which form (canonical or not) you use,
since it should always be able to hit canonicalized, either from actual name or its alias.
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/536607#536607]
Start a new discussion in JBoss Microcontainer at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
16 years
Re: [jboss-user] [JBoss Web Services Development] - CXF jms integration
by Alessio Soldano
Alessio Soldano [http://community.jboss.org/people/alessio.soldano%40jboss.com] replied to the discussion
"CXF jms integration"
To view the discussion, visit: http://community.jboss.org/message/536597#536597
--------------------------------------------------------------
Right, we need proper integration through SPI here. The point is that we need to trigger destination (queue) creation during deployment. That is done using the API a given AS container provides; for instance on AS trunk, right now we'd probably end up creating a configuration for HornetQ to be used by HornetQ deployers (HornetQCoreConfigRealDeployer ?).
As Richard's correctly saying, we should not use those AS API directly in JBWS CXF in order to maintain proper abstraction, so we need to enrich the JBossWS SPI (few additions in org.jboss.wsf.spi.deployment might be enough) for having those info (it's probably just the name of the destinations) available in a container independent way. That part of the SPI could be populated by CXF specific deployment aspect that parses the provided or generated jboss-cxf.xml.
Later in the chain, we'd have another deployment aspect (coming from the container integration) that uses the new SPI info to create the JMS medatadata (HornetQ conf, for isntance) and provides the requirements for the JMS deployers to run.
All this assumes we review the current WSDeploymentAspectDeployer that forces every deployment aspect to be bound to the web deployers, given the JBossWebMetaData input/ouput. I imagine some minor changes might also be required a bit earlier in the deployer chain.
Jim, I'd encourage you to create branches like a did when working on cxf/jaxrpc issue and start doing changes there. Either Richard or me can help you step by step there, till we have something working that can be merged to trunk. This way you can also start now that 3.3.0 is not released yet (this work is targeted for 4.x)
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/536597#536597]
Start a new discussion in JBoss Web Services Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
16 years