-
如何考虑weblogic异常关闭问题25
web项目架构:Tapestry+hibernate+spring,用到了spring的opensession in view的模式管理数据库操作的session。
系统部署给用户后,到每天的下午weblogic服务器就会异常关闭。总共的用户大概有几千人。
想用LoadRunner测试,但是不知从哪些方面考虑。
以下为报错信息,求指点。
####<2010-8-24 上午10时34分57秒 CST> <Error> <HTTP> <bzxtdb6> <AdminServer> <[ACTIVE] ExecuteThread: '6' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1282617297588> <BEA-101017> <[weblogic.servlet.internal.WebAppServletContext@157e3a9 - appName: 'webroot', name: 'webroot', context-path: '/ses'] Root cause of ServletException.
org.apache.hivemind.ApplicationRuntimeException: HttpSession is invalid
at org.apache.tapestry.error.ExceptionPresenterImpl.presentException(ExceptionPresenterImpl.java:64)
at $ExceptionPresenter_12aa02df9dd.presentException($ExceptionPresenter_12aa02df9dd.java)
at org.apache.tapestry.engine.AbstractEngine.activateExceptionPage(AbstractEngine.java:121)
at org.apache.tapestry.engine.AbstractEngine.service(AbstractEngine.java:280)
at org.apache.tapestry.services.impl.InvokeEngineTerminator.service(InvokeEngineTerminator.java:60)
at $WebRequestServicer_12aa02dfa35.service($WebRequestServicer_12aa02dfa35.java)
at $WebRequestServicer_12aa02dfa31.service($WebRequestServicer_12aa02dfa31.java)
at org.apache.tapestry.services.impl.WebRequestServicerPipelineBridge.service(WebRequestServicerPipelineBridge.java:56)
at $ServletRequestServicer_12aa02dfa17.service($ServletRequestServicer_12aa02dfa17.java)
at org.apache.tapestry.request.DecodedRequestInjector.service(DecodedRequestInjector.java:55)
at $ServletRequestServicerFilter_12aa02dfa13.service($ServletRequestServicerFilter_12aa02dfa13.java)
at $ServletRequestServicer_12aa02dfa19.service($ServletRequestServicer_12aa02dfa19.java)
at org.apache.tapestry.multipart.MultipartDecoderFilter.service(MultipartDecoderFilter.java:52)
at $ServletRequestServicerFilter_12aa02dfa11.service($ServletRequestServicerFilter_12aa02dfa11.java)
at $ServletRequestServicer_12aa02dfa19.service($ServletRequestServicer_12aa02dfa19.java)
at org.apache.tapestry.services.impl.SetupRequestEncoding.service(SetupRequestEncoding.java:53)
at $ServletRequestServicerFilter_12aa02dfa15.service($ServletRequestServicerFilter_12aa02dfa15.java)
at $ServletRequestServicer_12aa02dfa19.service($ServletRequestServicer_12aa02dfa19.java)
at $ServletRequestServicer_12aa02dfa0b.service($ServletRequestServicer_12aa02dfa0b.java)
at org.apache.tapestry.ApplicationServlet.doService(ApplicationServlet.java:123)
at org.apache.tapestry.ApplicationServlet.doGet(ApplicationServlet.java:79)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:283)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
at org.apache.tapestry.RedirectFilter.doFilter(RedirectFilter.java:103)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
java.lang.IllegalStateException: HttpSession is invalid
at weblogic.servlet.internal.session.SessionData.getAttributeNames(SessionData.java:438)
at org.apache.tapestry.web.ServletWebSession.getAttributeNames(ServletWebSession.java:49)
at org.apache.tapestry.record.RecordUtils.iterateOverMatchingAttributes(RecordUtils.java:88)
at org.apache.tapestry.record.SessionPropertyPersistenceStrategy.getStoredChanges(SessionPropertyPersistenceStrategy.java:83)
at $PropertyPersistenceStrategy_12aa02dfaeb.getStoredChanges($PropertyPersistenceStrategy_12aa02dfaeb.java)
at org.apache.tapestry.record.PropertyPersistenceStrategySourceImpl.getAllStoredChanges(PropertyPersistenceStrategySourceImpl.java:72)
at $PropertyPersistenceStrategySource_12aa02dfa4b.getAllStoredChanges($PropertyPersistenceStrategySource_12aa02dfa4b.java)
at org.apache.tapestry.record.PageRecorderImpl.getChanges(PageRecorderImpl.java:68)
at org.apache.tapestry.record.PageRecorderImpl.rollback(PageRecorderImpl.java:73)
at org.apache.tapestry.engine.RequestCycle.loadPage(RequestCycle.java:279)
at org.apache.tapestry.engine.RequestCycle.getPage(RequestCycle.java:251)
at org.apache.tapestry.error.ExceptionPresenterImpl.presentException(ExceptionPresenterImpl.java:40)
at $ExceptionPresenter_12aa02df9dd.presentException($ExceptionPresenter_12aa02df9dd.java)
at org.apache.tapestry.engine.AbstractEngine.activateExceptionPage(AbstractEngine.java:121)
at org.apache.tapestry.engine.AbstractEngine.service(AbstractEngine.java:280)
at org.apache.tapestry.services.impl.InvokeEngineTerminator.service(InvokeEngineTerminator.java:60)
at $WebRequestServicer_12aa02dfa35.service($WebRequestServicer_12aa02dfa35.java)
at $WebRequestServicer_12aa02dfa31.service($WebRequestServicer_12aa02dfa31.java)
at org.apache.tapestry.services.impl.WebRequestServicerPipelineBridge.service(WebRequestServicerPipelineBridge.java:56)
at $ServletRequestServicer_12aa02dfa17.service($ServletRequestServicer_12aa02dfa17.java)
at org.apache.tapestry.request.DecodedRequestInjector.service(DecodedRequestInjector.java:55)
at $ServletRequestServicerFilter_12aa02dfa13.service($ServletRequestServicerFilter_12aa02dfa13.java)
at $ServletRequestServicer_12aa02dfa19.service($ServletRequestServicer_12aa02dfa19.java)
at org.apache.tapestry.multipart.MultipartDecoderFilter.service(MultipartDecoderFilter.java:52)
at $ServletRequestServicerFilter_12aa02dfa11.service($ServletRequestServicerFilter_12aa02dfa11.java)
at $ServletRequestServicer_12aa02dfa19.service($ServletRequestServicer_12aa02dfa19.java)
at org.apache.tapestry.services.impl.SetupRequestEncoding.service(SetupRequestEncoding.java:53)
at $ServletRequestServicerFilter_12aa02dfa15.service($ServletRequestServicerFilter_12aa02dfa15.java)
at $ServletRequestServicer_12aa02dfa19.service($ServletRequestServicer_12aa02dfa19.java)
at $ServletRequestServicer_12aa02dfa0b.service($ServletRequestServicer_12aa02dfa0b.java)
at org.apache.tapestry.ApplicationServlet.doService(ApplicationServlet.java:123)
at org.apache.tapestry.ApplicationServlet.doGet(ApplicationServlet.java:79)
>
####<2010-8-24 上午10时36分21秒 CST> <Error> <HTTP> <bzxtdb6> <AdminServer> <[ACTIVE] ExecuteThread: '6' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1282617381139> <BEA-101020> <[weblogic.servlet.internal.WebAppServletContext@157e3a9 - appName: 'webroot', name: 'webroot', context-path: '/ses'] Servlet failed with Exception
java.lang.IllegalArgumentException: Cannot pass null or empty values to constructor
at org.acegisecurity.userdetails.User.<init>(User.java:155)
at com.dongyun.ses.auth.UserAuthorityDAOImpl.loadUserByUsername(UserAuthorityDAOImpl.java:71)
at sun.reflect.GeneratedMethodAccessor414.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:296)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:177)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:144)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:107)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:166)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
at $Proxy65.loadUserByUsername(Unknown Source)
at org.acegisecurity.providers.dao.DaoAuthenticationProvider.retrieveUser(DaoAuthenticationProvider.java:94)
at org.acegisecurity.providers.dao.AbstractUserDetailsAuthenticationProvider.authenticate(AbstractUserDetailsAuthenticationProvider.java:126)
at org.acegisecurity.providers.ProviderManager.doAuthentication(ProviderManager.java:208)
at org.acegisecurity.AbstractAuthenticationManager.authenticate(AbstractAuthenticationManager.java:49)
at org.acegisecurity.ui.webapp.AuthenticationProcessingFilter.attemptAuthentication(AuthenticationProcessingFilter.java:90)
at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:228)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:303)
at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:220)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:303)
at org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:173)
at org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:120)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
at com.dongyun.ses.web.MultiDSFilter.doFilter(MultiDSFilter.java:527)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
at com.dongyun.ses.web.LinkCheckFilter.doFilter(LinkCheckFilter.java:67)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:96)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3229)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2002)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:1908)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1362)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
>
####<2010-8-24 上午10时36分33秒 CST> <Error> <HTTP> <bzxtdb6> <AdminServer> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1282617393905> <BEA-101020> <[weblogic.servlet.internal.WebAppServletContext@157e3a9 - appName: 'webroot', name: 'webroot', context-path: '/ses'] Servlet failed with Exception
java.lang.IllegalArgumentException: Cannot pass null or empty values to constructor
at org.acegisecurity.userdetails.User.<init>(User.java:155)
at com.dongyun.ses.auth.UserAuthorityDAOImpl.loadUserByUsername(UserAuthorityDAOImpl.java:71)
at sun.reflect.GeneratedMethodAccessor414.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:296)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:177)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:144)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:107)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:166)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
at $Proxy65.loadUserByUsername(Unknown Source)
at org.acegisecurity.providers.dao.DaoAuthenticationProvider.retrieveUser(DaoAuthenticationProvider.java:94)
at org.acegisecurity.providers.dao.AbstractUserDetailsAuthenticationProvider.authenticate(AbstractUserDetailsAuthenticationProvider.java:126)
at org.acegisecurity.providers.ProviderManager.doAuthentication(ProviderManager.java:208)
at org.acegisecurity.AbstractAuthenticationManager.authenticate(AbstractAuthenticationManager.java:49)
at org.acegisecurity.ui.webapp.AuthenticationProcessingFilter.attemptAuthentication(AuthenticationProcessingFilter.java:90)
at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:228)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:303)
at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:220)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:303)
at org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:173)
at org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:120)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
at com.dongyun.ses.web.MultiDSFilter.doFilter(MultiDSFilter.java:527)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
at com.dongyun.ses.web.LinkCheckFilter.doFilter(LinkCheckFilter.java:67)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:96)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3229)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2002)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:1908)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1362)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
>
####<2010-8-24 上午10时36分56秒 CST> <Error> <HTTP> <bzxtdb6> <AdminServer> <[ACTIVE] ExecuteThread: '6' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1282617416625> <BEA-101020> <[weblogic.servlet.internal.WebAppServletContext@157e3a9 - appName: 'webroot', name: 'webroot', context-path: '/ses'] Servlet failed with Exception
java.lang.IllegalArgumentException: Cannot pass null or empty values to constructor
at org.acegisecurity.userdetails.User.<init>(User.java:155)
at com.dongyun.ses.auth.UserAuthorityDAOImpl.loadUserByUsername(UserAuthorityDAOImpl.java:71)
at sun.reflect.GeneratedMethodAccessor414.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:296)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:177)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:144)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:107)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:166)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
at $Proxy65.loadUserByUsername(Unknown Source)
at org.acegisecurity.providers.dao.DaoAuthenticationProvider.retrieveUser(DaoAuthenticationProvider.java:94)
at org.acegisecurity.providers.dao.AbstractUserDetailsAuthenticationProvider.authenticate(AbstractUserDetailsAuthenticationProvider.java:126)
at org.acegisecurity.providers.ProviderManager.doAuthentication(ProviderManager.java:208)
at org.acegisecurity.AbstractAuthenticationManager.authenticate(AbstractAuthenticationManager.java:49)
at org.acegisecurity.ui.webapp.AuthenticationProcessingFilter.attemptAuthentication(AuthenticationProcessingFilter.java:90)
at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:228)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:303)
at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:220)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:303)
at org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:173)
at org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:120)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
at com.dongyun.ses.web.MultiDSFilter.doFilter(MultiDSFilter.java:527)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
at com.dongyun.ses.web.LinkCheckFilter.doFilter(LinkCheckFilter.java:67)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:96)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3229)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2002)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:1908)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1362)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
>2010年9月03日 16:16
目前还没有答案
相关推荐
### Weblogic Server应用性能考虑及调优 #### 摘要 本文主要针对Weblogic Server的应用性能考虑及其调优方法进行了详细的阐述。考虑到性能优化是一个系统性工程,它覆盖了项目开发周期的各个环节,文中从多个角度...
3. **适用范围**:该补丁适用于2022年第一季度和第二季度,这意味着在这些时间段内,WebLogic 12c和14c用户应考虑安装此补丁以保持系统安全性和稳定性。WebLogic 12c是WebLogic的一个主要版本,通常支持多个小版本...
- 针对特定版本的JVM,如果存在已知的GC问题,可以考虑升级JVM版本或者应用补丁来解决。 通过上述方法,我们可以有效地降低WebLogic服务器的内存占用,提高系统的稳定性和响应速度。同时,合理的监控和持续优化也...
综上所述,Oracle WebLogic Server 11g 的诊断与故障排除不仅涉及基本的日志分析和性能监控,还包括更深层次的性能调优、自定义诊断脚本编写以及安全性和合规性的考虑。掌握这些技能对于有效管理和维护WebLogic ...
**总结**:优化数据库链接资源需要综合考虑应用程序的需求和数据库的实际负载,通过合理的参数设置和工具使用来提高性能。 ##### 4.6 如果页面没有执行到关闭连接的地方,页面被关闭,如何去释放这个建立的连接? ...
【WebLogic开发优化宝典】 在开发和部署基于J2EE的应用时,...只有全面考虑各个层面,才能确保WebLogic应用系统的高效运行。在实际工作中,应尽早进行性能评估和调优,避免在生产环境中出现性能问题后再匆忙应对。
在你的项目中,你正在使用BEA JMS C API来处理持续的消息。...希望这些信息能帮助你解决应用程序在接收到Ctrl+C时的异常退出问题。如果需要进一步的帮助,例如代码审查或调试建议,请提供更完整的代码示例。
此外,异常处理也应谨慎,因为抛出异常不仅会创建新对象,还会触发堆栈跟踪填充,影响性能。使用接口而不是具体类也可以减少类实例化。 JDBC代码调优关注数据库连接管理。应严格控制资源使用,及时关闭连接和...
通过以上章节的介绍可以看出,在BEA WebLogic平台下进行J2EE调优需要从多个层面出发,综合考虑代码、服务器、数据库以及操作系统等多个因素。只有全面细致地进行调优工作,才能最大限度地提升系统的整体性能。
### JSP连接数据库详解 ...JSP与数据库的连接是构建动态、交互式网站的关键技术之一。下面,我们将基于提供的文件信息,深入探讨JSP连接数据库的技术...开发者在实践中应充分考虑这些因素,以构建健壮、高效的应用系统。
出于性能考虑,如果需要频繁修改字符串,应使用可变的`StringBuffer`或`StringBuilder`。 2. **应用服务器与Web服务器的区别**:应用服务器如WebLogic、Tomcat和Jboss提供更高级的服务,支持EJB、JMS等企业级功能,...
为了解决这个问题,可以考虑使用synchronized关键字来限制对`savebuy()`的并发访问,或者使用数据库连接池来管理数据库连接,确保在多线程环境下的正确性。 总的来说,JSP和Servlet编程时需要注意线程安全、资源...
4. ** WebLogic JDBC Driver**: 对于使用WebLogic服务器的应用程序,Oracle提供了特定的JDBC驱动,它可以更好地集成到WebLogic环境中,优化性能和稳定性。 在实际使用Oracle 11.1.0.7.0 JDBC驱动时,开发者需要根据...
在try块中放置可能抛出异常的代码,在catch块中捕获并处理特定类型的异常,finally块则包含无论如何都需要执行的代码,如关闭资源。Java还有自定义异常的能力,允许开发者定义自己的异常类,以更精确地描述和处理...
- 考虑使用`try-with-resources`语句来自动关闭资源,减少代码量和提高代码质量。 - 例如,在`close`方法中可以使用`try-with-resources`来代替手动关闭每个资源。 3. **代码封装性**: - 将获取数据源的方法...
但EJB必须被布署在诸如Webspere、WebLogic这样的容器中,EJB客户从不直接访问真正的EJB组件,而是通过其容器访问。EJB容器是EJB组件的代理, EJB组件由容器所创建和管理。客户通过容器来访问真正的EJB组件。 24、...
- **安全性问题:** - 对于敏感文件的存储和访问,需确保足够的安全措施,如权限控制、加密等。 - **异常处理:** - 在实际开发中应添加异常处理逻辑,确保程序的健壮性。 以上是在Oracle中利用BLOB对象实现文件...