Package javax.ejb

Examples of javax.ejb.CreateException


        throws javax.ejb.CreateException {
        this.name = name;
        try {
            jndiContext = new InitialContext();
        } catch (final Exception e) {
            throw new CreateException("Can not get the initial context: " + e.getMessage());
        }
    }
View Full Code Here


     */
    public void ejbCreate() throws javax.ejb.CreateException {
        try {
            jndiContext = new InitialContext();
        } catch (final Exception e) {
            throw new CreateException("Can not get the initial context: " + e.getMessage());
        }
    }
View Full Code Here

     */
    public void ejbCreate() throws javax.ejb.CreateException {
        try {
            jndiContext = new InitialContext();
        } catch (final Exception e) {
            throw new CreateException("Can not get the initial context: " + e.getMessage());
        }
    }
View Full Code Here

     */
    public void ejbCreate() throws javax.ejb.CreateException {
        try {
            jndiContext = new InitialContext();
        } catch (final Exception e) {
            throw new CreateException("Can not get the initial context: " + e.getMessage());
        }
    }
View Full Code Here

     */
    public void ejbCreate() throws javax.ejb.CreateException {
        try {
            jndiContext = new InitialContext();
        } catch (final Exception e) {
            throw new CreateException("Can not get the initial context: " + e.getMessage());
        }
    }
View Full Code Here

      ctx = new InitialContext();
      String recommenderClassName = (String) ctx.lookup("java:comp/env/recommender-class");
      if (recommenderClassName == null) {
        String recommenderJNDIName = (String) ctx.lookup("java:comp/env/recommender-jndi-name");
        if (recommenderJNDIName == null) {
          throw new CreateException("recommender-class and recommender-jndi-name env-entry not defined");
        }
        recommender = (Recommender) ctx.lookup("java:comp/env/" + recommenderJNDIName);
      } else {
        recommender = Class.forName(recommenderClassName).asSubclass(Recommender.class).newInstance();
      }

    } catch (NamingException ne) {
      throw new CreateException(ne.toString());
    } catch (ClassNotFoundException cnfe) {
      throw new CreateException(cnfe.toString());
    } catch (InstantiationException ie) {
      throw new CreateException(ie.toString());
    } catch (IllegalAccessException iae) {
      throw new CreateException(iae.toString());
    } finally {
      if (ctx != null) {
        try {
          ctx.close();
        } catch (NamingException ne) {
          throw new CreateException(ne.toString());
        }
      }
    }
  }
View Full Code Here

            _logger.log(Level.WARNING, CREATE_EJBOBJECT_EXCEPTION, new Object[]{ejbDescriptor.getName(), ex});

            if (ex instanceof EJBException)
                throw (EJBException) ex;
            else {
                CreateException ce =
                        new CreateException("ERROR creating stateful SessionBean");
                ce.initCause(ex);
                throw ce;
            }
        }
    }
View Full Code Here

            _logger.log(Level.WARNING, CREATE_EJBOBJECT_EXCEPTION, new Object[]{ejbDescriptor.getName(), ex});

            if (ex instanceof EJBException)
                throw (EJBException) ex;
            else {
                CreateException ce =
                        new CreateException("ERROR creating stateful SessionBean");
                ce.initCause(ex);
                throw ce;
            }
        }
    }
View Full Code Here

            _logger.log(Level.WARNING, CREATE_EJBLOCALOBJECT_EXCEPTION, new Object[]{ejbDescriptor.getName(), ex});

            if (ex instanceof EJBException)
                throw (EJBException) ex;
            else {
                CreateException ce =
                        new CreateException("ERROR creating stateful SessionBean");
                ce.initCause(ex);
                throw ce;
            }
        }
    }
View Full Code Here

            _logger.log(Level.WARNING, CREATE_EJBLOCALOBJECT_EXCEPTION, new Object[]{ejbDescriptor.getName(), ex});

            if (ex instanceof EJBException)
                throw (EJBException) ex;
            else {
                CreateException ce =
                        new CreateException("ERROR creating stateful SessionBean");
                ce.initCause(ex);
                throw ce;
            }
        }
    }
View Full Code Here

TOP

Related Classes of javax.ejb.CreateException

Copyright © 2018 www.massapicom. 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.