本文整理了Java中javax.ejb.Asynchronous.<init>()
方法的一些代码示例,展示了Asynchronous.<init>()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Asynchronous.<init>()
方法的具体详情如下:
包路径:javax.ejb.Asynchronous
类名称:Asynchronous
方法名:<init>
暂无
代码示例来源: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: 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: IQSS/dataverse
@Asynchronous
public void indexRole(RoleAssignment roleAssignment) {
IndexResponse indexResponse = solrIndexService.indexPermissionsOnSelfAndChildren(roleAssignment.getDefinitionPoint());
logger.fine("output from indexing operations: " + indexResponse);
}
代码示例来源:origin: IQSS/dataverse
@Asynchronous
public void indexRoles(Collection<DvObject> dvObjects) {
for (DvObject dvObject : dvObjects) {
IndexResponse indexResponse = solrIndexService.indexPermissionsOnSelfAndChildren(dvObject);
logger.fine("output from permission indexing operations (dvobject " + dvObject.getId() + ": " + indexResponse);
}
}
代码示例来源:origin: aerogear/aerogear-unifiedpush-server
@Override
@Asynchronous
public void removeInstallationsForVariantByDeviceTokens(String variantID, Set<String> deviceTokens) {
// collect inactive installations for the given variant:
List<Installation> inactiveInstallations = installationDao.findInstallationsForVariantByDeviceTokens(variantID, deviceTokens);
// get rid of them
this.removeInstallations(inactiveInstallations);
}
代码示例来源:origin: aerogear/aerogear-unifiedpush-server
@Override
@Asynchronous
public void removeInstallationForVariantByDeviceToken(String variantID, String deviceToken) {
removeInstallation(findInstallationForVariantByDeviceToken(variantID, deviceToken));
}
代码示例来源:origin: IQSS/dataverse
@Asynchronous
public void remove(Long setId) {
OAISet oaiSet = find(setId);
if (oaiSet == null) {
return;
}
em.createQuery("delete from OAIRecord hs where hs.setName = '" + oaiSet.getSpec() + "'", OAISet.class).executeUpdate();
//OAISet merged = em.merge(oaiSet);
em.remove(oaiSet);
}
代码示例来源:origin: hopshadoop/hopsworks
@Asynchronous
@TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)
public void startExecution(HopsJob job) {
job.execute();
}
代码示例来源:origin: org.rhq/rhq-enterprise-server
@Override
@Asynchronous
@RequiredPermission(Permission.MANAGE_SETTINGS)
public void updateConfigurationAsync(Subject subject, StorageNodeConfigurationComposite storageNodeConfiguration) {
updateConfiguration(subject, storageNodeConfiguration);
}
代码示例来源:origin: IQSS/dataverse
@Asynchronous
public Future<JsonObjectBuilder> indexAllOrSubset(long numPartitions, long partitionId, boolean skipIndexed, boolean previewOnly) {
JsonObjectBuilder response = Json.createObjectBuilder();
Future<String> responseFromIndexAllOrSubset = indexAllOrSubset(numPartitions, partitionId, skipIndexed);
String status = "indexAllOrSubset has begun";
response.add("responseFromIndexAllOrSubset", status);
return new AsyncResult<>(response);
}
代码示例来源:origin: IQSS/dataverse
/**
* Called to run an "On Demand" harvest.
*/
@Asynchronous
public void doAsyncHarvest(DataverseRequest dataverseRequest, HarvestingClient harvestingClient) {
try {
doHarvest(dataverseRequest, harvestingClient.getId());
} catch (Exception e) {
logger.info("Caught exception running an asynchronous harvest (dataverse \""+harvestingClient.getName()+"\")");
}
}
代码示例来源:origin: hopshadoop/hopsworks
@Asynchronous
public Future<String> asyncServiceOp(String operation, String hostAddress,
String agentPassword, String cluster, String group, String service) throws AppException {
String url = createUrl(operation, hostAddress, cluster, group, service);
return new AsyncResult<String>(fetchContent(url, agentPassword));
}
代码示例来源:origin: org.rhq/rhq-enterprise-server
/**
* This method does the real updating, it is not exposed to the REST-clients, but must be public so that #updateDefinition can
* call it and the container does an asynchronous request.
* @param definitionId Id of the measeuremnt definition to update
* @param in The data to be put in
* @param updateExisting Should existing schedules of the metric als be updated?
*/
@Asynchronous
public void submitDefinitionChange(int definitionId, MetricSchedule in, boolean updateExisting) {
scheduleManager.updateDefaultCollectionIntervalAndEnablementForMeasurementDefinitions(caller,new int[]{definitionId},in.getCollectionInterval(),in.getEnabled(),updateExisting);
}
代码示例来源:origin: org.rhq/rhq-enterprise-server
@Asynchronous
@ExcludeDefaultInterceptors
public void agentIsShuttingDown(String agentName) {
Agent downedAgent = getAgentByName(agentName);
ServerCommunicationsServiceMBean server_bootstrap = ServerCommunicationsServiceUtil.getService();
server_bootstrap.removeDownedAgent(downedAgent.getRemoteEndpoint());
LOG.info("Agent with name [" + agentName + "] just went down");
agentManager.backfillAgentInNewTransaction(subjectManager.getOverlord(), agentName, downedAgent.getId());
return;
}
内容来源于网络,如有侵权,请联系作者删除!