Package org.jboss.ejb3.packagemanager.exception

Examples of org.jboss.ejb3.packagemanager.exception.PackageManagerException


      {
         EJBContainer container = EJBContainer.class.cast(service);
         // TODO: use an informer
         JavaEEModule module = container.getModule();
         String moduleName = stripSuffix(module.getName());
         JavaEEApplication app = module.getApplication();
         String appName = app != null ? stripSuffix(app.getName()) : null;
         String scopedBeanName = "application=" + (appName != null ? appName : moduleName) + ",module=" + moduleName + ",component=" + container.getEjbName();
         String encFactoryBeanName = "jboss.ejb3:" + scopedBeanName + ",service=EjbEncFactory";
         // create an EjbEncFactory for this container
         {
            BeanMetaDataBuilder builder = BeanMetaDataBuilderFactory.createBuilder(encFactoryBeanName, NamingComponentEjbEncFactory.class.getName());
View Full Code Here


      if(service instanceof EJBContainer)
      {
         EJBContainer container = EJBContainer.class.cast(service);
         // TODO: use an informer
         JavaEEModule module = container.getModule();
         String moduleName = stripSuffix(module.getName());
         JavaEEApplication app = module.getApplication();
         String appName = app != null ? stripSuffix(app.getName()) : null;
         String scopedBeanName = "application=" + (appName != null ? appName : moduleName) + ",module=" + moduleName + ",component=" + container.getEjbName();
         String encFactoryBeanName = "jboss.ejb3:" + scopedBeanName + ",service=EjbEncFactory";
         // create an EjbEncFactory for this container
         {
View Full Code Here

*/
public class ClientJavaEEComponent extends AbstractJavaEEComponent
{
   public ClientJavaEEComponent(String clientName)
   {
      super(new SimpleJavaEEModule(clientName));
   }
View Full Code Here

   private PersistenceUnitDependencyResolver persistenceUnitDependencyResolver;

   public ClientENCInjectionContainer(VFSDeploymentUnit unit, JBossClientMetaData xml, Class<?> mainClass, String applicationClientName, ClassLoader classLoader,
         Context encCtx, PersistenceUnitDependencyResolver persistenceUnitDependencyResolver) throws NamingException
   {
      super(new SimpleJavaEEModule((unit.getParent() != null ? unit.getParent().getSimpleName() : null), unit.getSimpleName()));
      if (mainClass == null)
         throw new NullPointerException("mainClass is mandatory");
      if (applicationClientName == null)
         throw new NullPointerException("applicationClientName is mandatory");
      if (classLoader == null)
View Full Code Here

   }

   public TomcatInjectionContainer(WebApplication appInfo, DeploymentUnit unit, org.apache.catalina.Context catalinaContext,
         PersistenceUnitDependencyResolver resolver, Set<String> dynamicClassLoaders, JavaEEComponent component, InjectionManager injectionManager)
   {
      super(new SimpleJavaEEModule(appInfo.getName()));

      assert component != null : "component is null";

      this.unit = unit;
      this.appInfo = appInfo;
View Full Code Here

      if(result instanceof JBossGenericBeanMetaData)
      {
         log.warn("FIXME: EJBTHREE-1227: JBossGenericBeanMetaData found for '" + ejbName + "' instead of " + enterpriseBeanMetaDataClass);
         if(enterpriseBeanMetaDataClass.equals(JBossSessionBeanMetaData.class))
         {
            result = new JBossSessionGenericWrapper((JBossGenericBeanMetaData) result);
         }
         else if(enterpriseBeanMetaDataClass.equals(JBossMessageDrivenBeanMetaData.class))
         {
            result = new JBossMessageDrivenBeanGenericWrapper((JBossGenericBeanMetaData) result);
         }
View Full Code Here

    * </p>
    *
    */
   protected void initMetaDataBasedAnnotationRepository()
   {
      this.metadataBasedAnnotationRepo = new AnnotationRepositoryToMetaData(this.beanClass, this.xml, name, this.classloader);
      List<MetaDataBridge<InterceptorMetaData>> interceptorBridges = new ArrayList<MetaDataBridge<InterceptorMetaData>>();
      interceptorBridges.add(new InterceptorMetaDataBridge());
      this.metadataBasedAnnotationRepo.addComponentMetaDataLoaderFactory(new InterceptorComponentMetaDataLoaderFactory(interceptorBridges));
      this.metadataBasedAnnotationRepo.addMetaDataBridge(new AdditiveBeanInterceptorMetaDataBridge(this.beanClass, this.classloader, this.xml));
     
View Full Code Here

         IOUtil.copy(fileToInstall, destFile);
      }
      catch (IOException e)
      {

         throw new PackageManagerException("Could not install file: " + fileMetadata.getName() + " from package: "
               + pkgMeta.getName() + " version: " + pkgMeta.getVersion() + " into " + dest.getAbsolutePath());
      }

   }
View Full Code Here

      File relativePathToFile = new File(jbossHome, installedFile.getInstalledPath());
      File fileToUninstall = new File(relativePathToFile, installedFile.getFileName());
     
      if (!fileToUninstall.exists())
      {
         throw new PackageManagerException("Installed file missing: " + fileToUninstall.getAbsolutePath()
               + " - cannot uninstall!");
      }
      if (fileToUninstall.isDirectory())
      {
         throw new PackageManagerException("Installed file is a directory : " + fileToUninstall.getAbsolutePath()
               + " - cannot uninstall!");
      }
      fileToUninstall.delete();
      logger.info("Uninstalled file " + fileToUninstall + " from package  " + pkg.getPackageName());
View Full Code Here

      }
      File fileToInstall = new File(srcPathOfFileToInstall, fileMeta.getName());

      if (!fileToInstall.exists())
      {
         throw new PackageManagerException(fileToInstall.getAbsolutePath() + " does not exist, package: " + pkgCtx
               + " being installed from " + pkgCtx.getPackageRoot()
               + " is probably corrupt!");
      }

      if (fileMeta.getDestPath() == null)
      {
         throw new PackageManagerException("File " + fileMeta.getName() + " in package: " + pkgCtx
               + " does not specify a destination");
      }
      String destServerHome = this.packageMgrContext.getJBossServerHome();
      File locationToInstall = new File(destServerHome, fileMeta.getDestPath());
      // TODO: Provide an option on <file> to allow for creating missing destination folders
      // Till then just throw an exception if dest-path is not actually available
      if (!locationToInstall.exists() || !locationToInstall.isDirectory())
      {
         throw new PackageManagerException("dest-path " + locationToInstall.getAbsolutePath() + " for file: "
               + fileMeta.getName() + " in package: " + pkgCtx
               + " is either not present or is not a directory");
      }
      try
      {
View Full Code Here

TOP

Related Classes of org.jboss.ejb3.packagemanager.exception.PackageManagerException

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.