您现在的位置: 无忧电子商务网 >> 信息学院 >> 程序开发 >> js >> 正文

新兴开放源码J2EE应用平台

作者:作者:未…    信息学院来源:网络收集    点击数:    更新时间:2006-8-27 我要参与讨论

  新兴开放源码J2EE应用平台注:这是两年前写的了,现在jbuilder已经用2005了,JBoss也用4。x了,mysql也用5.0了,新的功能所能实现的功能毫无疑问不止这些,有时间再补上!一.平台架构描述本平台由三部分组成,开发环境、应用服务器环境和数据存储环境;1. J2EE开发环境JBuilder 7 企业版配合JBoss 3.0.0,开发环境配置如下:a) 配置数据库连接驱动,我们使用MySql, 因此需要配置mysql_odbc或mysql_jdbc,其中如果使用jdbc的话,需要建立新的库,此库包含了mysql_jdbc驱动,并把该库加入到项目库中;b) 配置JBoss的JBuider 7插件(配合插图): i. 首先把插件打包文件拷贝到JBuider 7/lib/ext目录中; ii. 启动JBuilder, 在工具菜单中选择配置服务器; iii. 从服务器列表中选择JBoss 3x; iv. 然后选中“启用服务器”复选框; v. 选择JBoss的安装目录,此时切换到“定制页”; vi. 选择JBoss的起始目录和工作目录,最后确认提交; vii. 并重启JBuilder,在项目属性里配置自己需要的服务器:其中,运行时服务器为Tomcat 4.0,项目服务器为不同模块服务对应不同的服务器;2. J2EE应用服务器应用服务器有三个模块组成:JBoss 3.0.0, Tomcat 4.0.3, Apache 2.0.4;c) JBoss主要提供EJB等企业级组件和其他相关服务,其配置如下: i. 首先,要配置java 1.4.1平台,即设置Java_home和classpath; ii. 其次,解压JBoss(内嵌Tomcat 4)到特定文件夹;d) 配置阿帕奇到tomcat的连接: i. 修改apache的配置文件httpd.confListen *:80(在所有地址上监听80端口)ServerName ApacheDirectoryIndex index.html index.html.var index.html.en index.jsp(添加自己需要的目录起始文件名)DefaultType application/octet-stream(使服务器可以处多种类型的文档)AddDefaultCharset GB2312(自己需要的响应缺省字符集) ServerName Apache DirectoryIndex index.php index.html index.htm index.shtml index.html.en index.jsp(目录起始文件名) ErrorLog logs/dummy-host.example.com-error_log CustomLog logs/dummy-host.example.com-access_log common(虚拟主机)Include D:/Apache2/Apache2/conf/JK//mod_jk.conf(包含mod_jk的配置文件) ii.mod_jk.conf的内容如下实例 LoadModule jk_module D:/Apache2/Apache2/conf/JK//mod_jk.dll JkLogLevel info JkOptions +ForwardKeySize +ForwardURICompatJkWorkersFile D:/Apache2/Apache2/conf/JK/workers.propertiesJkLogFile D:/Apache2/Apache2/conf/JK//mod_jk.log JkMount /*.jsp ajp13JkMount /servlet/* ajp13 Alias /test "E:/Room/testonline2.5/defaultroot" Options Indexes FollowSymLinks MultiViews IncludesNoExec AddOutputFilter Includes html AllowOverride None Order allow,deny Allow from all JkMount /test/servlet/* ajp13JkMount /test/*.jsp ajp13 AllowOverride None deny from all Alias /account "E:/Room/wsopt/account" Options Indexes FollowSymLinks MultiViews IncludesNoExec AddOutputFilter Includes html AllowOverride None Order allow,deny Allow from all JkMount /account/* ajp13JkMount /account/*.jsp ajp13 AllowOverride None deny from all iii.ajp13工作的配置文件workers.properties描述如下:workers.tomcat.home=%tomcat_home%workers.java.home=%java_home%ps=\worker.list=ajp13worker.ajp13.port=8009worker.ajp13.host=localhostworker.ajp13.type=ajp13worker.ajp13.1bfactor=1参考:# workers.properties -## This file provides jk derived plugins with the needed information to# connect to the different tomcat workers. Note that the distributed# version of this file requires modification before it is usable by a# plugin.## As a general note, the characters $( and ) are used internally to define# macros. Do not use them in your own configuration!!!## Whenever you see a set of lines such as:# x=value# y=$(x) omething## the final value for y will be value omething## Normaly all you will need to do is un-comment and modify the first three# properties, i.e. workers.tomcat_home, workers.java_home and ps.# Most of the configuration is derived from these.## When you are done updating workers.tomcat_home, workers.java_home and ps# you should have 3 workers configured:## - An ajp12 worker that connects to localhost:8007# - An ajp13 worker that connects to localhost:8009# - A jni inprocess worker.# - A load balancer worker## However by default the plugins will only use the ajp12 worker. To have# the plugins use other workers you should modify the worker.list property.## # OPTIONS ( very important for jni mode ) ## workers.tomcat_home should point to the location where you# installed tomcat. This is where you have your conf, webapps and lib# directories.#workers.tomcat_home=C:/Apache Tomcat 4.0 ## workers.java_home should point to your Java installation. Normally# you should have a bin and lib directories beneath it.#workers.java_home=c:/j2se ## You should configure your environment slash... ps=\ on NT and / on UNIX# and maybe something different elsewhere.#ps=\ ##------ ADVANCED MODE ------------------------------------------------#---------------------------------------------------------------------# ##------ DEFAULT worket list ------------------------------------------#---------------------------------------------------------------------### The workers that your plugins should create and work with## Add 'inprocess' if you want JNI connector worker.list=ajp13,ajp12# , inprocess ##------ DEFAULT ajp12 WORKER DEFINITION ------------------------------#---------------------------------------------------------------------# ## Defining a worker named ajp12 and of type ajp12# Note that the name and the type do not have to match.#worker.ajp12.port=8007worker.ajp12.host=localhostworker.ajp12.type=ajp12## Specifies the load balance factor when used with# a load balancing worker.# Note:# ----> lbfactor must be > 0# ----> Low lbfactor means less work done by the worker.worker.ajp12.lbfactor=1 ##------ DEFAULT ajp13 WORKER DEFINITION ------------------------------#---------------------------------------------------------------------# ## Defining a worker named ajp13 and of type ajp13# Note that the name and the type do not have to match.#worker.ajp13.port=8009worker.ajp13.host=localhostworker.ajp13.type=ajp13## Specifies the load balance factor when used with# a load balancing worker.# Note:# ----> lbfactor must be > 0# ----> Low lbfactor means less work done by the worker.worker.ajp13.lbfactor=1 ## Specify the size of the open connection cache.#worker.ajp13.cachesize ##------ DEFAULT LOAD BALANCER WORKER DEFINITION ----------------------#---------------------------------------------------------------------# ## The loadbalancer (type lb) workers perform wighted round-robin# load balancing with sticky sessions.# Note:# ---->

[1] [2] [3] [4] 下一页

在google里搜索更多新兴开放源码J2EE应用平台

Google
Web www.51ec.org
  • 上一篇信息学院:

  • 下一篇信息学院:
  • 【字体: 】【发表评论】【加入收藏】【告诉好友】【打印此文】【关闭窗口
    我来说两句 对此文章发表了评论
      昵 称: *必填    ·注册用户·
      评 分: 1分 2分 3分 4分 5分     严禁发表危害国家安全、政治、黄色淫秽等内容的评论,用户需对自己在使用本网站服务过程中的行为承担法律责任。本站管理员有权保留或删除评论内容,评论内容只代表机友个人观点,与本网站立场无关。  
    评 论
    内 容

     
    评论列表 (最新 评论仅限网友观点!)

    推荐文章
  • 此栏目下没有推荐信息学院
  • 供求信息




    | 设为首页 | 加入收藏 | 关于我们 | 广告服务 | 联系方式 | 友情链接 | 版权申明