Class CDIBatchArtifactFactoryImpl

    • Constructor Detail

      • CDIBatchArtifactFactoryImpl

        public CDIBatchArtifactFactoryImpl()
    • Method Detail

      • load

        public Object load​(String batchId)
        Specified by:
        load in interface IBatchArtifactFactory
        Parameters:
        batchId - The value of a @ref attribute in a JSL element, e.g. 'batchlet'
        Returns:
        An object instance of the artifact.
      • getBeanById

        protected jakarta.enterprise.inject.spi.Bean<?> getBeanById​(jakarta.enterprise.inject.spi.BeanManager bm,
                                                                    String id)
        Parameters:
        id - Either the EL name of the bean, its id in batch.xml, or its fully qualified class name.
        Returns:
        the bean for the given artifact id.
      • getUniqueBeanByBeanName

        protected jakarta.enterprise.inject.spi.Bean<?> getUniqueBeanByBeanName​(jakarta.enterprise.inject.spi.BeanManager bm,
                                                                                String batchId)
        Use the given BeanManager to lookup a unique CDI-registered bean with bean name equal to 'batchId', using EL matching rules.
        Returns:
        the bean with the given bean name, or 'null' if there is an ambiguous resolution
      • getUniqueBeanForBatchXMLEntry

        protected jakarta.enterprise.inject.spi.Bean<?> getUniqueBeanForBatchXMLEntry​(jakarta.enterprise.inject.spi.BeanManager bm,
                                                                                      String batchId)
        Use the given BeanManager to lookup a unique CDI-registered bean with bean class equal to the batch.xml entry mapped to be the batchId parameter
        Returns:
        the bean with the given className. It returns null if there are zero matches or if there is no umabiguous resolution (i.e. more than 1 match)
      • getUniqueBeanForClassName

        protected jakarta.enterprise.inject.spi.Bean<?> getUniqueBeanForClassName​(jakarta.enterprise.inject.spi.BeanManager bm,
                                                                                  String className)
      • findUniqueBeanForClass

        protected jakarta.enterprise.inject.spi.Bean<?> findUniqueBeanForClass​(jakarta.enterprise.inject.spi.BeanManager beanManager,
                                                                               Class<?> clazz)
                                                                        throws jakarta.enterprise.inject.AmbiguousResolutionException
        Returns:
        the bean within the given set whose class matches the given clazz.
        Throws:
        BatchCDIAmbiguousResolutionCheckedException - if more than one match is found
        jakarta.enterprise.inject.AmbiguousResolutionException
      • getContextClassLoader

        protected ClassLoader getContextClassLoader()
        Returns:
        thread context classloader