我正试图在Java 中超时HttpSession.我的容器是WebLogic.
目前,我们在web.xml文件中设置了会话超时,就像这样
<session-config>
<session-timeout>15</session-timeout>
</session-config>
Run Code Online (Sandbox Code Playgroud)
现在,我被告知这将在使用的第15分钟终止会话(或者是所有会话?),无论他们的活动如何.
我想知道这种方法是否正确,或者我应该以编程方式设置不活动的时间限制
session.setMaxInactiveInterval(15 * 60); //15 minutes
Run Code Online (Sandbox Code Playgroud)
我不想在15分钟内放弃所有会话,只有那些在15分钟内处于非活动状态的会话.
这些方法是否相同?我应该支持web.xml配置吗?
我是JBoss(和Tomcat)的Java开发人员.在过去的一年里,我不得不开发WebLogic,我不得不说 - 我真的很想念JBoss.
由于我对WebLogic的经验非常浅薄,我问的是那些经验丰富的人:是否有理由在WebLogic上花钱?JBoss不是为您提供所需的一切吗?
当我尝试在eclipse中构建我的项目时,我收到一条错误消息:
The type weblogic.utils.expressions.ExpressionMap cannot be resolved. It is indirectly referenced
from required .class files
我在网上寻找解决方案但找不到一个(除了那些让你付钱的网站).任何人都知道如何找到解决这个问题的方法?任何帮助表示赞赏,谢谢!
目前我们正在使用4个带有8GB RAM的cpu windows box,并在同一个盒子上安装了MySQL 5.x. 我们在我们的应用程序中使用Weblogic应用程序服务器.我们针对我们的应用程序定位了200个并发用户(显然不是针对相同的模块/屏幕).那么我们应该在连接池中配置什么是最佳连接数(最小和最大数量)(我们使用的是weblogic AS'连接池机制)?

它显示 -
This installer must be executed using a Java Development Kit (JDK)
but C:\Program Files\Java\jre7 is not a valid JDK.
Run Code Online (Sandbox Code Playgroud)
- 安装weblogic服务器时.
我安装了64位JDK 1.7版.请告诉我哪里弄错了?
我面临以下异常:
weblogic.transaction.internal.TimedOutException:事务在300秒后超时
这是在无状态会话EJB Bean中设置为javax.transaction.UserTransaction jtaTransaction.setTransactionTimeout(300)但我无法弄清楚,在应用程序控制台中设置此属性的位置.
我正在通过BEA Weblogic Server v9.2运行时环境在Eclipse中启动Weblogic应用程序.如果这是直接从命令行运行,我会执行ctrl-BREAK来强制进行线程转储.有没有办法在Eclipse中做到这一点?
我试图在不使用JMX选项或web.xml选项的情况下禁用WADL.简单的JAX-RS应用程序类如下:
@ApplicationPath("resources")
public class TestWADL
extends Application
{
public Map<String, Object> getProperties()
{
Map<String, Object> props = new HashMap();
props.put("jersey.config.server.wadl.disableWadl", true);
return props;
}
}
Run Code Online (Sandbox Code Playgroud)
在WebLogic 12.2.1上,当属性设置为"true"时,它不会被部署.如果"jersey.config.server.wadl.disableWadl"更改为"com.jersey.config.server.wadl.disableWadl",则会部署但WADL仍处于活动状态.尝试使用"com.sun.jersey.config.server.wadl.disableWadl",但部署发生但WADL处于活动状态.
部署期间出错:
failed to preload on startup in Web application: "jersey-test".
A MultiException has 1 exceptions. They are:
1. org.glassfish.hk2.api.UnsatisfiedDependencyException: There was no object available for injection at SystemInjecteeImpl(requiredType=WadlApplicationContext,parent=JaxRsMonitoringListener,qualifiers={},position=-1,optional=false,self=false,unqualified=null,1563651367)
at org.jvnet.hk2.internal.ThreeThirtyResolver.resolve(ThreeThirtyResolver.java:75)
at org.jvnet.hk2.internal.Utilities.justInject(Utilities.java:946)
at org.jvnet.hk2.internal.ServiceLocatorImpl.inject(ServiceLocatorImpl.java:981)
at org.jvnet.hk2.internal.ServiceLocatorImpl.inject(ServiceLocatorImpl.java:971)
at org.glassfish.jersey.server.ApplicationHandler.initialize(ApplicationHandler.java:617)
at org.glassfish.jersey.server.ApplicationHandler.access$500(ApplicationHandler.java:184)
at org.glassfish.jersey.server.ApplicationHandler$3.call(ApplicationHandler.java:350)
at org.glassfish.jersey.server.ApplicationHandler$3.call(ApplicationHandler.java:347)
at org.glassfish.jersey.internal.Errors.process(Errors.java:315)
at org.glassfish.jersey.internal.Errors.process(Errors.java:297)
at org.glassfish.jersey.internal.Errors.processWithException(Errors.java:255)
at org.glassfish.jersey.server.ApplicationHandler.<init>(ApplicationHandler.java:347)
at …Run Code Online (Sandbox Code Playgroud) 我们使用的Weblogic服务器已配置为允许JNDI数据源名称,如"appds".
对于开发(localhost),我们可能正在运行Tomcat,并且当在server.xml的<context>部分中声明时,Tomcat将在JNDI树中的"java:comp/env/jdbc/*"上挂起JNDI数据源.
问题:在Weblogic中,JNDI查找是"appds",而在Tomcat中,似乎我必须提供正式的"java:comp/env/jdbc/appds".我担心Tomcat版本是一个隐含的标准,但不幸的是,我不能改变Weblogic的配置...所以这意味着我们最终得到两个不同的spring配置文件(我们使用的是spring 2.5)来促进不同的环境.
有没有一种优雅的方式来解决这个问题.我可以直接在Tomcat中查看JNDI名称吗?Spring可以在两个地方都有名字和外观吗?谷歌搜索或建议会很棒.