当前位置: 首页>>代码示例>>Java>>正文


Java Disposes类代码示例

本文整理汇总了Java中javax.enterprise.inject.Disposes的典型用法代码示例。如果您正苦于以下问题:Java Disposes类的具体用法?Java Disposes怎么用?Java Disposes使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


Disposes类属于javax.enterprise.inject包,在下文中一共展示了Disposes类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: validateDisposeMethods

import javax.enterprise.inject.Disposes; //导入依赖的package包/类
private static void validateDisposeMethods(final CdiEjbBean<?> bean) {
    if (!bean.getBeanContext().isLocalbean()) {
        for (final Method m : bean.getBeanContext().getBeanClass().getMethods()) {
            if (m.getDeclaringClass().equals(Object.class)) {
                continue;
            }

            if (m.getParameterTypes().length > 0) {
                for (final Annotation[] a : m.getParameterAnnotations()) {
                    for (final Annotation ann : a) {
                        if (ann.annotationType().equals(Disposes.class) && doResolveViewMethod(bean, m) == null) {
                            throw new WebBeansConfigurationException("@Disposes is forbidden on non business EJB methods");
                        }
                    }
                }
            }
        }
    }
}
 
开发者ID:apache,项目名称:tomee,代码行数:20,代码来源:CdiPlugin.java

示例2: closeInputStream

import javax.enterprise.inject.Disposes; //导入依赖的package包/类
public void closeInputStream(@Disposes
                             @InjectableResource(resourceProvider = InjectableResourceProvider.class, location = "")
                             InputStream inputStream)
{
    if (inputStream != null)
    {
        try
        {
            inputStream.close();
        }
        catch (IOException e)
        {
            if (logger.isLoggable(Level.FINE))
            {
                logger.log(Level.FINE,"Unable to close input stream ",e);
            }
        }
    }
}
 
开发者ID:apache,项目名称:deltaspike,代码行数:20,代码来源:InjectableResourceProducer.java

示例3: dispose

import javax.enterprise.inject.Disposes; //导入依赖的package包/类
/**
 * 
 * @param scheduler
 */
public void dispose(@Disposes ScheduledExecutorService scheduler) {
	scheduler.shutdown();
	try {
		if (!scheduler.awaitTermination(1, TimeUnit.MINUTES)) {
			this.log.warn("Shutdown did not complete in time!");
		}
	} catch (InterruptedException e) {
		this.log.warn("Shutdown interrupted!", e);
		Thread.currentThread().interrupt();
	}
}
 
开发者ID:dansiviter,项目名称:cito,代码行数:16,代码来源:SchedulerProducer.java

示例4: destroy

import javax.enterprise.inject.Disposes; //导入依赖的package包/类
/**
 * Shuts down the MQTT client.
 * 
 * @param client
 *            client to shut down.
 */
public void destroy(@Disposes MqttClient client) {
    try {
        if (client != null) {
            client.disconnect();
            logger.info("Disconnected from broker: " + broker);
        }
    } catch (MqttException e) {
        logger.error("Error disconnecting", e);
    }
}
 
开发者ID:zambrovski,项目名称:mqtt-camunda-bpm,代码行数:17,代码来源:MqttClientProducer.java

示例5: closeAnalysisKeyspaceSession

import javax.enterprise.inject.Disposes; //导入依赖的package包/类
public void closeAnalysisKeyspaceSession(@Disposes FileSystem session) {
try {
    session.close();
} catch (IOException e) {
    logger.warn("Could not close Hadoop file system.", e);
}
   }
 
开发者ID:PureSolTechnologies,项目名称:Purifinity,代码行数:8,代码来源:FileSystemProducter.java

示例6: closeDuctileGraph

import javax.enterprise.inject.Disposes; //导入依赖的package包/类
public void closeDuctileGraph(@Disposes DuctileGraph ductileGraph) {
try {
    ductileGraph.close();
} catch (IOException e) {
    logger.warn("Could not close Ductile Graph.", e);
}
   }
 
开发者ID:PureSolTechnologies,项目名称:Purifinity,代码行数:8,代码来源:DuctileGraphProducer.java

示例7: closeAnalysisKeyspaceSession

import javax.enterprise.inject.Disposes; //导入依赖的package包/类
public void closeAnalysisKeyspaceSession(@Disposes @EvaluatorStoreConnection Connection connection) {
try {
    connection.close();
} catch (SQLException e) {
    logger.warn("Could not close connection to Phoenix/HBase.", e);
}
   }
 
开发者ID:PureSolTechnologies,项目名称:Purifinity,代码行数:8,代码来源:EvaluatorStoreConnectionProducer.java

示例8: closeAnalysisKeyspaceSession

import javax.enterprise.inject.Disposes; //导入依赖的package包/类
public void closeAnalysisKeyspaceSession(@Disposes @AnalysisServiceConnection Connection connection) {
try {
    connection.close();
} catch (SQLException e) {
    logger.warn("Could not close connection to Phoenix/HBase.", e);
}
   }
 
开发者ID:PureSolTechnologies,项目名称:Purifinity,代码行数:8,代码来源:AnalysisServiceConnectionProducer.java

示例9: closePreferencesStoreSession

import javax.enterprise.inject.Disposes; //导入依赖的package包/类
public void closePreferencesStoreSession(@Disposes @PreferencesStoreConnection Connection connection) {
try {
    connection.close();
} catch (SQLException e) {
    logger.warn("Could not close connection to Phoenix/HBase.", e);
}
   }
 
开发者ID:PureSolTechnologies,项目名称:Purifinity,代码行数:8,代码来源:PreferencesStoreConnectionProducer.java

示例10: closeAnalysisKeyspaceSession

import javax.enterprise.inject.Disposes; //导入依赖的package包/类
public void closeAnalysisKeyspaceSession(@Disposes @PluginsDatabaseConnection Connection connection) {
try {
    connection.close();
} catch (SQLException e) {
    logger.warn("Could not close connection to Phoenix/HBase.", e);
}
   }
 
开发者ID:PureSolTechnologies,项目名称:Purifinity,代码行数:8,代码来源:PluginsDatabaseConnectionProducer.java

示例11: closeAnalysisKeyspaceSession

import javax.enterprise.inject.Disposes; //导入依赖的package包/类
public void closeAnalysisKeyspaceSession(@Disposes @AccountManagerConnection Connection connection) {
try {
    connection.close();
} catch (SQLException e) {
    logger.warn("Could not close connection to Phoenix/HBase.", e);
}
   }
 
开发者ID:PureSolTechnologies,项目名称:Purifinity,代码行数:8,代码来源:AccountManagerConnectionProducer.java

示例12: closeAnalysisKeyspaceSession

import javax.enterprise.inject.Disposes; //导入依赖的package包/类
public void closeAnalysisKeyspaceSession(@Disposes @PasswordStoreConnection Connection connection) {
try {
    connection.close();
} catch (SQLException e) {
    logger.warn("Could not close connection to Phoenix/HBase.", e);
}
   }
 
开发者ID:PureSolTechnologies,项目名称:Purifinity,代码行数:8,代码来源:PasswordStoreConnectionProducer.java

示例13: closeAnalysisKeyspaceSession

import javax.enterprise.inject.Disposes; //导入依赖的package包/类
public void closeAnalysisKeyspaceSession(@Disposes @SystemMonitorConnection Connection connection) {
try {
    connection.close();
} catch (SQLException e) {
    logger.warn("Could not close connection to Phoenix/HBase.", e);
}
   }
 
开发者ID:PureSolTechnologies,项目名称:Purifinity,代码行数:8,代码来源:SystemMonitorConnectionProducer.java

示例14: closeAnalysisKeyspaceSession

import javax.enterprise.inject.Disposes; //导入依赖的package包/类
public void closeAnalysisKeyspaceSession(
    @Disposes @IntermediateCoCoMoEvaluatorStoreConnection Connection connection) {
try {
    connection.close();
} catch (SQLException e) {
    logger.warn("Could not close connection to Phoenix/HBase.", e);
}
   }
 
开发者ID:PureSolTechnologies,项目名称:Purifinity,代码行数:9,代码来源:ConnectionProducer.java

示例15: closeAnalysisKeyspaceSession

import javax.enterprise.inject.Disposes; //导入依赖的package包/类
public void closeAnalysisKeyspaceSession(@Disposes @BasicCoCoMoEvaluatorStoreConnection Connection connection) {
try {
    connection.close();
} catch (SQLException e) {
    logger.warn("Could not close connection to Phoenix/HBase.", e);
}
   }
 
开发者ID:PureSolTechnologies,项目名称:Purifinity,代码行数:8,代码来源:ConnectionProducer.java


注:本文中的javax.enterprise.inject.Disposes类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。