owenb 2002/07/01 04:10:33 Modified: java/src/org/apache/wsif/providers/ejb WSIFPort_EJB.java Log: Removed hardcoded jndi property values and altered exception text for errors occuring in the lookup of the EJBHome object. Revision Changes Path 1.5 +3 -27 xml-axis-wsif/java/src/org/apache/wsif/providers/ejb/WSIFPort_EJB.java Index: WSIFPort_EJB.java =================================================================== RCS file: /home/cvs/xml-axis-wsif/java/src/org/apache/wsif/providers/ejb/WSIFPort_EJB.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- WSIFPort_EJB.java 27 Jun 2002 10:44:48 -0000 1.4 +++ WSIFPort_EJB.java 1 Jul 2002 11:10:33 -0000 1.5 @@ -175,37 +175,13 @@ hash.put(InitialContext.AUTHORITATIVE, "true"); InitialContext initContext; - try { - initContext = new InitialContext(hash); - fieldEjbHome = (EJBHome) initContext.lookup(address.getJndiName()); - } catch (NoInitialContextException e) { - Tr.exception(e); - // Attempt to use Websphere default settings - try { - Class testClass = - Class.forName( - "com.ibm.websphere.naming.WsnInitialContextFactory", - true, - Thread.currentThread().getContextClassLoader()); - hash.put( - "java.naming.factory.initial", - "com.ibm.websphere.naming.WsnInitialContextFactory"); - hash.put("java.naming.provider.url", "iiop://localhost:900/"); - initContext = null; - initContext = new InitialContext(hash); - fieldEjbHome = (EJBHome) initContext.lookup(address.getJndiName()); - } catch (Exception ex) { - Tr.exception(ex); - // throw the original exception - throw e; - } - } + initContext = new InitialContext(hash); + fieldEjbHome = (EJBHome) initContext.lookup(address.getJndiName()); - //fieldEjbHome = (EJBHome) initContext.lookup(address.getJndiName()); } catch (Exception ex) { Tr.exception(ex); throw new WSIFException( - "Could not find EJB home '" + address.getJndiName() + "'", + "Failed to lookup EJB home using JNDI name '" + address.getJndiName() + "'", ex); } }