[jbosstools-dev] Detecting a jboss 7.1 server startup
Max Rydahl Andersen
max.andersen at redhat.com
Fri Aug 31 03:08:44 EDT 2012
Hi Paul,
Is RCPAPP something different than just eclipse with teiid designer loaded ?
Afaik the jboss client are not automatically threadsafe - not sure what API's
Rob S. got in place for talking to the server.
btw. what version of JBoss Tools are you using for this ?
/max
> Hi,
>
> For Teiid Designer, I am trying to add our own extension nodes to the
> tree in the Servers View, where the nodes display the details of the
> Teiid Server deployed on jboss. This is working really well bar a couple
> of threading problems.
>
> My Eclipse IDE has a jboss 7.1 instance started so I run an RCP
> application, which is a clone of the eclipse workbench, to display my
> developed plugins (call this RCPAPP).
>
> In RCPAPP, I have configured a jboss 7.1 runtime server that assumes its
> started, pointing to the one in my IDE. I expand the tree view in the
> Servers View and this displays the disconnected teiid server node correctly.
>
> I click start in the Servers View and that is when RCPAPP freezes.
> Looking at the threads,
>
> main and worker-0 (decorator thread) both try to adapt the IServer for
> different purposes and its a toss up which calls the adapter first. The
> one that gets there first then tries to interrogate the IServer using
> the following:
>
> String requestString = request.toJSONString(true);
> String resultString = JBoss7ManagerUtil.getService(server).execute(new
> AS7ManagementDetails(server),
> requestString);
> return ModelNode.fromJSONString(resultString);
>
> I have used this to detect whether the server has started so the request
> string looks like this:
>
> // Request that finds the name of the server
> ModelNode request = new ModelNode();
> request.get(OP).set(READ_ATTRIBUTE_OPERATION);
> request.get(NAME).set(NAME);
>
> If the request throws an exception that its not connected. This just
> isnt working since this stalls at:
>
> Object.wait(long) line: not available [native method]
> FutureResult$1(AbstractIoFuture<T>).await(long, TimeUnit) line: 101
> ProtocolChannelClient.connectSync(CallbackHandler, Map<String,String>,
> SSLContext) line: 140
> ManagementClientChannelStrategy$Establishing.getChannel() line: 166
> RemotingModelControllerClient.getOrCreateChannel() line: 138
>
> So can you help?
>
> 1) Any info as to why the request would be stalled even though the
> server has been started in the IDE but not completely in RCPAPP.
>
> 2) Can you suggest a better way in java to conclude that the server (and
> maybe the IServer) has been completely started. I have found [1] but not
> quite sure whether this would be suitable for a jboss 7.1 that has
> already started
>
> Happy to provide further information (offlist or irc if preferred), as
> required.
>
> The thread dump of the RCPAPP at the point of freeze is attached.
>
> * Worker-1 is the stalled thread while main is waiting on a sync lock
> for worker-1 to complete its adaptation of the IServer to a TeiidServer
> (POJO modelling the teiid server).
>
> [1] https://community.jboss.org/wiki/HowDoIGetRemoteAccessToMyMBean
>
> Cheers
>
> PGR
>
> --
> Paul Richardson
>
> * p.g.richardson at redhat.com
> * p.g.richardson at phantomjinx.co.uk
> <threaddump.txt>_______________________________________________
> jbosstools-dev mailing list
> jbosstools-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/jbosstools-dev
More information about the jbosstools-dev
mailing list