Why does the Java client sometimes "freeze" when accessing Exchange? |
|
What is happening is this... if you provide an invalid mailbox name (or invalid alias), a popup box saying "The name could not be matched to a name in the address list" will be displayed on the Exchange server machine. Until someone closes this popup box, the Java client will be non-responsive.
As a workaround, you can tell CDO not to display the popup box when an invalid mailbox name is used. You will still get an error, but at least your application won't "freeze" while waiting for the popup box to be closed.
If you are using JEB to access Exchange
You will have to edit the third parameter of the _session.logon() line in source\com\intrinsyc\jeb\JebSession.java:
Boolean showDlg = new Boolean("false");
_session.logon(null, null, showDlg, null, null, null, exchangeserver + "\n" + mailbox);
After compiling, you will need to replace JebSession.class in jintegra\lib\jeb.jar with the new class file. Please download the attachment which contains an updated JebSession.java file, and follow these instructions for updating jeb.jar:
1. Save JebSession.java in jintegra\source\com\intrinsyc\jeb
2. Compile JebSesion.java:
> javac c:\jintegra\source\com\intrinsyc\jeb\JebSession.java
3. Update jeb.jar:
> cd c:\jintegra\source
> jar uf c:\jintegra\lib\jeb.jar com\intrinsyc\jeb\JebSession.class
4. Run the Java-Exchange examples:
> c:\jintegra\examples\java-exchange\applications\runExamples.bat
If you are using CDO directly to access Exchange
You will have to pass a Boolean value of "false" as the third parameter when calling com.intrinsyc.cdo.Session.logon() - just like in the above example.