Package javax.naming

Examples of javax.naming.NamingException.initCause()


                } catch(Throwable t) {
                    if (t instanceof NamingException)
                        throw (NamingException) t;
                    NamingException ex = new NamingException
                        ("Could not create resource factory instance");
                    ex.initCause(t);
                    throw ex;
                }
            }

            if (factory != null) {
View Full Code Here


            Exception cause = e.getException();
            if (cause instanceof NamingException) {
                throw (NamingException) cause;
            } else {
                NamingException ex = new NamingException(cause.getMessage());
                ex.initCause(cause);
                throw ex;
            }
        }
    }
   
View Full Code Here

    public Context getContext() throws NamingException {
        try {
            return (Context) factory.getObjectInstance(null, null, null, environment);
        } catch (Exception e) {
            NamingException ne = new NamingException();
            ne.initCause(e);
            throw ne;
        }
    }   
}
View Full Code Here

                    try {
                        factoryClass = tcl.loadClass(factoryClassName);
                    } catch(ClassNotFoundException e) {
                        NamingException ex = new NamingException
                            ("Could not load resource factory class");
                        ex.initCause(e);
                        throw ex;
                    }
                } else {
                    try {
                        factoryClass = Class.forName(factoryClassName);
View Full Code Here

                    try {
                        factoryClass = Class.forName(factoryClassName);
                    } catch(ClassNotFoundException e) {
                        NamingException ex = new NamingException
                            ("Could not load resource factory class");
                        ex.initCause(e);
                        throw ex;
                    }
                }
                if (factoryClass != null) {
                    try {
View Full Code Here

                    } catch (Throwable t) {
                        if (t instanceof NamingException)
                            throw (NamingException) t;
                        NamingException ex = new NamingException
                            ("Could not create resource factory instance");
                        ex.initCause(t);
                        throw ex;
                    }
                }
            } else {
                if (ref.getClassName().equals("javax.sql.DataSource")) {
View Full Code Here

                            Class.forName(javaxMailSessionFactoryClassName)
                            .newInstance();
                    } catch(Throwable t) {
                        NamingException ex = new NamingException
                            ("Could not create resource factory instance");
                        ex.initCause(t);
                        throw ex;
                    }
                }
            }
            if (factory != null) {
View Full Code Here

                ctx.lookup(new CompositeName(entry.name));
            } catch (NamingException e) {
                throw e;
            } catch (Exception e) {
                NamingException ne = new NamingException(e.getMessage());
                ne.initCause(e);
                throw ne;
            }
        }
       
        return new Binding(entry.name, entry.value.getClass().getName(),
View Full Code Here

                ctx.lookup(new CompositeName(entry.name));
            } catch (NamingException e) {
                throw e;
            } catch (Exception e) {
                NamingException ne = new NamingException(e.getMessage());
                ne.initCause(e);
                throw ne;
            }
        }
       
        return new Binding(entry.name, entry.value.getClass().getName(),
View Full Code Here

                    try {
                        factoryClass = tcl.loadClass(factoryClassName);
                    } catch(ClassNotFoundException e) {
                        NamingException ex = new NamingException
                            ("Could not load resource factory class");
                        ex.initCause(e);
                        throw ex;
                    }
                } else {
                    try {
                        factoryClass = Class.forName(factoryClassName);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.