[CDO] CDO thread prevent JVM to exit on client side standalone [message #903150] |
Wed, 22 August 2012 05:01  |
Eclipse User |
|
|
|
Hi,
I'm using using the client side of CDO in standalone mode (pure Java). When I run the followinf code with a CDO server running evreything is fine. But when the server is not running I get a ConnectorException about a timeout, then the following thread prevent the JVM from exiting. How can I avoid this ?
Thread [ReceiveSerializer-Channel[Control, CLIENT]] (Suspended)
Unsafe.park(boolean, long) line: not available [native method]
LockSupport.parkNanos(Object, long) line: 226
AbstractQueuedSynchronizer$ConditionObject.awaitNanos(long) line: 2081
LinkedBlockingQueue<E>.poll(long, TimeUnit) line: 423
Channel$1ChannelReceiveSerializer(QueueWorker<E>).doWork(Worker$WorkContext) line: 78
Channel$1ChannelReceiveSerializer(QueueWorker<E>).work(Worker$WorkContext) line: 72
Worker$WorkerThread.run() line: 206
----------------- code -----------------
/**
* @param args
*/
public static void main(String[] args) {
IManagedContainer container = ContainerUtil.createContainer();
Net4jUtil.prepareContainer(container);
CDONet4jUtil.prepareContainer(container);
TCPUtil.prepareContainer(container);
container.activate();
IConnector connector = null;
try {
connector = Net4jUtil.getConnector(container, "tcp://localhost:2036/");
} catch (ConnectorException e) {
LifecycleUtil.deactivate(container);
// I also tried : container.deactivate();
System.out.println(e.getMessage());
}
}
----------------- code -----------------
I'm using :
org.eclipse.emf.cdo 4.0.1
org.eclipse.emf.cdo.net4j 4.0.1
org.eclipse.net4j 4.0.0
regards,
Yvan.
|
|
|
Re: [CDO] CDO thread prevent JVM to exit on client side standalone [message #903154 is a reply to message #903150] |
Wed, 22 August 2012 05:11   |
Eclipse User |
|
|
|
Hi Yvan,
CDO 4.0 is out of maintenance. Can you please test that the problem persists in 4.1 and, if so, submit a bugzilla with
the infos you've given here?
Cheers
/Eike
----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
Am 22.08.2012 11:01, schrieb Yvan Lussaud:
> Hi,
>
> I'm using using the client side of CDO in standalone mode (pure Java). When I run the followinf code with a CDO server
> running evreything is fine. But when the server is not running I get a ConnectorException about a timeout, then the
> following thread prevent the JVM from exiting. How can I avoid this ?
>
> Thread [ReceiveSerializer-Channel[Control, CLIENT]] (Suspended)
> Unsafe.park(boolean, long) line: not available [native method]
> LockSupport.parkNanos(Object, long) line: 226
> AbstractQueuedSynchronizer$ConditionObject.awaitNanos(long) line: 2081
> LinkedBlockingQueue<E>.poll(long, TimeUnit) line: 423
> Channel$1ChannelReceiveSerializer(QueueWorker<E>).doWork(Worker$WorkContext) line: 78
> Channel$1ChannelReceiveSerializer(QueueWorker<E>).work(Worker$WorkContext) line: 72
> Worker$WorkerThread.run() line: 206
>
>
> ----------------- code -----------------
>
> /**
> * @param args
> */
> public static void main(String[] args) {
> IManagedContainer container = ContainerUtil.createContainer();
> Net4jUtil.prepareContainer(container);
> CDONet4jUtil.prepareContainer(container);
> TCPUtil.prepareContainer(container);
> container.activate();
>
> IConnector connector = null;
> try {
> connector = Net4jUtil.getConnector(container, "tcp://localhost:2036/");
> } catch (ConnectorException e) {
> LifecycleUtil.deactivate(container);
> // I also tried : container.deactivate();
> System.out.println(e.getMessage());
> }
> }
>
>
> ----------------- code -----------------
>
>
> I'm using :
>
> org.eclipse.emf.cdo 4.0.1
> org.eclipse.emf.cdo.net4j 4.0.1
> org.eclipse.net4j 4.0.0
>
>
> regards,
> Yvan.
>
|
|
|
|
Powered by
FUDForum. Page generated in 0.04921 seconds