部署、重新启动、停止应用程序
部署应用:只能通过浏览器去部署新的应用,没有找到这里可以直接进行部署的地方。
重新启动:假如我们通过浏览器或其它控制端部署了一个Web Application上去了。
这时,通过插件停止WebLogic,再启动它后,双击展现Web Appplication Modules,可以在下面看我们部署上去的应用了。不过,而慢进行停止再启动。
可以直接通过插件提供的刷新功能就会把部署上去的模块展现出来,如下:

这时,要重新启动应用程序的话,只要在应用名称上面右键,在弹出的菜单中选择Redeploy即可重新部署应用了,速度很快的。

删除应用程序的话,只要在应用名称上面右键,在弹出的菜单中选择Undeploy即可删除应用了,模块名称立马消失,速度很快的,要重新部署又得通过浏览器或其它控制端来完成了。

总结
此插件的功能给予我们方便地集成Eclipse与WebLogic的开发使用,提高了效率。
Bug一个,大家要注意。
关闭Eclipse之后重新启动Eclipse后,这时要启动WebLogic会发现以下错误而启动不了,郁闷了吧:)
<Critical> <Security> <BEA-090402> <Authentication denied: Boot identity not valid; The user name and/or password from the boot identity file (boot.properties) is not valid. The boot identity may have been changed since the boot identity file was created. Please edit and update the boot identity file with the proper values of username and password. The first time the updated boot identity file is used to start the server, these new values are encrypted.>
***************************************************************************
The WebLogic Server did not start up properly.
Reason: weblogic.security.SecurityInitializationException: Authentication denied: Boot identity not valid; The user name and/or password from the boot identity file (boot.properties) is not valid. The boot identity may have been changed since the boot identity file was created. Please edit and update the boot identity file with the proper values of username and password. The first time the updated boot identity file is used to start the server, these new values are encrypted.
*************************************************************************** 不过解决的办法也简单,看到下图的信息了吧,这个插件在对用户进行存取的时候出了问题,导致错误的,你每次重新启动Eclipse后,要修改一下WebLogic的配置文件,把里面的用户名用密码再保存后才行的。
 后记 文章写完后,我又修复了上述的BUG,这里重点再阐述一下解决过程:解压、反编译、替换加密方法、编译、重打包、关闭Eclipse、覆盖、重启:)
1、WebLogic Plugin 2.0.0的配置文件保存在 %ECLIPSE_HOME%\workspace\.metadata\.plugins\com.bea.weblogic.eclipse\目录下 dialog_settings.xml是保存配置对话框的大小之类的文件 servers.xml是保存服务器配置信息的文件
解压出weblogic-eclipse.jar里的所有文件
反编译com\bea\weblogic\eclipse\utils\XMLUtil.class得到XMLUtil.java 在里面增加两个函数
/**
* 将 source 进行 BASE64 编码
*
* @param source
* @return
*/
public static String buildBASE64(String source)
{
if(source == null)
{
return null;
}
return (new sun.misc.BASE64Encoder()).encode(source.getBytes());
}
/**
* 将 BASE64 编码的字符串 base65code 进行解码
*
* @param base65code
* @return
*/
public static String getFromBASE64(String base65code)
{
if(base65code == null)
{
return null;
}
BASE64Decoder base64decoder = new BASE64Decoder();
try
{
byte[] b = base64decoder.decodeBuffer(base65code);
return new String(b);
}
catch(Exception e)
{
e.printStackTrace();
return null;
}
}
在public IServerInstall[] loadServers(File serversFile)函数里修改
cServerInstall.setUsername(CryptoUtil.getDefault().decrypt(new String
(Base64Util.base64ToByteArray(getNodeValue(cElement))),id));
为
cServerInstall.setUsername(getFromBASE64(getNodeValue(cElement)));
修改
cServerInstall.setPassword(CryptoUtil.getDefault().decrypt(new String
(Base64Util.base64ToByteArray(getNodeValue(cElement))),id));
为
cServerInstall.setPassword(getFromBASE64(getNodeValue(cElement)));
在public void saveServers(IServerInstall servers[],File serversFile)函数里修改
org.w3c.dom.Text usernameText = doc.createTextNode(Base64Util.byteArrayToBase64
(CryptoUtil.getDefault().encrypt(cServer.getUsername(),cServer.getId()).getBytes()));
为
org.w3c.dom.Text usernameText = doc.createTextNode(buildBASE64(cServer.getUsername()));
修改
org.w3c.dom.Text passwordText = doc.createTextNode(Base64Util.byteArrayToBase64
(CryptoUtil.getDefault().encrypt(cServer.getPassword(),cServer.getId()).getBytes()));
为
org.w3c.dom.Text passwordText = doc.createTextNode(buildBASE64(cServer.getPassword()));
编译这个XMLUtil.java得到XMLUtil.class,把XMLUtil.class打回weblogic-eclipse.jar包里
关闭Eclipse
把 weblogic-eclipse.jar 覆盖掉原来插件目录里的文件
重新启动Eclipse
Enjoy...
|