本文整理汇总了Java中javax.ejb.NoSuchObjectLocalException类的典型用法代码示例。如果您正苦于以下问题:Java NoSuchObjectLocalException类的具体用法?Java NoSuchObjectLocalException怎么用?Java NoSuchObjectLocalException使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
NoSuchObjectLocalException类属于javax.ejb包,在下文中一共展示了NoSuchObjectLocalException类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: checkState
import javax.ejb.NoSuchObjectLocalException; //导入依赖的package包/类
/**
* Insure that timer methods can be invoked for the current operation on this Context.
*/
private void checkState() throws IllegalStateException, NoSuchObjectLocalException {
/* no more mandatory
final BeanContext beanContext = ThreadContext.getThreadContext().getBeanContext();
final BaseContext context = (BaseContext) beanContext.get(EJBContext.class);
context.doCheck(BaseContext.Call.timerMethod);
*/
if (timerData.isCancelled() && !timerData.isStopped()) {
throw new NoSuchObjectLocalException("Timer has been cancelled");
}
if (timerData.isExpired()) {
throw new NoSuchObjectLocalException("The timer has expired");
}
}
开发者ID:apache,项目名称:tomee,代码行数:19,代码来源:TimerImpl.java
示例2: getTimer
import javax.ejb.NoSuchObjectLocalException; //导入依赖的package包/类
public Timer getTimer() {
final ContainerSystem containerSystem = SystemInstance.get().getComponent(ContainerSystem.class);
if (containerSystem == null) {
throw new NoSuchObjectLocalException("OpenEJb container system is not running");
}
final BeanContext beanContext = containerSystem.getBeanContext(deploymentId);
if (beanContext == null) {
throw new NoSuchObjectLocalException("Deployment info not found " + deploymentId);
}
final EjbTimerService timerService = beanContext.getEjbTimerService();
if (timerService == null) {
throw new NoSuchObjectLocalException("Deployment no longer supports ejbTimout " + deploymentId + ". Has this ejb been redeployed?");
}
final Timer timer = timerService.getTimer(id);
if (timer == null) {
throw new NoSuchObjectLocalException("Timer not found for ejb " + deploymentId);
}
return timer;
}
开发者ID:apache,项目名称:tomee,代码行数:20,代码来源:TimerHandleImpl.java
示例3: isValidReference
import javax.ejb.NoSuchObjectLocalException; //导入依赖的package包/类
private void isValidReference(final Method method) throws NoSuchObjectException {
if (isInvalidReference) {
if (interfaceType.isComponent() && interfaceType.isLocal()) {
throw new NoSuchObjectLocalException("reference is invalid");
} else if (interfaceType.isComponent() || Remote.class.isAssignableFrom(method.getDeclaringClass())) {
throw new NoSuchObjectException("reference is invalid");
} else {
throw new NoSuchEJBException("reference is invalid for " + deploymentID);
}
}
if (!(Object.class.equals(method.getDeclaringClass())
&& method.getName().equals("finalize")
&& method.getExceptionTypes().length == 1
&& Throwable.class.equals(method.getExceptionTypes()[0]))) {
getBeanContext(); // will throw an exception if app has been undeployed.
}
}
开发者ID:apache,项目名称:tomee,代码行数:18,代码来源:BaseEjbProxyHandler.java
示例4: setup
import javax.ejb.NoSuchObjectLocalException; //导入依赖的package包/类
@Override
public void setup(TestContainer container) throws Exception {
container.login("1");
container.addBean(new ConfigurationServiceStub());
container.addBean(new DataServiceBean());
container.addBean(new ConfigurationServiceStub());
container.addBean(accountManagementStub = new AccountServiceStub());
container.addBean(Mockito.mock(SubscriptionServiceLocal.class));
container.addBean(Mockito.mock(BillingServiceLocal.class));
container.addBean(new PaymentServiceStub());
container.addBean(new IdentityServiceStub());
container.addBean(tm = new TimerServiceBean());
tss = new TimerServiceStub() {
@Override
public Timer createTimer(Date arg0, Serializable arg1)
throws IllegalArgumentException, IllegalStateException,
EJBException {
getTimers().add(new TimerStub(0, arg1, arg0, false) {
@Override
public Date getNextTimeout() throws EJBException,
IllegalStateException, NoSuchObjectLocalException {
return getExecDate();
}
});
return null;
}
};
ctx = Mockito.mock(SessionContext.class);
Mockito.when(ctx.getTimerService()).thenReturn(tss);
tm.ctx = ctx;
mgr = container.get(DataService.class);
cfgs = container.get(ConfigurationServiceLocal.class);
setUpDirServerStub(cfgs);
}
开发者ID:servicecatalog,项目名称:oscm,代码行数:38,代码来源:TimerServiceBeanIT.java
示例5: initTimer
import javax.ejb.NoSuchObjectLocalException; //导入依赖的package包/类
private void initTimer(TimerType timerType, Date date) {
timer = new TimerStub(0, timerType, date, false) {
@Override
public Date getNextTimeout() throws EJBException,
IllegalStateException, NoSuchObjectLocalException {
return getExecDate();
}
};
timer.setInfo(timerType);
}
开发者ID:servicecatalog,项目名称:oscm,代码行数:13,代码来源:TimerServiceBean2Test.java
示例6: isGenerating
import javax.ejb.NoSuchObjectLocalException; //导入依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
public boolean isGenerating() {
try {
if (tm != null) {
tm.getNextTimeout();
} else {
return false;
}
} catch (NoSuchObjectLocalException e) {
return false;
}
return true;
}
开发者ID:daergoth,项目名称:hiots,代码行数:18,代码来源:DummyDataGeneratorLocalImpl.java
示例7: getTimeRemaining
import javax.ejb.NoSuchObjectLocalException; //导入依赖的package包/类
public long getTimeRemaining() throws IllegalStateException, NoSuchObjectLocalException {
checkState();
final Date nextTimeout = timerData.getNextTimeout();
if (nextTimeout == null) {
throw new NoMoreTimeoutsException("The timer has no future timeouts");
}
return timerData.getTimeRemaining();
}
开发者ID:apache,项目名称:tomee,代码行数:9,代码来源:TimerImpl.java
示例8: getNextTimeout
import javax.ejb.NoSuchObjectLocalException; //导入依赖的package包/类
public Date getNextTimeout() throws IllegalStateException, NoSuchObjectLocalException {
checkState();
final Date nextTimeout = timerData.getNextTimeout();
if (nextTimeout == null) {
throw new NoMoreTimeoutsException("The timer has no future timeouts");
}
return timerData.getNextTimeout();
}
开发者ID:apache,项目名称:tomee,代码行数:10,代码来源:TimerImpl.java
示例9: getHandle
import javax.ejb.NoSuchObjectLocalException; //导入依赖的package包/类
public TimerHandle getHandle() throws IllegalStateException, NoSuchObjectLocalException {
checkState();
if (!timerData.isPersistent()) {
throw new IllegalStateException("can't getHandle for a non-persistent timer");
}
return new TimerHandleImpl(timerData.getId(), timerData.getDeploymentId());
}
开发者ID:apache,项目名称:tomee,代码行数:8,代码来源:TimerImpl.java
示例10: getSchedule
import javax.ejb.NoSuchObjectLocalException; //导入依赖的package包/类
public ScheduleExpression getSchedule() throws EJBException, IllegalStateException, NoSuchObjectLocalException {
checkState();
if (timerData.getType() == TimerType.Calendar) {
return ((CalendarTimerData) timerData).getSchedule();
}
throw new IllegalStateException("The target timer is not a calendar-based type ");
}
开发者ID:apache,项目名称:tomee,代码行数:8,代码来源:TimerImpl.java
示例11: cancel
import javax.ejb.NoSuchObjectLocalException; //导入依赖的package包/类
@Override
public void cancel() throws IllegalStateException,
NoSuchObjectLocalException, EJBException {
throw new UnsupportedOperationException();
}
开发者ID:servicecatalog,项目名称:oscm,代码行数:6,代码来源:EJBTimerStub.java
示例12: getHandle
import javax.ejb.NoSuchObjectLocalException; //导入依赖的package包/类
@Override
public TimerHandle getHandle() throws IllegalStateException,
NoSuchObjectLocalException, EJBException {
throw new UnsupportedOperationException();
}
开发者ID:servicecatalog,项目名称:oscm,代码行数:6,代码来源:EJBTimerStub.java
示例13: getInfo
import javax.ejb.NoSuchObjectLocalException; //导入依赖的package包/类
@Override
public Serializable getInfo() throws IllegalStateException,
NoSuchObjectLocalException, EJBException {
throw new UnsupportedOperationException();
}
开发者ID:servicecatalog,项目名称:oscm,代码行数:6,代码来源:EJBTimerStub.java
示例14: getNextTimeout
import javax.ejb.NoSuchObjectLocalException; //导入依赖的package包/类
@Override
public Date getNextTimeout() throws IllegalStateException,
NoSuchObjectLocalException, EJBException {
throw new UnsupportedOperationException();
}
开发者ID:servicecatalog,项目名称:oscm,代码行数:6,代码来源:EJBTimerStub.java
示例15: getTimeRemaining
import javax.ejb.NoSuchObjectLocalException; //导入依赖的package包/类
@Override
public long getTimeRemaining() throws IllegalStateException,
NoSuchObjectLocalException, EJBException {
throw new UnsupportedOperationException();
}
开发者ID:servicecatalog,项目名称:oscm,代码行数:6,代码来源:EJBTimerStub.java
示例16: getSchedule
import javax.ejb.NoSuchObjectLocalException; //导入依赖的package包/类
@Override
public ScheduleExpression getSchedule() throws IllegalStateException,
NoSuchObjectLocalException, EJBException {
throw new UnsupportedOperationException();
}
开发者ID:servicecatalog,项目名称:oscm,代码行数:6,代码来源:EJBTimerStub.java
示例17: isCalendarTimer
import javax.ejb.NoSuchObjectLocalException; //导入依赖的package包/类
@Override
public boolean isCalendarTimer() throws IllegalStateException,
NoSuchObjectLocalException, EJBException {
throw new UnsupportedOperationException();
}
开发者ID:servicecatalog,项目名称:oscm,代码行数:6,代码来源:EJBTimerStub.java
示例18: isPersistent
import javax.ejb.NoSuchObjectLocalException; //导入依赖的package包/类
@Override
public boolean isPersistent() throws IllegalStateException,
NoSuchObjectLocalException, EJBException {
throw new UnsupportedOperationException();
}
开发者ID:servicecatalog,项目名称:oscm,代码行数:6,代码来源:EJBTimerStub.java
示例19: cancel
import javax.ejb.NoSuchObjectLocalException; //导入依赖的package包/类
@Override
public void cancel() throws EJBException, IllegalStateException,
NoSuchObjectLocalException {
isCanceled = true;
}
开发者ID:servicecatalog,项目名称:oscm,代码行数:6,代码来源:TimerStub.java
示例20: getHandle
import javax.ejb.NoSuchObjectLocalException; //导入依赖的package包/类
@Override
public TimerHandle getHandle() throws EJBException, IllegalStateException,
NoSuchObjectLocalException {
return null;
}
开发者ID:servicecatalog,项目名称:oscm,代码行数:7,代码来源:TimerStub.java
注:本文中的javax.ejb.NoSuchObjectLocalException类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论