我刚刚进入OSGi捆绑框架,这里的情况完全不同(与我过去一直在做的相比 - 我们在J2EE上开发Web应用程序 - 这个应用程序的容器是Apache tomcat).
在OSGi框架中,我们使用Apache Felix(不知道为什么使用它而不是Apache tomcat).
问题1:这两件事有什么区别?
问题2:Apache Felix是自己的容器吗?如果是的话怎么样?
问题3:Apache Felix是否支持除J2EE之外的其他平台?
任何帮助将受到高度赞赏:)
我有一段代码让我发疯。一般流程是,当 TRY 中的某个事件发生时,我抛出异常...根据我的理解,每当调用 时throw,它只是停止在同一个类中进一步执行,并将控制权从该类的函数所在的位置返回叫...
这是代码...
try{
session = getHibernateSession();
companyAccountLinkingWSBean = (CompanyAccountLinkingWSBean) wsAttribute
.getBeanObject();
companyToMatch = companyAccountLinkingWSBean.getCompanyCode();
cnicToMatch = companyAccountLinkingWSBean.getCnic();
LOG.debug("We have found the Mobile number from the WS Bean as input");
mobile = companyAccountLinkingWSBean.getMobileNumber();
LOG.info("Mobile is : " + mobile);
if(mobile.isEmpty()){
LOG.info("Coming in mobile.isEmpty()");
companyResponceWSBean = new CompanyResponceWSBean();
companyResponceWSBean.setpID(Constants.INPUT_MOBILE_ERROR);
companyResponceWSBean.setMessage(Constants.INPUT_MOBILE_ERROR_MSG);
companyResponceWSBean.setSuccess(false);
response = new WSAttribute();
response.setBeanObject(companyResponceWSBean);
LOG.info("BEFORE THROWING");
throw new PayboxFault(Constants.INPUT_MOBILE_ERROR,
Constants.INPUT_MOBILE_ERROR_MSG);
}
LOG.info("Out side IF statement!!");
} catch (Exception e) {
LOG.info("IN Exception!!");
}
LOG.info("Out Side …Run Code Online (Sandbox Code Playgroud)