Package javax.ejb

Examples of javax.ejb.CreateException


         Object ref = context.lookup("java:comp/env/"+entityName);
         entityHome = (EntityLocalHome) PortableRemoteObject.narrow(ref, EntityLocalHome.class);
      }
      catch(NamingException e)
      {
         throw new CreateException("Cound not resolve name: " + e);
      }
   }
View Full Code Here


     * @throws CreateException If <code>id</code> is <code>null</code>.
     */
    public String ejbCreate(String boid) throws CreateException
    {
        if (boid == null) {
            throw (new CreateException("ID must not be null!"));
        }

        setBoid(boid);

        return null;
View Full Code Here

     * @throws CreateException If <code>id</code> is <code>null</code>.
     */
    public String ejbCreate(String boid) throws CreateException
    {
        if (boid == null) {
            throw (new CreateException("ID must not be null!"));
        }

        setBoid(boid);

        return null;
View Full Code Here

        }
       
      });*/
      return pd;
    } catch (Exception e) {
      throw new CreateException(e.getMessage());
    }
  }
View Full Code Here

        }
       
      });
*/      return pd;
    } catch (Exception e) {
      throw new CreateException(e.getMessage());
    }
  }
View Full Code Here

  }
 
  public void testCreateException() throws Exception {
    final String jndiName = "foo";
 
    final CreateException cex = new CreateException();
    MockControl mc = MockControl.createControl(MyHome.class);
    final MyHome home = (MyHome) mc.getMock();
    home.create();
    mc.setThrowable(cex);
    mc.replay();
View Full Code Here

  }
 
  public void testCreateExceptionWithLocalBusinessInterface() throws Exception {
    final String jndiName = "foo";

    final CreateException cex = new CreateException();
    MockControl mc = MockControl.createControl(MyHome.class);
    final MyHome home = (MyHome) mc.getMock();
    home.create();
    mc.setThrowable(cex);
    mc.replay();
View Full Code Here

  }

  public void testCreateException() throws Exception {
    final String jndiName = "foo";
 
    final CreateException cex = new CreateException();
    MockControl mc = MockControl.createControl(MyHome.class);
    final MyHome home = (MyHome) mc.getMock();
    home.create();
    mc.setThrowable(cex);
    mc.replay();
View Full Code Here

                                Date initialExpiration, long intervalDuration,
                                Serializable info) throws CreateException {

        BaseContainer container = getContainer(containerId);
        if( container == null ) {
            throw new CreateException("invalid container id " + containerId +
                                      " in createTimer request");
        }
       
        Class ejbClass = container.getEJBClass();
        if( !container.isTimedObject() ) {
            throw new CreateException
                ("Attempt to create an EJB Timer from a bean that is " +
                 "not a Timed Object.  EJB class " + ejbClass +
                 " must implement javax.ejb.TimedObject or " +
                 " annotation a timeout method with @Timeout");
        }
View Full Code Here

      Integer tl = (Integer) ic.lookup("java:/comp/env/tradeLimit");
   
      tradeLimit = tl.intValue();
    } catch (NamingException ne) {
      throw new CreateException("Failed to find environment value "+ne);
    }
  }
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.