Class DBConnectionProducer


  • @ApplicationScoped
    public class DBConnectionProducer
    extends Object
    Producer for creating or obtaining Connection
    Author:
    balazs.joo
    • Constructor Detail

      • DBConnectionProducer

        public DBConnectionProducer()
    • Method Detail

      • getConnection

        @Produces
        @Dependent
        public JDBCConnection getConnection​(javax.enterprise.inject.spi.InjectionPoint injectionPoint)
                                     throws hu.icellmobilsoft.coffee.dto.exception.BaseException
        Creates or gets Connection for the given configKey
        Parameters:
        injectionPoint - CDI injection point
        Returns:
        created object
        Throws:
        hu.icellmobilsoft.coffee.dto.exception.BaseException - exception
      • clear

        @PreDestroy
        public void clear()
        Destroys created Connections