tzvika179
asked on
Problem: A program invoking remote objects through RMI refuses to exit
I've got a program calling remote beans on a server (running on JBOSS 246) , and the program works fine. the only problem is that my process (the client) never exits. i've tried, as you can see below, to close the context and the objects on my end - but that doesn't help. also tried to unexport the registry, and that didn't work.
Any ideas?
Here's the code (even though it references other code parts on our end,which are compiled code to me)
String provider = "anfield:1099";
TopazConfiguration conf = TopazConfiguration.getInst ance();
String url = conf.get ("global.configuration.top az.jndi.pr ovider.url ", "localhost:1099");
String urlPkgs = conf.get ("global.configuration.top az.jndi.fa ctory.url. pkgs", "org.jboss.naming");
String facInit = conf.get ("global.configuration.top az.jndi.fa ctory.init ial", "org.jnp.interfaces.Naming ContextFac tory");
Hashtable hash = new Hashtable();
hash.put ("java.naming.provider.url ", (provider != null) ? provider : url);
hash.put ("java.naming.factory.init ial", facInit);
hash.put ("java.naming.factory.url. pkgs", urlPkgs);
InitialContext context = new InitialContext (hash);
AlertHome objHome = (AlertHome) context.lookup ("com.mercury.topaz.tmc.bi zprocess.A lert");
AlertTBP moshe = objHome.create();
//AlertTBP moshe = AlertFactory.create();
try {
moshe.insertRecipientObjec t(rcp);
} catch (Exception e) {
e.printStackTrace(); //To change body of catch statement use Options | File Templates.
}
moshe = null;
objHome = null;
context.close();
//context.unbind("com.merc ury.topaz. tmc.bizpro cess.Alert ");
} catch (NamingException e) {
e.printStackTrace(); //To change body of catch statement use Options | File Templates.
} catch (CreateException e) {
e.printStackTrace(); //To change body of catch statement use Options | File Templates.
} catch (RemoteException e) {
e.printStackTrace(); //To change body of catch statement use Options | File Templates.
}
System.out.println("i got here");
Any ideas?
Here's the code (even though it references other code parts on our end,which are compiled code to me)
String provider = "anfield:1099";
TopazConfiguration conf = TopazConfiguration.getInst
String url = conf.get ("global.configuration.top
String urlPkgs = conf.get ("global.configuration.top
String facInit = conf.get ("global.configuration.top
Hashtable hash = new Hashtable();
hash.put ("java.naming.provider.url
hash.put ("java.naming.factory.init
hash.put ("java.naming.factory.url.
InitialContext context = new InitialContext (hash);
AlertHome objHome = (AlertHome) context.lookup ("com.mercury.topaz.tmc.bi
AlertTBP moshe = objHome.create();
//AlertTBP moshe = AlertFactory.create();
try {
moshe.insertRecipientObjec
} catch (Exception e) {
e.printStackTrace(); //To change body of catch statement use Options | File Templates.
}
moshe = null;
objHome = null;
context.close();
//context.unbind("com.merc
} catch (NamingException e) {
e.printStackTrace(); //To change body of catch statement use Options | File Templates.
} catch (CreateException e) {
e.printStackTrace(); //To change body of catch statement use Options | File Templates.
} catch (RemoteException e) {
e.printStackTrace(); //To change body of catch statement use Options | File Templates.
}
System.out.println("i got here");
I think you might need to post some more code...
Does the following line return?
>> moshe.insertRecipientObjec t(rcp);
(ie. if you add an "i got here" after this line, is it displayed?)
>> moshe.insertRecipientObjec
(ie. if you add an "i got here" after this line, is it displayed?)
;-) Hi Tim.
:-) Morning :-)
ASKER
yea, as i said, the code i didnt post is compiled code to me, i just have the jars, so i can't see the content
and yes it does get to the i get here :-) in fact the program doesnt freeze at all ! it just doesn't exit when main() is done - which to me is weird .
can anyone say anything about maybe unbind? i'm not sure what name needs to be given to it.
and yes it does get to the i get here :-) in fact the program doesnt freeze at all ! it just doesn't exit when main() is done - which to me is weird .
can anyone say anything about maybe unbind? i'm not sure what name needs to be given to it.
Why don't you just do a System.exit() if it is the client?
ASKER
System.exit will work, but i dont want to
That can't be all your code?
That won't compile...
Can you post all your code?
Tim
That won't compile...
Can you post all your code?
Tim
> System.exit will work, but i dont want to
Why not?
You probably have some dangling objects doing some background processing that's why it doesn't exit.
Why not?
You probably have some dangling objects doing some background processing that's why it doesn't exit.
Maybe one of the threads is blocked. Do a thread dump to try and detect this (Ctrl-Break)
Or post your code
Ooooh... CEHJ is here early :-)
ASKER
How do i do the thread dump thingi , i am using intellij or just tell me in command
Don't know that IDE. You may be able to inspect the threads through its gui.
>>Ooooh... CEHJ is here early :-)
I'm late aren't I? ;-)
I'm late aren't I? ;-)
do you start any threads? Create any object that block? etc...
without seeing the code, I'm only guessing what it could be...
without seeing the code, I'm only guessing what it could be...
I still can't understand why System.exit() is not a good solution since we are talking about the client.
>>I still can't understand why System.exit() is not a good solution since we are talking about the client.
Papering over cracks?
Papering over cracks?
Make it work first and optimize later :)
> Papering over cracks?
Not really...more like slamming the door on your way out ;-)
Not really...more like slamming the door on your way out ;-)
ASKER
i dont start any threads.
here's the thread dump:
Full thread dump Java HotSpot(TM) Client VM (1.4.1_03-b02 mixed mode):
"DestroyJavaVM" prio=5 tid=0x00236008 nid=0x1f10 waiting on condition [0..6fadc]
"Thread-17" prio=5 tid=0x0AEFEFB8 nid=0x1f34 waiting on condition [bb9f000..bb9f
d8c]
at java.lang.Thread.sleep(Nat ive Method)
at com.mercury.topaz.util.Obj ectPool$Sh rinkerThre ad._sleepU ntilNextTi me(
ObjectPool.java:202)
at com.mercury.topaz.util.Obj ectPool$Sh rinkerThre ad.run(Obj ectPool.ja va:
115)
"Thread-15" prio=5 tid=0x0AF19BE8 nid=0x1f30 waiting on condition [bb5f000..bb5f
d8c]
at java.lang.Thread.sleep(Nat ive Method)
at com.mercury.topaz.util.Obj ectPool$Sh rinkerThre ad._sleepU ntilNextTi me(
ObjectPool.java:202)
at com.mercury.topaz.util.Obj ectPool$Sh rinkerThre ad.run(Obj ectPool.ja va:
115)
"Thread-13" prio=5 tid=0x0AEFB9D8 nid=0x1f2c in Object.wait() [bb1f000..bb1fd8c]
at java.lang.Object.wait(Nati ve Method)
- waiting on <02FC94D8> (a com.mercury.util.threads.T hreadPool$ MonitorRu
nnable)
at com.mercury.util.threads.T hreadPool$ MonitorRun nable.run( ThreadPool .ja
va:384)
- locked <02FC94D8> (a com.mercury.util.threads.T hreadPool$ MonitorRun nab
le)
at java.lang.Thread.run(Unkno wn Source)
"Thread-12" prio=5 tid=0x0AF072E8 nid=0x1f28 in Object.wait() [badf000..badfd8c]
at java.lang.Object.wait(Nati ve Method)
- waiting on <02FC9538> (a com.mercury.util.threads.T hreadPool$ ControlRu
nnable)
at java.lang.Object.wait(Unkn own Source)
at com.mercury.util.threads.T hreadPool$ ControlRun nable.run( ThreadPool .ja
va:430)
- locked <02FC9538> (a com.mercury.util.threads.T hreadPool$ ControlRun nab
le)
at java.lang.Thread.run(Unkno wn Source)
"Thread-11" prio=5 tid=0x0AF06858 nid=0x1f24 in Object.wait() [ba9f000..ba9fd8c]
at java.lang.Object.wait(Nati ve Method)
- waiting on <02FC95A0> (a com.mercury.util.threads.T hreadPool$ ControlRu
nnable)
at java.lang.Object.wait(Unkn own Source)
at com.mercury.util.threads.T hreadPool$ ControlRun nable.run( ThreadPool .ja
va:430)
- locked <02FC95A0> (a com.mercury.util.threads.T hreadPool$ ControlRun nab
le)
at java.lang.Thread.run(Unkno wn Source)
"Thread-10" prio=5 tid=0x0AF05DE0 nid=0x1f20 in Object.wait() [ba5f000..ba5fd8c]
at java.lang.Object.wait(Nati ve Method)
- waiting on <02FC9608> (a com.mercury.util.threads.T hreadPool$ ControlRu
nnable)
at java.lang.Object.wait(Unkn own Source)
at com.mercury.util.threads.T hreadPool$ ControlRun nable.run( ThreadPool .ja
va:430)
- locked <02FC9608> (a com.mercury.util.threads.T hreadPool$ ControlRun nab
le)
at java.lang.Thread.run(Unkno wn Source)
"Thread-9" prio=5 tid=0x0AF053F0 nid=0x1f18 in Object.wait() [ba1f000..ba1fd8c]
at java.lang.Object.wait(Nati ve Method)
- waiting on <02FC9670> (a com.mercury.util.threads.T hreadPool$ ControlRu
nnable)
at java.lang.Object.wait(Unkn own Source)
at com.mercury.util.threads.T hreadPool$ ControlRun nable.run( ThreadPool .ja
va:430)
- locked <02FC9670> (a com.mercury.util.threads.T hreadPool$ ControlRun nab
le)
at java.lang.Thread.run(Unkno wn Source)
"Thread-8" prio=5 tid=0x0AF04A88 nid=0x1ed0 in Object.wait() [b9df000..b9dfd8c]
at java.lang.Object.wait(Nati ve Method)
- waiting on <02FC96D8> (a com.mercury.util.threads.T hreadPool$ ControlRu
nnable)
at java.lang.Object.wait(Unkn own Source)
at com.mercury.util.threads.T hreadPool$ ControlRun nable.run( ThreadPool .ja
va:430)
- locked <02FC96D8> (a com.mercury.util.threads.T hreadPool$ ControlRun nab
le)
at java.lang.Thread.run(Unkno wn Source)
"Thread-7" prio=5 tid=0x0AF04120 nid=0x1f0c in Object.wait() [b99f000..b99fd8c]
at java.lang.Object.wait(Nati ve Method)
- waiting on <02FC9740> (a com.mercury.util.threads.T hreadPool$ ControlRu
nnable)
at java.lang.Object.wait(Unkn own Source)
at com.mercury.util.threads.T hreadPool$ ControlRun nable.run( ThreadPool .ja
va:430)
- locked <02FC9740> (a com.mercury.util.threads.T hreadPool$ ControlRun nab
le)
at java.lang.Thread.run(Unkno wn Source)
"Thread-6" prio=5 tid=0x0AF0B9D0 nid=0x1970 in Object.wait() [b95f000..b95fd8c]
at java.lang.Object.wait(Nati ve Method)
- waiting on <02FC97A8> (a com.mercury.util.threads.T hreadPool$ ControlRu
nnable)
at java.lang.Object.wait(Unkn own Source)
at com.mercury.util.threads.T hreadPool$ ControlRun nable.run( ThreadPool .ja
va:430)
- locked <02FC97A8> (a com.mercury.util.threads.T hreadPool$ ControlRun nab
le)
at java.lang.Thread.run(Unkno wn Source)
"Thread-5" prio=5 tid=0x0AEF8DE8 nid=0x1f08 in Object.wait() [b91f000..b91fd8c]
at java.lang.Object.wait(Nati ve Method)
- waiting on <02FC9810> (a com.mercury.util.threads.T hreadPool$ ControlRu
nnable)
at java.lang.Object.wait(Unkn own Source)
at com.mercury.util.threads.T hreadPool$ ControlRun nable.run( ThreadPool .ja
va:430)
- locked <02FC9810> (a com.mercury.util.threads.T hreadPool$ ControlRun nab
le)
at java.lang.Thread.run(Unkno wn Source)
"Thread-4" prio=5 tid=0x0AF02F90 nid=0x170 in Object.wait() [b8df000..b8dfd8c]
at java.lang.Object.wait(Nati ve Method)
- waiting on <02FC9878> (a com.mercury.util.threads.T hreadPool$ ControlRu
nnable)
at java.lang.Object.wait(Unkn own Source)
at com.mercury.util.threads.T hreadPool$ ControlRun nable.run( ThreadPool .ja
va:430)
- locked <02FC9878> (a com.mercury.util.threads.T hreadPool$ ControlRun nab
le)
at java.lang.Thread.run(Unkno wn Source)
"Thread-3" prio=5 tid=0x0AF07B30 nid=0xa44 in Object.wait() [b89f000..b89fd8c]
at java.lang.Object.wait(Nati ve Method)
- waiting on <02FC98E0> (a com.mercury.util.threads.T hreadPool$ ControlRu
nnable)
at java.lang.Object.wait(Unkn own Source)
at com.mercury.util.threads.T hreadPool$ ControlRun nable.run( ThreadPool .ja
va:430)
- locked <02FC98E0> (a com.mercury.util.threads.T hreadPool$ ControlRun nab
le)
at java.lang.Thread.run(Unkno wn Source)
"RMI RenewClean-[192.168.88.101 :4444]" daemon prio=5 tid=0x0AEF22C8 nid=0x19d0 i
n Object.wait() [b81f000..b81fd8c]
at java.lang.Object.wait(Nati ve Method)
- waiting on <02FAB2A0> (a java.lang.ref.ReferenceQue ue$Lock)
at java.lang.ref.ReferenceQue ue.remove( Unknown Source)
- locked <02FAB2A0> (a java.lang.ref.ReferenceQue ue$Lock)
at sun.rmi.transport.DGCClien t$Endpoint Entry$Rene wCleanThre ad.run(Unk now
n Source)
at java.lang.Thread.run(Unkno wn Source)
"GC Daemon" daemon prio=2 tid=0x0AD1B520 nid=0x1f1c in Object.wait() [b79f000..b
79fd8c]
at java.lang.Object.wait(Nati ve Method)
- waiting on <02F91100> (a sun.misc.GC$LatencyLock)
at sun.misc.GC$Daemon.run(Unk nown Source)
- locked <02F91100> (a sun.misc.GC$LatencyLock)
"RMI RenewClean-[192.168.88.101 :4767]" daemon prio=5 tid=0x0AD1B260 nid=0x1290 i
n Object.wait() [b75f000..b75fd8c]
at java.lang.Object.wait(Nati ve Method)
- waiting on <02F90DD8> (a java.lang.ref.ReferenceQue ue$Lock)
at java.lang.ref.ReferenceQue ue.remove( Unknown Source)
- locked <02F90DD8> (a java.lang.ref.ReferenceQue ue$Lock)
at sun.rmi.transport.DGCClien t$Endpoint Entry$Rene wCleanThre ad.run(Unk now
n Source)
at java.lang.Thread.run(Unkno wn Source)
"Thread-1" daemon prio=5 tid=0x0AD5A960 nid=0x1d9c waiting on condition [b29f000
..b29fd8c]
at java.lang.Thread.sleep(Nat ive Method)
at org.apache.log4j.helpers.F ileWatchdo g.run(File Watchdog.j ava:95)
"Signal Dispatcher" daemon prio=10 tid=0x008C7C78 nid=0x1b04 waiting on conditio
n [0..0]
"Finalizer" daemon prio=9 tid=0x0090B9B8 nid=0x1cf0 in Object.wait() [ab5f000..a
b5fd8c]
at java.lang.Object.wait(Nati ve Method)
- waiting on <02F02FE0> (a java.lang.ref.ReferenceQue ue$Lock)
at java.lang.ref.ReferenceQue ue.remove( Unknown Source)
- locked <02F02FE0> (a java.lang.ref.ReferenceQue ue$Lock)
at java.lang.ref.ReferenceQue ue.remove( Unknown Source)
at java.lang.ref.Finalizer$Fi nalizerThr ead.run(Un known Source)
"Reference Handler" daemon prio=10 tid=0x0090AD48 nid=0x14a8 in Object.wait() [a
b1f000..ab1fd8c]
at java.lang.Object.wait(Nati ve Method)
- waiting on <02F03048> (a java.lang.ref.Reference$Lo ck)
at java.lang.Object.wait(Unkn own Source)
at java.lang.ref.Reference$Re ferenceHan dler.run(U nknown Source)
- locked <02F03048> (a java.lang.ref.Reference$Lo ck)
"VM Thread" prio=5 tid=0x00909B10 nid=0xb3c runnable
"VM Periodic Task Thread" prio=10 tid=0x008C66D0 nid=0x1efc waiting on condition
"Suspend Checker Thread" prio=10 tid=0x008C7290 nid=0x5ec runnable
here's the thread dump:
Full thread dump Java HotSpot(TM) Client VM (1.4.1_03-b02 mixed mode):
"DestroyJavaVM" prio=5 tid=0x00236008 nid=0x1f10 waiting on condition [0..6fadc]
"Thread-17" prio=5 tid=0x0AEFEFB8 nid=0x1f34 waiting on condition [bb9f000..bb9f
d8c]
at java.lang.Thread.sleep(Nat
at com.mercury.topaz.util.Obj
ObjectPool.java:202)
at com.mercury.topaz.util.Obj
115)
"Thread-15" prio=5 tid=0x0AF19BE8 nid=0x1f30 waiting on condition [bb5f000..bb5f
d8c]
at java.lang.Thread.sleep(Nat
at com.mercury.topaz.util.Obj
ObjectPool.java:202)
at com.mercury.topaz.util.Obj
115)
"Thread-13" prio=5 tid=0x0AEFB9D8 nid=0x1f2c in Object.wait() [bb1f000..bb1fd8c]
at java.lang.Object.wait(Nati
- waiting on <02FC94D8> (a com.mercury.util.threads.T
nnable)
at com.mercury.util.threads.T
va:384)
- locked <02FC94D8> (a com.mercury.util.threads.T
le)
at java.lang.Thread.run(Unkno
"Thread-12" prio=5 tid=0x0AF072E8 nid=0x1f28 in Object.wait() [badf000..badfd8c]
at java.lang.Object.wait(Nati
- waiting on <02FC9538> (a com.mercury.util.threads.T
nnable)
at java.lang.Object.wait(Unkn
at com.mercury.util.threads.T
va:430)
- locked <02FC9538> (a com.mercury.util.threads.T
le)
at java.lang.Thread.run(Unkno
"Thread-11" prio=5 tid=0x0AF06858 nid=0x1f24 in Object.wait() [ba9f000..ba9fd8c]
at java.lang.Object.wait(Nati
- waiting on <02FC95A0> (a com.mercury.util.threads.T
nnable)
at java.lang.Object.wait(Unkn
at com.mercury.util.threads.T
va:430)
- locked <02FC95A0> (a com.mercury.util.threads.T
le)
at java.lang.Thread.run(Unkno
"Thread-10" prio=5 tid=0x0AF05DE0 nid=0x1f20 in Object.wait() [ba5f000..ba5fd8c]
at java.lang.Object.wait(Nati
- waiting on <02FC9608> (a com.mercury.util.threads.T
nnable)
at java.lang.Object.wait(Unkn
at com.mercury.util.threads.T
va:430)
- locked <02FC9608> (a com.mercury.util.threads.T
le)
at java.lang.Thread.run(Unkno
"Thread-9" prio=5 tid=0x0AF053F0 nid=0x1f18 in Object.wait() [ba1f000..ba1fd8c]
at java.lang.Object.wait(Nati
- waiting on <02FC9670> (a com.mercury.util.threads.T
nnable)
at java.lang.Object.wait(Unkn
at com.mercury.util.threads.T
va:430)
- locked <02FC9670> (a com.mercury.util.threads.T
le)
at java.lang.Thread.run(Unkno
"Thread-8" prio=5 tid=0x0AF04A88 nid=0x1ed0 in Object.wait() [b9df000..b9dfd8c]
at java.lang.Object.wait(Nati
- waiting on <02FC96D8> (a com.mercury.util.threads.T
nnable)
at java.lang.Object.wait(Unkn
at com.mercury.util.threads.T
va:430)
- locked <02FC96D8> (a com.mercury.util.threads.T
le)
at java.lang.Thread.run(Unkno
"Thread-7" prio=5 tid=0x0AF04120 nid=0x1f0c in Object.wait() [b99f000..b99fd8c]
at java.lang.Object.wait(Nati
- waiting on <02FC9740> (a com.mercury.util.threads.T
nnable)
at java.lang.Object.wait(Unkn
at com.mercury.util.threads.T
va:430)
- locked <02FC9740> (a com.mercury.util.threads.T
le)
at java.lang.Thread.run(Unkno
"Thread-6" prio=5 tid=0x0AF0B9D0 nid=0x1970 in Object.wait() [b95f000..b95fd8c]
at java.lang.Object.wait(Nati
- waiting on <02FC97A8> (a com.mercury.util.threads.T
nnable)
at java.lang.Object.wait(Unkn
at com.mercury.util.threads.T
va:430)
- locked <02FC97A8> (a com.mercury.util.threads.T
le)
at java.lang.Thread.run(Unkno
"Thread-5" prio=5 tid=0x0AEF8DE8 nid=0x1f08 in Object.wait() [b91f000..b91fd8c]
at java.lang.Object.wait(Nati
- waiting on <02FC9810> (a com.mercury.util.threads.T
nnable)
at java.lang.Object.wait(Unkn
at com.mercury.util.threads.T
va:430)
- locked <02FC9810> (a com.mercury.util.threads.T
le)
at java.lang.Thread.run(Unkno
"Thread-4" prio=5 tid=0x0AF02F90 nid=0x170 in Object.wait() [b8df000..b8dfd8c]
at java.lang.Object.wait(Nati
- waiting on <02FC9878> (a com.mercury.util.threads.T
nnable)
at java.lang.Object.wait(Unkn
at com.mercury.util.threads.T
va:430)
- locked <02FC9878> (a com.mercury.util.threads.T
le)
at java.lang.Thread.run(Unkno
"Thread-3" prio=5 tid=0x0AF07B30 nid=0xa44 in Object.wait() [b89f000..b89fd8c]
at java.lang.Object.wait(Nati
- waiting on <02FC98E0> (a com.mercury.util.threads.T
nnable)
at java.lang.Object.wait(Unkn
at com.mercury.util.threads.T
va:430)
- locked <02FC98E0> (a com.mercury.util.threads.T
le)
at java.lang.Thread.run(Unkno
"RMI RenewClean-[192.168.88.101
n Object.wait() [b81f000..b81fd8c]
at java.lang.Object.wait(Nati
- waiting on <02FAB2A0> (a java.lang.ref.ReferenceQue
at java.lang.ref.ReferenceQue
- locked <02FAB2A0> (a java.lang.ref.ReferenceQue
at sun.rmi.transport.DGCClien
n Source)
at java.lang.Thread.run(Unkno
"GC Daemon" daemon prio=2 tid=0x0AD1B520 nid=0x1f1c in Object.wait() [b79f000..b
79fd8c]
at java.lang.Object.wait(Nati
- waiting on <02F91100> (a sun.misc.GC$LatencyLock)
at sun.misc.GC$Daemon.run(Unk
- locked <02F91100> (a sun.misc.GC$LatencyLock)
"RMI RenewClean-[192.168.88.101
n Object.wait() [b75f000..b75fd8c]
at java.lang.Object.wait(Nati
- waiting on <02F90DD8> (a java.lang.ref.ReferenceQue
at java.lang.ref.ReferenceQue
- locked <02F90DD8> (a java.lang.ref.ReferenceQue
at sun.rmi.transport.DGCClien
n Source)
at java.lang.Thread.run(Unkno
"Thread-1" daemon prio=5 tid=0x0AD5A960 nid=0x1d9c waiting on condition [b29f000
..b29fd8c]
at java.lang.Thread.sleep(Nat
at org.apache.log4j.helpers.F
"Signal Dispatcher" daemon prio=10 tid=0x008C7C78 nid=0x1b04 waiting on conditio
n [0..0]
"Finalizer" daemon prio=9 tid=0x0090B9B8 nid=0x1cf0 in Object.wait() [ab5f000..a
b5fd8c]
at java.lang.Object.wait(Nati
- waiting on <02F02FE0> (a java.lang.ref.ReferenceQue
at java.lang.ref.ReferenceQue
- locked <02F02FE0> (a java.lang.ref.ReferenceQue
at java.lang.ref.ReferenceQue
at java.lang.ref.Finalizer$Fi
"Reference Handler" daemon prio=10 tid=0x0090AD48 nid=0x14a8 in Object.wait() [a
b1f000..ab1fd8c]
at java.lang.Object.wait(Nati
- waiting on <02F03048> (a java.lang.ref.Reference$Lo
at java.lang.Object.wait(Unkn
at java.lang.ref.Reference$Re
- locked <02F03048> (a java.lang.ref.Reference$Lo
"VM Thread" prio=5 tid=0x00909B10 nid=0xb3c runnable
"VM Periodic Task Thread" prio=10 tid=0x008C66D0 nid=0x1efc waiting on condition
"Suspend Checker Thread" prio=10 tid=0x008C7290 nid=0x5ec runnable
Can you post your code? Or the smallest subset of your code that compiles, and locks up?
You're not running the server in the same JVM are you by any chance?
> it just doesn't exit when main() is done - which to me is weird .
Just cause main() has finished doesn't mean your app will exit.
There are other threads running and unless you have means to stop these threads (which u may not) then System.exit() is your only alternative.
Just cause main() has finished doesn't mean your app will exit.
There are other threads running and unless you have means to stop these threads (which u may not) then System.exit() is your only alternative.
You're up late objects :-)
yes, a bit busy down here at the moment.
Are you using something like Mercury as well?
> Are you using something like Mercury as well?
Thats pretty obvious isn't it ;)
And yes it is one of the threads I mentioned above.
Thats pretty obvious isn't it ;)
And yes it is one of the threads I mentioned above.
>>Thats pretty obvious isn't it ;)
Not necessarily. If it's so obvious, can you explain the correlation between this matter and your previous link posting talking about a supposed bug in RMI?
If you're using a diagnostic tool and it's operating through non-code hooks, then you probably will have to System.exit. Otherwise close the diagnostics down explicitly.
Not necessarily. If it's so obvious, can you explain the correlation between this matter and your previous link posting talking about a supposed bug in RMI?
If you're using a diagnostic tool and it's operating through non-code hooks, then you probably will have to System.exit. Otherwise close the diagnostics down explicitly.
I counted about 13 threads that are running that you'll need to terminate before your app will exit, or use System.exit(). All from a thread pool by the looks of it.
ASKER
I'm not sure i got your conclusion - should i be looking into some threads that i have opened without being aware of it, or should i be looking at unbind and unexport?
tzvika179> should i be looking into some threads that i have opened without being aware of it
I'd start with those threads first.
I'd start with those threads first.
Can you post exactly how you start your program, including all command line parameters?
And maybe the source code?
ASKER
and another thing: in my case it's not latency of several minutes - i waited hours
Check mercury's doco, it may tell you how to shut things down.
> in my case it's not latency of several minutes - i waited hours
It may never shut down. Until all those threads have ended it will not exit, and if there is no timeout on the wait()'s it will be foirever.
It may never shut down. Until all those threads have ended it will not exit, and if there is no timeout on the wait()'s it will be foirever.
Especially check the documentation on its thread pool.
ASKER
i am mercury :-)
i am now going to decompile the jars (the guy who wrote them is on vacation, of course...) to try to see what is going on on the server side. maybe get some more additional info
command line is:
java.exe -classpath C:\javaprojects\AlertsTest er\classes ;.\lib\top azdbutilit ies.jar;.\ lib\topazm etadatauti lities.jar ;.\lib\top azqautils. jar;.\lib\ topazutil. jar;.\lib\ activation .jar;.\lib \aesreques ts.jar;.\l ib\commons -collectio ns.jar;.\l ib\commons -pool.jar; .\lib\conc urrent-uti ls.jar;.\l ib\connect ion-pool.j ar;.\lib\c rimson.jar ;.\lib\dat aselector. jar;.\lib\ datatypesi fs.jar;.\l ib\idgen.j ar;.\lib\j avacore.ja r;.\lib\jb oss.jar;.\ lib\jce1_2 _1.jar;.\l ib\jmdrv.j ar;.\lib\j requestor. jar;.\lib\ legacyutil s.jar;.\li b\local_po licy.jar;. \lib\mail. jar;.\lib\ object-poo l.jar;.\li b\security .jar;.\lib \seropto.j ar;.\lib\s oap.jar;.\ lib\sprint a2000.jar; .\lib\sunj ce_provide r.jar;.\li b\topazjmd rv.jar;.\l ib\us_expo rt_policy. jar;.\lib\ xalan.jar; .\lib\xdr. jar;.\lib\ xdr_utils. jar;.\lib\ xerces.jar ;.\lib\xml wrapper.ja r;.\lib\al ert_update s.jar;.\li b\connecti on-pool-mn g-jmx.jar; .\lib\ejb. jar;.\lib\ ejb2.0.jar ;.\lib\gen ericdatavi ewcreator. jar;.\lib\ jboss-clie nt.jar;.\l ib\jboss-j aas.jar;.\ lib\jbosss x-client.j ar;.\lib\j ms.jar;.\l ib\jnp-cli ent.jar;.\ lib\jta-sp ec1_0_1.ja r;.\lib\ju nit.jar;.\ lib\log4j. jar;.\lib\ logger.jar ;.\lib\mti me-client. jar;.\lib\ mtime.jar; .\lib\MTJU nit-1.jar; .\lib\open _api.jar;. \lib\sboxd ata.jar;.\ lib\servle t.jar;.\li b\tmc_ex_d ata.jar;.\ lib\transh eaders.jar ;.\lib\tmc -client.ja r;.\lib\tm c-shared.j ar;.\lib\t mcalert-cl ient.jar;. \lib\tmcal ert-jboss- server.jar ;.\lib\tmc alert-shar ed.jar com.mercury.infra.qa.alert stester.Al ertsTester
i am now going to decompile the jars (the guy who wrote them is on vacation, of course...) to try to see what is going on on the server side. maybe get some more additional info
command line is:
java.exe -classpath C:\javaprojects\AlertsTest
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
yup once jad decompiles com.mercury.topaz.util.Obj ectPool and com.mercury.util.threads.T hreadPool hopefully we'll know more
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
(but of course that may appear at a higher level)
ASKER
found the culprit. thx to everyone
does it do the:
System.out.println("i got here");
line?
Have you tried putting more debug in...to see where it freezes?
Are you sure it's not getting caught in some other bit of code other than here?