I made the reg changes on the win2k boxes and did get a performance increase. The
number of threads it took to cause the javax.naming.CommunicationException was
increased. I added failover to the client to catch and retry. How does this look?
Will it cause other problems?
| public void run()
| {
| try
| {
| Hashtable properties = new Hashtable();
| properties.put(Context.INITIAL_CONTEXT_FACTORY,
| "org.jnp.interfaces.NamingContextFactory");
| properties.put(Context.PROVIDER_URL,m_providerUrl);
| properties.put(Context.URL_PKG_PREFIXES,
"org.jboss.naming:org.jnp.interface");
| Context initial = new InitialContext(properties);
| Object objref = initial.lookup("aRemoteEntirex");
| ConverterHome home =
| (ConverterHome)PortableRemoteObject.narrow(objref,
| ConverterHome.class);
| Converter currencyConverter = home.create();
| BigDecimal param = new BigDecimal ("100.00");
| BigDecimal amount = currencyConverter.dollarToYen(param);
| System.out.println(amount + " 1 " + Thread.currentThread().getName());
| amount = currencyConverter.yenToEuro(param);
| System.out.println(amount + " 2 " + Thread.currentThread().getName());
| currencyConverter.remove();
| }
| catch(javax.naming.CommunicationException e)
| {
| if
(e.getCause().toString().indexOf("java.net.SocketTimeoutException") != -1)
| {
| //System.out.println("Socket timout " + e.getCause().toString()
| // + Thread.currentThread().getName());
| ++m_errorCount;
| if (m_errorCount < 50)
| {
| System.out.println("Socket timout retrying " +
Thread.currentThread().getName());
| this.run();
| }
| else
| {
| System.out.println("Socket timout retry failed " +
Thread.currentThread().getName());
| //Do something;
| }
| }
| else
| {
| System.out.println("Socket DIDNOT timout " +
e.getCause().toString());
| }
| }
| catch (Exception ex)
| {
| System.err.println("Caught an unexpected exception!" +
Thread.currentThread().getName());
| ex.printStackTrace();
| }
| }
| }
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3844830#3844830
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3844830
-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user