[JBoss Microcontainer Development] New message: "Re: Pluggable dependency resolver"
by Kabir Khan
JBoss development,
A new message was posted in the thread "Pluggable dependency resolver":
http://community.jboss.org/message/524424#524424
Author : Kabir Khan
Profile : http://community.jboss.org/people/kabir.khan@jboss.com
Message:
--------------------------------------------------------------
Right,
So the basic outline is that AbstractController.install(ControllerContext) installs the contexts into the controller. In doing so the context goes through several states. Upon entry to each state, the controller checks if the context has all its dependencies resolved, and if so it is moved to the next state. If not, it is left in that state, and we try to resolve the context later once another context is added to the controller. Once the context reaches INSTALLED state it is considered to be installed.
The mechanism that is currently in trunk does this by calling a method internally in resolveContexts(). What this essentially does is to iterate over each controller state. For each controller state it gets a list of the contexts in that state and then for each context see if the dependencies are resolved. The contexts with all dependencies resolved are pushed to the next state, and the contexts that don't are left in the current state. If at least one context could be moved to the next state, we iterate over the states again.
Pseudocode:
resolveContexts()
{
while (resolved)
{
resolved = false;
for (ControllerState state : statesInController)
{
Set<ControllerContext> contexts = getContextsForState(state);
Set<ControllerContext) resolvedContexts = new HashSet<ControllerContext>();
for (ControllerContext context : contexts)
{
//Req. state will normaly be INSTALLED so we don't look at the contexts that have reached that state
if (state == context.getRequiredState())
continue;
//Iterate over context's DependencyItems and try to resolve them
//(they are resolved by looking up the information from the DependencyItem in the controller)
if (isResolved(context), state)
{
resolvedContexts.add(context);
}
}
if (resolvedContexts.size() > 0)
{
for (ControllerContext context : contexts)
incrementState(context); // Puts the context's state to state, and invokes any associated ControllerContextAction
resolved = true;
break;
}
}
}
}
So basically every time a context has its state incremented there could potentially be other contexts waiting for it to enter that state via a dependency which is why we go over and check all the contexts in each state.
With my indexing resolver I take a different approach. When adding a context to the controller I index it by its dependencies. Then later when adding another context, I look in the index if something has an indexed dependency on the new context. If that is the case, I only try to increment the state of the contexts registered as having a dependency.
Some basic profiling (take with a pinch of salt) shows that not that much time is spent actually trying to resolve dependencies with either way of doing it. Having spoken about this with Ales, the reason for this is that most stuff deployed in AS is deployed in the right order or more or less at the same time as their dependencies, so we don't have HUGE numbers of contexts waiting in a state while hoping to reach INSTALLED. If that were the case I am pretty confident that the indexing resolver would win easily.
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/524424#524424
14 years, 11 months
[JBoss Portal Development WSRP] New message: "Connection Problem"
by Burak Eliaçık
JBoss development,
A new message was posted in the thread "Connection Problem":
http://community.jboss.org/message/524417#524417
Author : Burak Eliaçık
Profile : http://community.jboss.org/people/burakeliacik
Message:
--------------------------------------------------------------
Hi,
When i start my applicaion, the jboss throws an exception as below, but this exception is occured occasionally, i read http://docs.jboss.org/jbportal/v2.6.4/referenceGuide/html/wsrp.html#consu... documents and i reconfigure the wsrp producer and consumer, but it happens again. This error is the same with this one http://community.jboss.org/message/426224#426224, but in this thread member mentioned that "+the simplest is to delete portal-wsrp.sar"+ is this the only way to fix this problem. I try this fix but i met this problem again. What should i do? This issue is a configuration problem or what? Thank you for your interest.
Best Regards
javax.management.MBeanException
at org.jboss.mx.interceptor.ReflectedDispatcher.handleInvocationExceptions(ReflectedDispatcher.java:180)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:163)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.varia.scheduler.Scheduler$MBeanListener.handleNotification(Scheduler.java:1346)
at sun.reflect.GeneratedMethodAccessor48.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.jboss.mx.notification.NotificationListenerProxy.invoke(NotificationListenerProxy.java:153)
at $Proxy158.handleNotification(Unknown Source)
at javax.management.NotificationBroadcasterSupport.handleNotification(Unknown Source)
at javax.management.NotificationBroadcasterSupport$SendNotifJob.run(Unknown Source)
at javax.management.NotificationBroadcasterSupport$1.execute(Unknown Source)
at javax.management.NotificationBroadcasterSupport.sendNotification(Unknown Source)
at javax.management.timer.Timer.sendNotification(Unknown Source)
at javax.management.timer.Timer.notifyAlarmClock(Unknown Source)
at javax.management.timer.TimerAlarmClock.run(Unknown Source)
at java.util.TimerThread.mainLoop(Unknown Source)
at java.util.TimerThread.run(Unknown Source)
Caused by: org.jboss.portal.portlet.InvokerUnavailableException: Problem getting service description for producer self, please see the logs for more information.
at org.jboss.portal.wsrp.consumer.WSRPConsumerImpl.getPortlets(WSRPConsumerImpl.java:156)
at org.jboss.portal.portlet.federation.impl.FederatedPortletInvokerService.getPortlets(FederatedPortletInvokerService.java:90)
at org.jboss.portal.core.management.PortletDiscoveryService.processPortletDiscovery(PortletDiscoveryService.java:88)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
... 22 more
Caused by: java.io.IOException: Could not transmit message
at org.jboss.ws.core.client.RemotingConnectionImpl.invoke(RemotingConnectionImpl.java:210)
at org.jboss.ws.core.client.SOAPRemotingConnection.invoke(SOAPRemotingConnection.java:77)
at org.jboss.ws.core.CommonClient.invoke(CommonClient.java:337)
at org.jboss.ws.core.jaxrpc.client.CallImpl.invokeInternal(CallImpl.java:517)
at org.jboss.ws.core.jaxrpc.client.CallImpl.invoke(CallImpl.java:277)
at org.jboss.ws.core.jaxrpc.client.PortProxy.invoke(PortProxy.java:156)
at $Proxy223.getServiceDescription(Unknown Source)
at org.jboss.portal.wsrp.consumer.ProducerInfo.getUnmanagedServiceDescription(ProducerInfo.java:618)
at org.jboss.portal.wsrp.consumer.ProducerInfo.internalRefresh(ProducerInfo.java:303)
at org.jboss.portal.wsrp.consumer.ProducerInfo.detailedRefresh(ProducerInfo.java:254)
at org.jboss.portal.wsrp.consumer.ProducerInfo.refresh(ProducerInfo.java:249)
at org.jboss.portal.wsrp.consumer.ProducerInfo.getPortletMap(ProducerInfo.java:566)
at org.jboss.portal.wsrp.consumer.WSRPConsumerImpl.getPortlets(WSRPConsumerImpl.java:151)
... 29 more
Caused by: org.jboss.remoting.CannotConnectException: Can not connect http client invoker. Connection refused.
at org.jboss.remoting.transport.http.HTTPClientInvoker.useHttpURLConnection(HTTPClientInvoker.java:348)
at org.jboss.remoting.transport.http.HTTPClientInvoker.transport(HTTPClientInvoker.java:137)
at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:122)
at org.jboss.remoting.Client.invoke(Client.java:1634)
at org.jboss.remoting.Client.invoke(Client.java:548)
at org.jboss.ws.core.client.RemotingConnectionImpl.invoke(RemotingConnectionImpl.java:189)
... 41 more
Caused by: java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(Unknown Source)
at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at sun.net.NetworkClient.doConnect(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient.<init>(Unknown Source)
at sun.net.www.http.HttpClient.New(Unknown Source)
at sun.net.www.http.HttpClient.New(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(Unknown Source)
at org.jboss.remoting.transport.http.HTTPClientInvoker.useHttpURLConnection(HTTPClientInvoker.java:277)
... 46 more
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/524417#524417
14 years, 11 months
[JBoss AOP Development] New message: "Re: Help: Error [Instrumentor] AOP Instrumentor failed"
by dfsdf asdas
JBoss development,
A new message was posted in the thread "Help: Error [Instrumentor] AOP Instrumentor failed":
http://community.jboss.org/message/524393#524393
Author : dfsdf asdas
Profile : http://community.jboss.org/people/cuccu83
Message:
--------------------------------------------------------------
I have one question...
In my DemoAspect.class i have that part of code:
.
.
.
if (arg[0] instanceof MessageContext)
{
MessageContext msg = (MessageContext)arg[0];
info.append("\nMessageEnvelope :" + msg.getEnvelope().toString());
}
.
.
.
MessageContext.Class is argument's type that i want change and it is in a jar file contained under *riftsaw.sar/bpel.war/WEB-INF/lib*
while my AOP dir is under *riftsaw.sar/demo.aop*
When try to invoke a service i obtain a ClassLoaderNotFoundException throws by DemoAspect.class because MessageContext class is not found.
Is possible to specify a jar path ? If yes...where?
Or i must follow another strategy?
Thanks
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/524393#524393
14 years, 11 months