Has anybody ever had issues with a Java application that uses Jacob to call WMI queries, with that application being deployed to JBoss? JBoss locks up around the WMI calls with no further information available.
A:
Actually found out it was something to do with Single-Thread Apartments and COM objects. before creating the JACOB call it is important to do an ComThread.initSTA() and then when finished do a ComThread.Release() and ComThread.quitMainSTA(). This should allow for proper multi-threading with COM objects.
stjowa
2010-02-01 22:52:36