javax.ejb.AccessTimeout Java Examples

The following examples show how to use javax.ejb.AccessTimeout. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: JobProcessor.java    From tomee with Apache License 2.0 5 votes vote down vote up
@Asynchronous
@Lock(READ)
@AccessTimeout(-1)
public Future<String> addJob(String jobName) {

    // Pretend this job takes a while
    doSomeHeavyLifting();

    // Return our result
    return new AsyncResult<String>(jobName);
}
 
Example #2
Source File: SingletonExample03.java    From testing_security_development_enterprise_systems with GNU Lesser General Public License v3.0 4 votes vote down vote up
@AccessTimeout(value = 2 , unit = TimeUnit.MILLISECONDS)
@Override
public void incrementCounter() {
    x = x + 1;
}
 
Example #3
Source File: SingletonExample03.java    From testing_security_development_enterprise_systems with GNU Lesser General Public License v3.0 4 votes vote down vote up
@AccessTimeout(value = 2 , unit = TimeUnit.MILLISECONDS)
@Override
public void incrementCounter() {
    x = x + 1;
}
 
Example #4
Source File: BusyBee.java    From tomee with Apache License 2.0 4 votes vote down vote up
@AccessTimeout(0)
public void doItNow() {
    // do something
}
 
Example #5
Source File: BusyBee.java    From tomee with Apache License 2.0 4 votes vote down vote up
@AccessTimeout(value = 5, unit = TimeUnit.SECONDS)
public void doItSoon() {
    // do something
}
 
Example #6
Source File: BusyBee.java    From tomee with Apache License 2.0 4 votes vote down vote up
@AccessTimeout(-1)
public void justDoIt() {
    // do something
}
 
Example #7
Source File: SchedulerTest.java    From tomee with Apache License 2.0 4 votes vote down vote up
@AccessTimeout(value = 1, unit = TimeUnit.MINUTES)
public void observe(@Observes TestEvent event) {
    if ("five".equals(event.getMessage())) {
        events.countDown();
    }
}
 
Example #8
Source File: AccessTimeoutMetaTest.java    From tomee with Apache License 2.0 4 votes vote down vote up
@AccessTimeout(value = -1)
public void method() {
}
 
Example #9
Source File: AccessTimeoutTest.java    From tomee with Apache License 2.0 4 votes vote down vote up
@AccessTimeout(value = 2, unit = TimeUnit.SECONDS)
public void color() {
}
 
Example #10
Source File: AccessTimeoutTest.java    From tomee with Apache License 2.0 4 votes vote down vote up
@AccessTimeout(value = 3, unit = TimeUnit.SECONDS)
public void color(final Object o) {
}
 
Example #11
Source File: AccessTimeoutTest.java    From tomee with Apache License 2.0 4 votes vote down vote up
@AccessTimeout(value = 1, unit = TimeUnit.MINUTES)
public void red() {
}
 
Example #12
Source File: AccessTimeoutTest.java    From tomee with Apache License 2.0 4 votes vote down vote up
@AccessTimeout(value = 2, unit = TimeUnit.HOURS)
public void crimson() {
}
 
Example #13
Source File: AccessTimeoutTest.java    From tomee with Apache License 2.0 4 votes vote down vote up
@AccessTimeout(value = 2, unit = TimeUnit.DAYS)
public void scarlet() {
}
 
Example #14
Source File: ConcurrentMethodTest.java    From tomee with Apache License 2.0 4 votes vote down vote up
@AccessTimeout(value = 2, unit = TimeUnit.HOURS)
public void color(final Boolean s) {
}