weblogic的几个基础问题

时间:2024.4.5

weblogic的几个基础问题

1、  如何给weblogic指定大小的内存?  在启动Weblogic的脚本中(位于所在Domian对应服务器目录下的startServerName),增加set MEM_ARGS=-Xms32m -Xmx200m,可以调整最小内存为32M,最大200M

  2、  如何设定的weblogic的热启动模式(开发模式)与产品发布模式?可以在管理控制台中修改对应服务器的启动模式为开发或产品模式之一。或者修改服务的启动文件或者commenv文件,增加set PRODUCTION_MODE=true。

  3、  如何启动时不需输入用户名与密码?

  修改服务启动文件,增加 WLS_USER和WLS_PW项。也可以在boot.properties文件中增加加密过的用户名和密码.

  4、  在weblogic管理制台中对一个应用域(或者说是一个网站,Domain)进行jms及ejb或

  连接池等相关信息进行配置后,实际保存在什么文件中?

  保存在此Domain的config.xml文件中,它是服务器的核心配置文件。

  5、  说说weblogic中一个Domain的缺省目录结构?比如要将一个简单的helloWorld.jsp

  放入何目录下,然的在浏览器上就可打入http://主机:端口号//helloword.jsp就可以看到运行结果了? 又比如这其中用到了一个自己写的javaBean该如何办?Domain目录“服务器目录“applications,将应用目录放在此目录下将可以作为应用访问,如果是Web应用,应用目录需要满足Web应用目录要求,jsp文件可以直接放在应用目录中,Javabean需要放在应用目录的WEB-INF目录的classes目录中,设置服务器的缺省应用将可以实现在浏览器上无需输入应用名。

  6、  如何查看在weblogic中已经发布的EJB?

  可以使用管理控制台,在它的Deployment中可以查看所有已发布的EJB

  7、  如何在weblogic中进行ssl配置与客户端的认证配置或说说j2ee(标准)进行ssl的配置缺省安装中使用DemoIdentity.jks和DemoTrust.jks  KeyStore实现SSL,需要配置服务

器使用Enable SSL,配置其端口,在产品模式下需要从CA获取私有密钥和数字证书,创建identity和trust keystore,装载获得的密钥和数字证书。可以配置此SSL连接是单向还是双向的。

  8、在weblogic中发布ejb需涉及到哪些配置文件

  不同类型的EJB涉及的配置文件不同,都涉及到的配置文件包括ejb-jar.xml,weblogic-ejb-jar.xmlCMP实体Bean一般还需要weblogic-cmp-rdbms-jar.xml

  9、EJB需直接实现它的业务接口或Home接口吗,请简述理由.远程接口和Home接口不需要直接实现,他们的实现代码是由服务器产生的,程序运行中对应实现类会作为对应接口类型的实例被使用。

  10、说说在weblogic中开发消息Bean时的persistent与non-persisten的差别persistent方式的MDB可以保证消息传递的可靠性,也就是如果EJB容器出现问题而JMS服务器依然会将消息在此MDB可用的时候发送过来,而non-persistent方式的消息将被丢弃。

  11、说说你所熟悉或听说过的j2ee中的几种常用模式?及对设计模式的一些看法

  Session Facade Pattern:使用SessionBean访问EntityBeanMessage Facade Pattern:实现异步调用EJB Command Pattern:使用Command JavaBeans取代SessionBean,实现轻量级访问Data Transfer Object Factory:通过DTO Factory简化EntityBean数据提供特性Generic Attribute Access:通过AttibuteAccess接口简化EntityBean数据提供特性Business Interface:通过远程(本地)接口和Bean类实现相同接口规范业务逻辑一致性EJB架构的设计好坏将直接影响系统的性能、可扩展性、可维护性、组件可重用性及开发效率。项目越复杂,项目队伍越庞大则越能体现良好设计的重要性.

【totti】一道weblogic认证考题所想到的

相比其他认证,参加过BEA的weblogic认证相对较少,如果你是其中一位,对于这道题应该有印象吧。



You are administering a WebLogic domain that consists of an Adminsistration server and a cluster that consists
of two Managed Servers, named serverA and serverB, Respectively. These servers are distribluted between two
machines, machineA and machineB. The Administration server and serverA are on machineA and serverB is on
machineB.
Local and remote clients are complaining about sluggish performance.
Clients seem to be unable to acquire connections to the servers. As you begin to research the problem, you find
that there are no error messages in the logs and the servers are not CPU-bound. Which of the following is
probably the problem?
A.The servers do not have enough RAM.
B.The servers need larger Execute Queues.
C.The servers' AcceptBacklog parameter is set too low.
D.The system should be using a hardware SSL accelerator.
E.The connection to the database server is overwhelmed.


大概的意思就是你是weblogic的系统管理员,你的用户向你抱怨系统性能很差,你要去解决这个问题。但是发现日志系统无报错,并且系统不存在CPU的瓶颈,可能的原因是啥?

正确的答案是C,很多人一冲动就选了A,并且很容易这样的冲动。其实这是一种盲目的条件反射,如果性能一旦出现状况,很多人第一反应就是去增加虚拟机的内 存,即增大-Xmx参数。从-Xmx512m增加到-Xmx1024m,再到-Xmx2048m,性能问题依然存在。这个时候,可能就束手无策啦。

AcceptBacklog属性是用来设定请求WebLogic实例的连接数,在拒绝额外的请求之前,能接受设定的缓存数。 AcceptBacklog属性指定有多少TCP连接缓存在等待队列,规定服务器向操作系统请求的队列大小,这个固定的队列存放了TCP堆栈已经收到但应 用程序还没有收到的连接请求。默认值是50,最大值由操作系统决定。

根据需要修改默认的接受缓存数(Accept Backlog):
1        在运行期间,如果许多客户端连接得不到响应或被拒绝,并且服务器端也没有错误消息,说明接受缓存的值可能太小。
2        在你访问WebLogic时,如果收到"拒绝连接(connection refused)"的提示,则应该增加接受缓存的默认值的25%。继续增加其值的25%,直到停止出现这样的提示。
对于Portal类型的应用,默认值往往是不够的。Login Timeout和SSL Login Timeout参数表示普通连接和SSL连接的超时时间,如果客户连接被服务器中断或者SSL容量大,可以尝试增加该值。

下面想说下Accept Backlog和Queue Length的联系

- AcceptBacklog = number of waiting TCP connections,

- Queue Length = number of requests waiting in a WLS queue.

Use the AcceptBacklog attribute of the Server element in the config.xml file to set the number of connection requests the WebLogic Server instance will accept before refusing additional requests. The AcceptBacklog attribute specifies how many Transmission Control Protocol (TCP) connections can be buffered in a wait queue. This fixed-size queue is populated with requests for connections that the TCP stack has received, but the application has not accepted yet. The default value is 50 and the maximum value is operating system dependent.
我的理解是:也就是说Queue Length是建立在AcceptBacklog之上的,只要AcceptBacklog设置为0,就不会接受任何请求。如果Threads已经达到最高值也会影响AcceptBacklog接受其他的请求。
总结一下就是:
Queue Length 是服务器级的
AcceptBacklog是操作系统上的


第二篇:Weblogic使用问题


Weblogic使用问题

1       weblogic破解

1.1   问题

weblogic启动的时候报错:

<Server failed. Reason:   

Unable to start WebLogic Server!

Error: license signature validation error.

Please make sure you have a valid license.bea file in the BEA home directory associated with this installation. For more information about the license.bea file, see the installation guide for the version of the

software you are using at http://e-docs.bea.com.

1.2   解决方法

1、    把破解文件 weblogic_crack.jar 加到 D:\bea 路径下。

2、    找到对应的文件:D:\bea\user_projects\domains\test_domain\bin\startWebLogic.cmd

3、    找到第117行 "set CLASSPATH=%CLASSPATH%;%MEDREC_WEBLOGIC_CLASSPATH%" 修改为:set CLASSPATH=D:\bea\weblogic_crack.jar;%CLASSPATH%;%MEDREC_WEBLOGIC_CLASSPATH%

4、    重启,OK。

2       weblogic增加debug支持

1、    找到文件:D:\bea\user_projects\domains\test_domain\bin\setDomainEnv.cmd

2、    在67行的位置"set LONG_DOMAIN_HOME=D:\bea\user_projects\domains\test_domain"与"if "%DEBUG_PORT%"=="" ("之间加入下面这句:set debugFlag=true,然后再在这句下面的"if "%DEBUG_PORT%"=="" ( set DEBUG_PORT=7005)"那里可以修改监听端口,通常我们修改为7005;

3、    接下来是在Eclipse中点击标题栏的Debug按钮下Debug选项,打开Debug设置窗口,选择远程调试(Remote Java Application)-->Connect选项卡-->Project选上要调试的项目;Connection Properties:Host为localhost,Port为7005;

3       修改weblogic的默认端口

1、    找到文件 D:\bea\user_projects\domains\test_domain\config\config.xml

2、    打开后对照如下代码

<server>

    <name>AdminServer</name>

    <log>

        <file-min-size>5000</file-min-size>

    </log>

    <listen-port>8001</listen-port> //写上想要的端口号,默认的是没有这一行,要改端口就加上这一行

    <listen-address></listen-address>

</server>

这样以来,你就可以用http://ip:8001/console来访问了

更多相关推荐:
中学生演讲稿范文Collegelife

中学生演讲稿范文Collegelifegoodeveningeveronemynameisxxthiseveningiwanttotalksomethingaboutcollegelifeitincludefo...

My college life演讲稿

MycollegelifeGoodafternooneveryoneMynameisXujiguangAtfirstIgotverynervouswhenIhavetogivemyopinionandmakea...

英语演讲稿college life

GoodmorningImgoingtoshareyouwithmycollegelifeWhenIgraduatedfromhighschoolImadeupmymindthatIwouldworkhardjustlikewha...

How To Adapt College Life演讲稿

HowToAdaptCollegeLifeNowtodaymytopicishowtoadaptcollegelifeHighschoollifeandcollegelifearedifferentfromea...

大学英语演讲稿---my_college,my_life

英语口语演讲MycollegemmylifeBymikeyCollegelifeiscolorfulbutalsoneedustograspanddeepexperienceSomeonesaidquotord...

My campus life演讲稿

MycampuslifeGoodafternoonladiesandgentlemenmynameisJiYuqingtodaymytopicismycampuslifeWhenIwasdeyongmyfatheralwaysto...

school life 校园生活演讲稿

MyschoollifeGoodmorningEveryonemynameisWuqingqingitsmygreathonortostandheretomakeaspeechtodaymytopicisaboutmyschool...

Employ yourself,Enlighten your life演讲稿

EmployyourselfEnlightenyourlifeGoodeveningladiesandgentlemenSeveraldaysagoIwatchedashortvideowhichillustrateshowMaY...

Life is a choice演讲稿

DearmyclassmatesLifeisachoiceGoodafternoonMynameisjellyIamBeijingexperimentalschoolattendtoCapitalNormalSchoolIamve...

Unit 1 How is your college life

Unit1HowisyourcollegelifePart1SpeakingTeachersselfintroductionnamemajorteachingexperienceandhopeandwishesfornewstud...

石油大学英语演讲比赛复赛 my ideal college life

MyidealcollegelifeGoodeveningladiesandgentlemenItismygreathonortostandheretogiveaspeechtoallofyouFirstpleaseallowme...

How to Live a Colorful Life如何丰富人生英语演讲稿

HowtoLiveaColorfulLife如何丰富人生英语演讲稿ladiesandgentlemeni39msogladyou39reherei39llbetalkingaboutlifetodaylifeg...

college life演讲稿(21篇)