Package javax.ejb

Examples of javax.ejb.EJBLocalObject


   public EJBLocalObject getEJBLocalObject() throws IllegalStateException
   {
      try
      {
         Object id = beanContext.getId();
         EJBLocalObject proxy = null;
         try
         {
            proxy = (EJBLocalObject) container.createProxyLocalEjb21(id);
         }
         // Proxy does not implement EJBLocalObject
View Full Code Here


   public EJBLocalObject getEJBLocalObject() throws IllegalStateException
   {
      try
      {
         Object id = beanContext.getId();
         EJBLocalObject proxy = null;
         try
         {
            proxy = (EJBLocalObject) container.createProxyLocalEjb21(id, null);
         }
         // Proxy does not implement EJBLocalObject
View Full Code Here

   @Override
   public EJBLocalObject getEJBLocalObject() throws IllegalStateException
   {
      try
      {
         EJBLocalObject proxy = (EJBLocalObject) container.createProxyLocalEjb21(null);
         return proxy;
      }
      catch (Exception e)
      {
         throw new IllegalStateException(e);
View Full Code Here

            new EJBLocalObjectInvocationHandler(proxyInvocationInfoMap,
                                                localIntf);
        localObjImpl = handler;
       
        try {
            EJBLocalObject localObjectProxy = (EJBLocalObject) ejbLocalObjectProxyCtor.newInstance(new Object[]{handler});
            handler.setProxy(localObjectProxy);
        } catch (ClassCastException e) {
            String msg = localStrings.getLocalString("ejb.basecontainer_invalid_local_interface",
                    "Local component interface [{0}] is invalid since it does not extend javax.ejb.EJBLocalObject.", localIntf);
            throw new IllegalArgumentException(msg, e);
View Full Code Here

      return getEntityEJBLocalObject(id);
   }

   public EJBLocalObject getEntityEJBLocalObject(Object id, boolean create)
   {
      EJBLocalObject result = null;
      if(id != null)
      {
         final Transaction tx = cache.getTransaction();
         if(tx == null)
         {
View Full Code Here

      if(!relatedEntity.getLocalInterface().isInstance(o))
      {
         throw new IllegalArgumentException("Argument must be of type " + entity.getLocalInterface().getName());
      }

      EJBLocalObject local = (EJBLocalObject)o;
      try
      {
         return local.getPrimaryKey();
      }
      catch(NoSuchObjectLocalException e)
      {
         throw new IllegalArgumentException(e.getMessage());
      }
View Full Code Here

      public void cascadeDelete(EntityEnterpriseContext ctx) throws RemoveException
      {
         if(manager.registerCascadeDelete(ctx.getId(), ctx.getId()))
         {
            EJBLocalObject value = (EJBLocalObject)getValue(ctx);
            if(value != null)
            {
               changeValue(null);

               final Object relatedId = value.getPrimaryKey();
               final JDBCStoreManager2 relatedManager = (JDBCStoreManager2)relatedEntity.getManager();

               if(!relatedManager.isCascadeDeleted(relatedId))
               {
                  value.remove();
               }
            }

            manager.unregisterCascadeDelete(ctx.getId());
         }
View Full Code Here

    *
    * @throws ClassCastException   Not an EJBObject instance.
    */
   Boolean isIdentical(final Object a, final Object b)
   {
      final EJBLocalObject ejb = (EJBLocalObject)a;
      Boolean isIdentical = Boolean.FALSE;
      if( ejb != null )
      {
         isIdentical = new Boolean(ejb.toString().equals(b));
      }
      return isIdentical;
   }
View Full Code Here

            new EJBLocalObjectInvocationHandler(proxyInvocationInfoMap,
                                                localIntf);
        localObjImpl = handler;
       
        try {
            EJBLocalObject localObjectProxy = (EJBLocalObject) ejbLocalObjectProxyCtor.newInstance(new Object[]{handler});
            handler.setProxy(localObjectProxy);
        } catch (ClassCastException e) {
            String msg = localStrings.getLocalString("ejb.basecontainer_invalid_local_interface",
                    "Local component interface [{0}] is invalid since it does not extend javax.ejb.EJBLocalObject.", localIntf);
            throw new IllegalArgumentException(msg, e);
View Full Code Here

            new EJBLocalObjectInvocationHandler(proxyInvocationInfoMap,
                                                localIntf);
        localObjImpl = handler;
       
        try {
            EJBLocalObject localObjectProxy = (EJBLocalObject) ejbLocalObjectProxyCtor.newInstance(new Object[]{handler});
            handler.setProxy(localObjectProxy);
        } catch (ClassCastException e) {
            String msg = localStrings.getLocalString("ejb.basecontainer_invalid_local_interface",
                    "Local component interface [{0}] is invalid since it does not extend javax.ejb.EJBLocalObject.", localIntf);
            throw new IllegalArgumentException(msg, e);
View Full Code Here

TOP

Related Classes of javax.ejb.EJBLocalObject

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.