[JBoss Microcontainer Development] New message: "Using MetaDataRetrievalFactory is missing addition"
by Ales Justin
User development,
A new message was posted in the thread "Using MetaDataRetrievalFactory is missing addition":
http://community.jboss.org/message/524180#524180
Author : Ales Justin
Profile : http://community.jboss.org/people/alesj
Message:
--------------------------------------------------------------
When we use an explicit MetaDataRetrievalFactory to create MDRetrieval for scope level,
we never actually add the newly created retrieval to repository.
This results in retrieval override, since the factory is invoked for every lookup.
Just follow PreInstallAction and its MD::addMetaData invocation.
AbstractKernelScopeInfo
public void addMetaData(MutableMetaDataRepository repository, ControllerContext context)
{
this.repository = repository;
ScopeKey scope = getMutableScope();
MetaDataRetrieval retrieval = repository.getMetaDataRetrieval(scope); // HERE -- factory creates it
MutableMetaDataLoader mutable;
if (retrieval == null)
{
mutable = initMutableMetaDataRetrieval(repository, context, scope);
repository.addMetaDataRetrieval(mutable);
addedScopes.add(scope);
}
else
{
mutable = getMutableMetaDataLoader(retrieval);
}
if (mutable == null)
{
log.warn("MetaData context is not mutable: " + retrieval + " for " + context.toShortString());
return;
}
updateMetaData(repository, context, mutable, true);
}
BasicMetaDataRepository
public MetaDataRetrieval getMetaDataRetrieval(ScopeKey key)
{
MetaDataRetrieval result = retrievals.get(key);
if (result != null)
return result;
// Is this a single level?
Collection<Scope> scopes = key.getScopes();
if (scopes.size() != 1)
return null;
// See if we have a factory
Scope scope = scopes.iterator().next();
ScopeLevel scopeLevel = scope.getScopeLevel();
MetaDataRetrievalFactory factory = getMetaDataRetrievalFactory(scopeLevel);
if (factory == null)
return null;
// We have a factory, use it
return factory.getMetaDataRetrieval(scope); // HERE -- created, but never added
}
I currently fixed it by adding the newly created retrieval in the MDRFactory itself.
But what should be the right place to do it? Or how?
Since AbstractKernelScopeInfo only cares about getting the MDRetrieval.
Perhaps a getOrCreateAndAdd method on MutableMetaDataRepository?
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/524180#524180
16 years, 2 months
[jBPM] New message: "Re: Exception handling in JBPM4"
by Flavio N.
User development,
A new message was posted in the thread "Exception handling in JBPM4":
http://community.jboss.org/message/524179#524179
Author : Flavio N.
Profile : http://community.jboss.org/people/VegaMilano
Message:
--------------------------------------------------------------
> jedizippy ha scritto:
>
> Your custom class would implement the ExternalActivityBehaviour
Well, the custom class - MyClass in the example I posted - is a third-party class and I can't modify it; I have to call its method as-is and I'd like to handle the exception. Because it's not the only class and method I would like to call in the process and they have different input and output parameters it's not feasible to wrap all of them with implementations of ExternalActivityBehaviour.
Is it not possible to make the same things with XML elements in the jpdl.xml file?
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/524179#524179
16 years, 2 months
[JBoss Remoting] New message: "ssl socket creation error"
by ayrat k
User development,
A new message was posted in the thread "ssl socket creation error":
http://community.jboss.org/message/524167#524167
Author : ayrat k
Profile : http://community.jboss.org/people/ayrat.kv
Message:
--------------------------------------------------------------
hi
i want to make ejb invoking by ssl. AS version is jboss-5.1.0.GA.
So i made actions
1) created keystore in server/mmslegacy-backend/conf directory
keytool -genkeypair -alias mmslegacy-ssl -keystore mmslegacy.store
2) changed ejb 3 remoting connector in server/mmslegacy-backend/deploy/ejb3-connectors-jboss-beans.xml
<bean name="org.jboss.ejb3.RemotingConnector"
class="org.jboss.remoting.transport.Connector">
<property name="invokerLocator">
<value-factory bean="ServiceBindingManager"
method="getStringBinding">
<parameter>
jboss.remoting:type=Connector,name=DefaultEjb3Connector,handler=ejb3
</parameter>
<parameter>
<null />
</parameter>
<parameter>sslsocket://${jboss.bind.address}:${port}</parameter>
<parameter>
<null />
</parameter>
<parameter>3843</parameter>
</value-factory>
</property>
<property name="serverConfiguration">
<inject bean="ServerConfiguration" />
</property>
</bean>
3) Start jboss with command
run.sh -c mmslegacy-backend -b 0.0.0.0 -Djavax.net.ssl.keyStore=../server/mmslegacy-backend/conf/mmslegacy.store -Djavax.net.ssl.keyStorePassword=zxasqw
And i have an error during jboss boot
17:04:20,481 ERROR [AbstractKernelController] Error installing to Start: name=org.jboss.ejb3.RemotingConnector state=Create
java.io.IOException: SocketServerInvoker[ayrat:3843] error creating ServerSocket[0.0.0.0:3843]: java.security.NoSuchAlgorithmException: Error constructing implementation (algorithm: Default, provider: SunJSSE, class: com.sun.net.ssl.internal.ssl.DefaultSSLContextImpl)
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/524167#524167
16 years, 2 months
[JBoss Tools] New message: "Re: Adding JBoss AS source to a project"
by arjan tijms
User development,
A new message was posted in the thread "Adding JBoss AS source to a project":
http://community.jboss.org/message/524157#524157
Author : arjan tijms
Profile : http://community.jboss.org/people/atijms
Message:
--------------------------------------------------------------
> mailto:max.andersen@jboss.com wrote:
>
> hmm - I would be surprised if the wtp adapters does that...it sounds wrong.
We're seeing the exact same problem here. The WTP adapter automatically adds the source of our project and the JBoss AS jars to the launch configuration, while the JBoss AS tools adapter doesn't. The result is that during debugging, the debugger can't find a single source file when using the JBoss AS tools adapter. There is no such problem when using the WTP adapter.
If what the WTP adapter does is wrong in your opinion, then do you mean that JBoss AS tools users are supposed to attach all source code (including that of their own project) twice, or is their some other mechanism via which it should work with JBoss AS tools then?
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/524157#524157
16 years, 2 months