本文整理了Java中javax.ejb.Asynchronous
类的一些代码示例,展示了Asynchronous
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Asynchronous
类的具体详情如下:
包路径:javax.ejb.Asynchronous
类名称:Asynchronous
暂无
代码示例来源:origin: javamelody/javamelody
/**
* Intercepteur pour CDI & pour EJB 3.1 (Java EE 6+),
* configuré automatiquement pour les beans et méthodes ayant l'annotation @{@link Asynchronous}.
* @author Emeric Vernat
*/
@Interceptor
@Asynchronous
public class MonitoringAsynchronousCdiInterceptor extends MonitoringInterceptor {
private static final long serialVersionUID = 1L;
// note: it would be cool to automatically monitor methods having @Schedule or @Schedules like @Asynchronous,
// without having to add @Monitored on the method, but we can't
}
代码示例来源:origin: javaee-samples/javaee7-samples
@Asynchronous
public void doAsync(AsyncContext asyncContext) {
try {
sleep(1000);
} catch (InterruptedException e) {
interrupted();
}
try {
asyncContext.getResponse().getWriter().write("async response");
} catch (IOException e) {
e.printStackTrace();
}
asyncContext.complete();
}
代码示例来源:origin: org.dihedron.activities/activities-core
@Asynchronous
public Future<ActivityData> submit(ActivityCallable callable) throws ActivityException;
}
代码示例来源:origin: org.dihedron.commons/dihedron-commons
@Asynchronous
public Future<ActivityData> submit(ActivityCallable callable) throws ActivityException;
}
代码示例来源:origin: akquinet/jbosscc-as7-examples
@Asynchronous
public void async(){
LOG.info("invoke asynchronous");
}
代码示例来源:origin: IQSS/dataverse
@Asynchronous
public void fixMissingOriginalTypes(List<Long> datafileIds) {
for (Long fileId : datafileIds) {
fixMissingOriginalType(fileId);
}
logger.info("Finished repairing tabular data files that were missing the original file format labels.");
}
代码示例来源:origin: IQSS/dataverse
@Asynchronous
public void asyncIndexDatasetList(List<Dataset> datasets, boolean doNormalSolrDocCleanUp) {
for(Dataset dataset : datasets) {
indexDataset(dataset, true);
}
}
代码示例来源:origin: IQSS/dataverse
@Asynchronous
public void fixMissingOriginalSizes(List<Long> datafileIds) {
for (Long fileId : datafileIds) {
fixMissingOriginalSize(fileId);
try {
Thread.sleep(1000);
} catch (Exception ex) {}
}
logger.info("Finished repairing tabular data files that were missing the original file sizes.");
}
代码示例来源:origin: NationalSecurityAgency/datawave
@Asynchronous
protected <T> void executePostMethodAsyncWithRuntimeException(String uriSuffix, Consumer<URIBuilder> uriCustomizer, Consumer<HttpPost> requestCustomizer,
IOFunction<T> resultConverter, Supplier<String> errorSupplier) {
T response = executePostMethodWithRuntimeException(uriSuffix, uriCustomizer, requestCustomizer, resultConverter, errorSupplier);
log.debug(response.toString());
}
代码示例来源:origin: net.bull.javamelody/javamelody-core
/**
* Intercepteur pour CDI & pour EJB 3.1 (Java EE 6+),
* configuré automatiquement pour les beans et méthodes ayant l'annotation @{@link Asynchronous}.
* @author Emeric Vernat
*/
@Interceptor
@Asynchronous
public class MonitoringAsynchronousCdiInterceptor extends MonitoringInterceptor {
private static final long serialVersionUID = 1L;
// note: it would be cool to automatically monitor methods having @Schedule or @Schedules like @Asynchronous,
// without having to add @Monitored on the method, but we can't
}
代码示例来源:origin: com.github.zuacaldeira/flex-app-backend
@PostConstruct
@Asynchronous
private void init() {
try {
Neo4jSessionFactory sessionFactory = Neo4jSessionFactory.getInstance();
} catch(Exception ex) {
}
}
代码示例来源:origin: org.jboss.as/jboss-as-demos-spec
@Asynchronous
public Future<String> asyncMethod(final String input) {
return new AsyncResult<String>("Async#" + input);
}
}
代码示例来源:origin: IQSS/dataverse
@Asynchronous
public void exportAllAsync() {
exportAllDatasets(false);
}
代码示例来源:origin: IQSS/dataverse
@Asynchronous
public void reExportAllAsync() {
exportAllDatasets(true);
}
代码示例来源:origin: liimaorg/liima
@Asynchronous
public void handleShakedownTestEvent(@Observes(during=TransactionPhase.AFTER_SUCCESS) ShakedownTestEvent event) {
log.log(logLevel, "ShakedownTest event fired");
executeForTests();
}
代码示例来源:origin: IQSS/dataverse
@Asynchronous
private void forward(Workflow wf, WorkflowContext ctxt) {
executeSteps(wf, ctxt, 0);
}
代码示例来源:origin: IQSS/dataverse
@Asynchronous
public Future<String> asyncIndexDataset(Dataset dataset, boolean doNormalSolrDocCleanUp) {
return indexDataset(dataset, doNormalSolrDocCleanUp);
}
代码示例来源:origin: IQSS/dataverse
@Asynchronous
public void updateSiteMap(List<Dataverse> dataverses, List<Dataset> datasets) {
SiteMapUtil.updateSiteMap(dataverses, datasets);
}
代码示例来源:origin: IQSS/dataverse
@Asynchronous
public void exportOaiSetAsync(OAISet oaiSet) {
exportOaiSet(oaiSet);
}
代码示例来源:origin: akquinet/jbosscc-as7-examples
@Asynchronous
public Future<String> asyncResult(){
long now = new Date().getTime();
while (new Date().getTime() < now + 1000) {
LOG.info("...");
}
return new AsyncResult<String>("Hello EJB!");
}
}
内容来源于网络,如有侵权,请联系作者删除!