分享
 
 
 

Eclipse IDE for J2EE 1.3 Development

王朝java/jsp·作者佚名  2006-01-09
窄屏简体版  字體: |||超大  

Eclipse IDE for J2EE 1.3 Development

(Tomcat 4.x, JBoss 3.x, MySQL 3.x)

by Hao Wu

Last modified: 04/18/2002

Purpose

This article covers setting up the following Open Source tools for J2EE 1.3 development.

- Tomcat 4.x for Servlet 2.3 and JSP 1.2

- JBoss 3.x for EJB 2.0, JMS 1.1, JCA 1.0, and JAXP 1.1

- MySQL 3.x for RDBMS Persistence

- Eclipse for Java IDE

* These instructions assume Windows platform. Linux needs slightly different URLs & similar steps.

* Following the order herein is recommended.

Coming Soon...

This documentation will get diligent update, catching up with latest builds of the tools. So please come back for updates.

- ANT integration with Eclipse.

- Code examples.

- XDoclet integration into Eclipse for EJB development.

Revision History

- 4/18, added "Upgrade" entry for each section.

JBoss 3.0.0, Release Candidate 1. Eclipse Milestone 5 (build 20020416).

Sysdeo version 0.96 and Genuitec version 1.0EA4 (for Eclipse M5).

- 4/02, (minor) Tomcat, version 4.0.4 beta 2. Sysdeo plugin, version 095.

- 3/23, (minor) Eclipse, updated with build 20020321.

- 3/20, JBoss 3.0.0, added Beta2 self-build notes

- 3/15, (minor) Eclipse, build 20020214 notes for working with EJB.

- 3/15, MySQL added, and its integration with JBoss.

- 3/13, (minor) JBoss, disabling clustering.

- 3/11, J2EE 1.3 with Eclipse (JBoss added).

- 2/20, JSP/Servlet with Eclipse and Tomcat.

Quick Reference

Software

(Click for details)

Current Version

Vendor

J2EE

Installation

JDK

1.4.0

Sun

J2SE 1.4

Install

Tomcat

(Open Source)

4.0.4 Beta 2

Apache

J2EE 1.3

(Servlet 2.3, JSP 1.2, etc.)

Unzip

JBoss

(Oepn Source)

3.0.0 Release Candidate 1

JBoss Group

J2EE 1.3

(EJB 2.0, JMS 1.1, JCA 1.0, JAXP 1.1, etc.)

Unzip

or

Build

MySQL

(Open Source)

3.23.49

MySQL AB

RDBMS

Install

Eclipse

(Open Source)

2.0, pre-release build 20020321

Eclipse

Java IDE

Unzip

Eclipse Tomcat Plugin

0.96

Sysdeo

(France)

IDE Plugin

Unzip

Eclipse JBoss Plugin

1.0EA4

Genuitec

IDE Plugin

Unzip

Installing JDK

Version

1.4.0

Download

Get binary j2sdk-1_4_0-win.exe at http://java.sun.com/j2se/1.4/download.html

* Be sure to download the SDK, not just the JRE.

Documentation

- Online - http://java.sun.com/j2se/1.4/docs/index.html

- Downloadable - http://java.sun.com/j2se/1.4/download.html

Install

Run the executable which will install the following:

Java 2 SDK, SE v1.4.0

Java 2 Runtime Environment, SE v1.4.0

Java Plug-in 1.4.0

Java Web Start (1.0.1)

Environment

Set variable JAVA_HOME to <install dir> (e.g. C:\jdk1.4).

Make sure <install dir>\bin is in your PATH (e.g. C:\jdk1.4\bin).

Test

Open a DOS windows, try java -version and you should get:

java version "1.4.0"

Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-b92)

Java HotSpot(TM) Client VM (build 1.4.0-b92, mixed mode)

Installing Tomcat

Version

4.0.4 Beta 2

Download

Get zip binary at http://jakarta.apache.org/builds/jakarta-tomcat-4.0/release/v4.0.4-b2/bin/jakarta-tomcat-4.0.4-b2-01.zip(General download at http://jakarta.apache.org/builds/jakarta-tomcat-4.0/release .)

* Also available is an Install version, which can run as Windows service. Not recommeded for development.

Documentation

- Online - http://jakarta.apache.org/tomcat/tomcat-4.0-doc/index.html

- Local - (after installation) at %TOMCAT_HOME%\webapps\tomcat-docs\index.html

(Also accessible at http://localhost:8080/tomcat-docs/index.html, if Tomcat is started on port 8080)

Upgrade from Previous Version

- Rename your previous installation (say C:\jakarta-tomcat-4.0.2 to C:\jakarta-tomcat-4.0.2_old). And remove it after you get the new version up for a while.

- After the installation, copy the old server.xml (or preferrably, just the context you added) to the new.

- After the installation, go over other Tomcat related sections and check for applicable changes.

Install

Unzip to destination (say C:\, which makes <install dir> to be C:\jakarta-tomcat-4.0.4-b2-01).

Environment

Set variable TOMCAT_HOME to <install dir> (e.g. C:\jakarta-tomcat-4.0.4-b2-01).

Test

"cd %TOMCAT_HOME%\bin" and "startup" (startup.bat), you should see ---

Starting service Tomcat-Standalone

Apache Tomcat/4.0.4-b2

Starting service Tomcat-Apache

Apache Tomcat/4.0.4-b2

Now that Tomcat is up, access http://localhost:8080 from your browser.

Other

o Installing Sysdeo Eclipse Tomcat Launcher Plugin (refer to the later section)

o Integrating Tomcat with JBoss (refer to the later section)

Installing JBoss

Version

3.0.0 Release Candidate 1 (soon will add a seperate section on building 3.1.0 Alpha by yourself)

Download

Get zip binary from SourceForge at http://prdownloads.sourceforge.net/jboss/jboss-3.0.0RC1.zip

(General download at http://sourceforge.net/project/showfiles.php?group_id=22866.)

* Also available is a Tomcat-integrated version at http://prdownloads.sourceforge.net/jboss/jboss-3.0.0RC1_tomcat-4.0.3.zip. We prefer having seperated Tomcat instead of the integrated version, especially for development, for the following reasons:

Debugging web application is harder - need to do build into .ear instead of using Tomcat server.xml to point to code.

Encountered class loader problem from Tomcat to integrate with JBoss.

Documentation

- Free online manual (somewhat outdated): http://www.jboss.org/online-manual/HTML/index.html

- JBoss documentation site: http://www.jboss.org/doco.jsp.

Upgrade from Previous Version

- Rename your previous installation (say C:\jboss-3.0.0beta2 to C:\jboss-3.0.0beta2_old). And remove it after you get the new version up for a while.

- After the installation, go over other JBoss related sections and check for applicable changes.

Install

Unzip to destination (say C:\, which makes <install dir> to be C:\jboss-3.0.0RC1).

Environment

Set variable JBOSS_DIST to <install dir> (e.g. C:\jboss-3.0.0RC1).

Test

Make sure you don't have TOMCAT running, as it would conflict with JBoss over port 8080. (Integration is covered in a later section.)

"cd %JBOSS_DIST%\bin" and "run" (run.bat), you should see console output and eventually ---

14:44:35,075 INFO [Server] JBoss (MX MicroKernel) [3.0.0RC1 Date:200204150356] Started in 0m:22s:383ms

Check console or logfile (%JBOSS_DIST%\server\default\log\server.log), you should only see "INFO", "WARN" or "DEBUG" outputs.

Try http://localhost:8080, you should see Tomcat document and example - this is served through the embedded Jetty JSP/Servlet container (not Tomcat).

Also, try http://localhost:8082, you should see the JMX management console.

Other

o Disable clustering: If you might ever run JBoss on your machine without a network, you want to do this.

- Create a subfolder %JBOSS_DIST\server\default\deployBackup.

- Move file %JBOSS_DIST%\server\default\deploy\cluster-service.xml away into %JBOSS_DIST%\server\default\deployBackup.

Installing Genuitec Eclipse JBoss Plugin (see below)

Integrating Tomcat with JBoss (see below)

Integrating JBoss with MySQL (see below)

Version

3.1.0 Alpha, self-build (or see a previous section for downloading 3.0.0 RC1)

Coming soon...

Build

Check out JBoss source (Beta2) from Source Forge CVS repository and run build:

1. Set environment variable HOME to where you want to check out to (e.g. C:\Dvlp)

2. "cd %HOME%" (e.g. C:\Dvlp) and checkout module jboss-all from SourceForge (assuming you have a CVS client installed and accessible):

cvs -d:pserver:anonymous@cvs.jboss.sf.net:/cvsroot/jboss login (There is no password, so press Enter when prompted.)

cvs -z3 -d:pserver:anonymous@cvs.jboss.sf.net:/cvsroot/jboss checkout jboss-all

3. Go to subfolder build\ and do "build".

The output would be under build\output\jboss-3.1.0alpha.

Documentation

- Free online manual (somewhat outdated): http://www.jboss.org/online-manual/HTML/index.html

- JBoss documentation site: http://www.jboss.org/doco.jsp.

Install

Copy binary into destination (e.g. from C:\Dvlp\jboss-all\build\output\jboss-3.0.0beta2 into C:\jboss-3.0.0beta2, which makes <install dir> to be C:\jboss-3.0.0beta2).

Environment

Set variable JBOSS_DIST to <install dir> (e.g. C:\jboss-3.0.0beta2).

Test

"cd %JBOSS_DIST%\bin" and "run" (run.bat), you should see console output and eventually ---

23:58:48,330 INFO [Server] JBoss (MX MicroKernel) [3.0.0beta2 Date:200203192131] Started in 0m:31s:996ms

Check console or logfile (%JBOSS_DIST%\server\default\log\server.log), you should only see "INFO" or "WARN" or "DEBUG" outputs.

Also, try http://localhost:8082, you should see the JMX management console.

Other

o Disable clustering: If you might ever run JBoss on your machine without a network, you want to do this.

- Create a subfolder backup under %JBOSS_DIST%\server\default\deploy\.

- Move file %JBOSS_DIST%\server\default\deploy\cluster-service.xml away into %JBOSS_DIST%\server\default\deploy\backup.

Integrating Tomcat with JBoss (see below)

Integrating JBoss with MySQL (see below)

--

Installing MySQL

Version

3.23.49

Download

Get zip binary at http://mirror.sit.wisc.edu/mysql/Downloads/MySQL-3.23/mysql-3.23.49-win.zip

(General download at http://www.mysql.com/downloads/mysql.html.)

* 4.0 is still in Alpha as of 3/14/2002, so 3.23 is recommended for the time being.

Documentation

- Local: (after installation) <install dir>\Docs\manual_toc.html

- Online documentation: http://www.mysql.com/documentation/index.html

Upgrade from Previous Version

Coming soon...

Install

- Unzip to a temp dir (e.g., C:\Temp\mysql_install)

- Run setup.exe to install. (e.g., into C:\mysql3.23)

* The installation does not create Program Folder. Following recommend:

(1) Create a Program Folder "MySQL 3.23"

(2) Create shortcut for:

<install dir>\bin\winmysqladmin.exe

<install dir>\bin\MySqlManager.exe

Environment

Add <install dir> to PATH (e.g. C:\mysql3.23).

Setup (Also to enable InnoDB)

- Run winmysqladmin.exe (under bin subfolder):

1. First time (when my.ini does not exist under Windows directory, e.g. C:\WinNT), you will be prompted for username/password. Enter your choice (e.g. mysqladmin/mysqladmin).

2. Its window will come up and then minimize into System Tray. Bring it up by:

Right click on System Tray icon -> Option "Show me".

3. By default, "mysqld" is used which has only ISAM, which does NOT support transaction. To use "mysqld-max" with InnoDB or BDB enabled (supporting transactions), configure my.ini as following:

Select tab "my.ini Setup" -> Select "mysqld-max" -> In editor for my.ini:

[mysqld]

...

[WinMySQLadmin]

...

Add the following before line "[WinMySQLadmin]", be sure to customize at least the underlined fields:

innodb_data_home_dir = C:\mysql3.23\ibdata

innodb_data_file_path = ibdata1:500M;ibdata2:500M

set-variable = innodb_buffer_pool_size=70M

set-variable = innodb_additional_mem_pool_size=10M

innodb_log_group_home_dir = C:\mysql3.23\iblogs

innodb_log_arch_dir = C:\mysql3.23\iblogs

innodb_log_archive=0

set-variable = innodb_log_files_in_group=3

set-variable = innodb_log_file_size=10M

set-variable = innodb_log_buffer_size=8M

innodb_flush_log_at_trx_commit=1

set-variable = innodb_file_io_threads=4

set-variable = innodb_lock_wait_timeout=50

* The above specifies that two 500MB database files be created at C:\mysql3.23\ibdata, and three 10MB log files created at C:\mysql3.23\iblogs.

Then click "Save Modification" to save the changes into my.ini (under e.g. C:\WinNT).

4. Manually create the folder <ibdata location> and <iblogs location> (in the above example, it's C:\mysql3.23\ibdata and C:\mysql3.23\iblogs).

5. Start the server ("mysql" service):

Right click on the window -> Option "Win NT" -> item "Install the service"

Then Right click again -> Option "Win NT" -> item "Start the service".

It will take a moment to create the database files and log files as configured.

Test

1. Make sure service "Mysql" is started.

2. Try to login.

- Open a Command window, try "mysql -u <username> -p". You'll be prompted for password (use the one you specified in my.ini, e.g. mysqladmin/mysqladmin).

- You are in mysql console. Try SQL "SELECT user();" or "SELECT 1+1;". (Be sure to end your SQL with semicolon.)

3. Add a user - username "developer", and password "mysql". (Will use for EJB development.)

In mysql console, enter SQL - GRANT ALL PRIVILEGES ON test.* TO developer@localhost IDENTIFIED BY 'mysql';

4. Login to database "test" as user "developer":

- In DOS, enter "mysql -u developer -p test" (Note: test here is the database name, NOT the password. Password will be prompted.)

- After giving password, you should be in test as developer:

- Try "SELECT user();" and you should get "developer@localhost".

- Try creating a table and put some data:

CREATE TABLE table1 (id INTEGER NOT NULL, data VARCHAR(100),PRIMARY KEY (id)) type=InnoDB;

INSERT INTO table1 (id, data) VALUES (1, 'one');

INSERT INTO table1 (id, data) VALUES (2, 'two');

INSERT INTO table1 (id, data) VALUES (3, 'three');

SELECT * FROM table1;

Note:

* The default CREATE TABLE creates table as type ISAM, which does not support transaction. Include clause "type=InnoDB" in your CREATE TABLE statement as the above, then your table will have transaction support.

* By default, AUTOCOMMIT is on. To turn it off, do "SET AUTOCOMMIT=0;".

Other

[/url][url=http://www.purposesolutions.com/Resources/EclipseJ2EE.html#JBOSS_MYSQL_INTEGRATION]Integrating JBoss with MySQL (see below)

Installing Eclipse

Version

2.0, Milestone 5 (pre-release, build 20020416).

Download

Get zip binary at http://64.38.198.171/downloads/drops/S-M5-200204161340/download.php?dropFile=eclipse-SDK-20020416-win32.zip

(General download at http://www.eclipse.org/downloads/index.php)

Documentation

- Eclipse FAQ: http://www.eclipse.org/eclipse/faq/eclipse-faq.html

- Documentation site: http://www.eclipse.org/eclipse/index.html (Currently only 1.0 docs)

- Searching News/Mailing archive: http://www.eclipse.org/search/search.cgi

Upgrade from Previous Version

- Rename your previous installation (say C:\eclipse to C:\eclipse_old). And remove it after you get the new version up for a while.

- After the installation, copy your workspace over (from C:\eclipse_old\workspace\ to C:\eclipse\workspace).

- After the installation, go over other Eclipse related sections and check for applicable changes.

Install

Unzip to destination (say C:\, which makes <install dir> to be C:\eclipse).

Test

- You should have a JDK installed (if you use Sun JDK, 1.4.0 is recommended for hot code replacement support).

- Start Eclipse and it would detect the JDK (through %JAVA_HOME%)

- You can also manually specify VM (option -vm <javaw.exe location>)

- Specify workspace location if don't want the default (option -data <workspace location) - Recommended settings on Perspective:

Menu "Workbench" -> Item "Preferences" -> Option Workbench -> "Open a new perspective" -> Select "In the same window" -> uncheck "Reuse Perspective with same input"

Other

[/url][url=http://www.purposesolutions.com/Resources/EclipseJ2EE.html#ECLIPSE_TOMCAT_PLUGIN]Tomcat Plugin for Eclipse (see below)

[/url][url=http://www.purposesolutions.com/Resources/EclipseJ2EE.html#ECLIPSE_JBOSS_PLUGIN]JBoss Plugin for Eclipse (see below)

Installing Sysdeo Eclipse Tomcat Launcher Plugin

Version

0.96

Download

Get binary tomcatPluginV096.zip at http://www.sysdeo.com/eclipse/tomcatPluginV096.zip

(General page at http://www.sysdeo.com/eclipse/tomcatPlugin.html .)

Documentation

Online instruction: http://www.sysdeo.com/eclipse/tomcatPlugin.html

Upgrade from Previous Version

- If you did NOT just install a new version of Eclipse, remove the old plugin directory (for example, C:\eclipse\plugins\com.sysdeo.eclipse.tomcat\)

Install

Unzip to <Eclipse install dir>\plugins (the plugin will reside under <Eclipse install dir>\plugins\com.sysdeo.eclipse.tomcat).

Configure Eclipse

Start Eclipse.

Configure Tomcat plugin.

Menu "Workbench" -> Item "Preferences" -> Option "Tomcat" -> "Tomcat version", select "4.x" -> "Tomcat home", specify <Tomcat install dir> -> Under Option "Tomcat", suboption "JVM Settings" -> "Classpath", add the Jar/Zip for tools.jar. (If you use JDK 1.4 at C:\jdk1.4, it is "C:\jdk1.4\lib\tools.jar"). This is for compiling JSP.

Set classpath variable TOMCAT_HOME for project classpath reference.

Menu "Workbench" -> Item "Preferences" -> option "Java" -> option "Classpath Variables" -> New variable, name "TOMCAT_HOME", value <TOMCAT install dir> (Then in .classpath of your project, you use TOMCAT_HOME for variable references.)

Make sure Tomcat menu accessible.

Set to "Java" perspective, and make sure Tomcat menu and its 3 toolbar buttons are available. (If not, Menu Perspective -> Item "Customize" -> option "Other" -> option "Tomcat", check it.)

Use menu or toolbar to Start/Stop Tomcat

(The plugin will start/stop Tomcat as a debugging mode VM inside Eclipse, so debugging into Servlets and JSP-generated-Servlets becomes possible.) Note:

For your Eclipse project, .classpath needs this to compile Servlets:

<classpathentry kind="var" path="TOMCAT_HOME/lib/jasper-runtime.jar"/>

<classpathentry kind="var" path="TOMCAT_HOME/common/lib/servlet.jar"/>

Installing Genuitec Eclipse JBoss Plugin

Version

1.0EA4

Download

Get zip binary http://www.genuitec.com/products/EASIEJBoss1.0ea4.zip

(General page at http://www.genuitec.com/products.htm#easie.)

Documentation

Online instruction (PDF): http://www.genuitec.com/products/Eclipse_JBoss.pdf

Upgrade from Previous Version

- If you did NOT just install a new version of Eclipse, remove the old plugin directory (for example, C:\eclipse\plugins\com.genuitec.eclipse.easie.core\ and C:\eclipse\plugins\com.genuitec.eclipse.easie.jboss\)

Install

Unzip to <Eclipse install dir> (the plugin will reside under <Eclipse install dir>\plugins as subfolder com.genuitec.eclipse.easie.core and com.genuitec.eclipse.easie.jboss.

Configure Eclipse

Start Eclipse.

Configure JBoss plugin.

Menu "Workbench" -> Item "Preferences" -> Option "JBoss":

"JBoss Home Directory": <JBOSS install dir> (e.g. C:\jboss-3.0.0RC1)

"XML Document Builder Factory Class": org.apache.crimson.jaxp.DocumentBuilderFactoryImpl

"SAX Parser Factory Class": "org.apache.crimson.jaxp.SAXParserFactoryImpl"

"Optional Java VM Arguments": "-Djboss.boot.loader.name=run.bat"

"Optional Program Arguments": "-c default"

Make sure JBoss menu accessible.

Set to "Java" perspective, and make sure JBoss menu and its 2 toolbar buttons are available.

If not, Menu "Perspective" -> Item "Customize" -> option "Other" -> option "EASIE JBoss", check it.

Use menu or toolbar to Start/Stop JBoss

(The plugin will start/stop JBoss as a debugging mode VM inside Eclipse, so debugging into EJBs becomes possible.)

Integrating Tomcat with JBoss

Version

Tomcat 4.x and JBoss 3.x

Configure JBoss

JBoss 3.0.0 comes with Jetty Servlet Engine enabled running at port 8080 as default. If you want Tomcat to run on port 8080, they will conflict. To disable Jetty in JBoss:

Create a backup folder next to subfolder deploy\ (e.g. %JBOSS_DIST%\server\default\deployBackup.)

Move file jetty-plugin.sar from deploy\ into deployBackup\ (making it absent from the deploy\ folder)

Configure Tomcat

Add JBoss client library to Tomcat:

Copy the following from %JBOSS_DIST%\client into %TOMCAT_HOME%\common\lib:

jboss-j2ee.jar, jboss-client.jar, jbosssx-client.jar, jnp-client.jar, jboss-common-client.jar and log4j.jar.

When Tomcat starts up, these .jar would be added to its classpath. If you ever run into others that you need, just copy from %JBOSS_DIST%\client folder.

Specify JNDI properties to Tomcat JVM (you probably want to do both).

o Tomcat in OS (outside Eclipse):

Change %TOMCAT_HOME%\bin\setclasspath.bat (backing up the original is recommended), the line with JAVA_OPTS (following is one line):

set JAVA_OPTS=-Djava.naming.factory.initial=org.jnp.interfaces.NamingContextFactory -Djava.naming.provider.url=localhost:1099 -Djava.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces

o Tomcat inside Eclipse:

Menu "Workbench" -> Item "Preference" -> option "Tomcat" -> suboption "JVM Settings" -> "Append to JVM Parameters", add the following three JVM parameters (each line is a seperate parameter):

-Djava.naming.factory.initial=org.jnp.interfaces.NamingContextFactory

-Djava.naming.provider.url=localhost:1099

-Djava.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces

Note:

1. Your application EJB's client classes need to be accessible to the Web application,

at preferrably WEB-INF\lib (or WEB-INF\classes).

2. For your Eclipse application, project .classpath need to include the following to compile EJB client calls:

<classpathentry kind="var" path="TOMCAT_HOME/common/lib/jboss-j2ee.jar"/>

<classpathentry kind="var" path="TOMCAT_HOME/common/lib/jboss-client.jar"/>

<classpathentry kind="var" path="TOMCAT_HOME/common/lib/jbosssx-client.jar"/>

<classpathentry kind="var" path="TOMCAT_HOME/common/lib/jnp-client.jar"/>

<classpathentry kind="var" path="TOMCAT_HOME/common/lib/jboss-common-client.jar"/>

<classpathentry kind="var" path="TOMCAT_HOME/common/lib/log4j.jar"/>

Integrating JBoss with MySQL

Version

JBoss 3.x and MySQL 3.x

Configure MySQL

Be sure your MySQL is using mysqld-max which supports InnoDB (or BDB) for transaction. You tables also need to have "type=InnoDB" (or BDB).

- To check, do "SHOW TABLE STATUS LIKE '<table name>';".

- To modify, do "ALTER TABLE <table name> TYPE=InnoDB;".

Download MySQL JDBC driver (2.0.4) at http://mirror.sit.wisc.edu/mysql/Downloads/Contrib/mm.mysql-2.0.4-bin.jar

Download page: http://www.mysql.com/downloads/api-jdbc.html.

Configure JBoss

Put the JDBC driver into JBoss library:

Copy downloaded mm.mysql-2.0.4-bin.jar to folder %JBOSS_DIST%\lib\.

Deploy MySQL into JBoss, by adding file mysql-service.xml into folder %JBOSS_DIST%\server\default\deploy\.

A template could be found at http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/jboss/jbosscx/src/etc/example-config/mysql-service.xml?rev=1.4&content-type=text/vnd.viewcvs-markup.

Customization (example, use whatever values applies to you):

"MySqlDB" (if you don't change it) is your data source name and the JNDI name.

Change "jdbc:mysql://dell:3306/jbossdb" into the URL or your database (for example, database "test" on local host should be jdbc:mysql://localhost:3306/test.)

Read the comments toward the end of the file and follow the instruction to copy the following section into login-config.xml (under %JBOSS_DIST%\server\default\conf\):

<application-policy name = "MySqlDbRealm">

<authentication>

<login-module code = "org.jboss.resource.security.ConfiguredIdentityLoginModule" flag = "required">

<module-option name = "principal">yourprincipal</module-option>

<module-option name = "userName">yourusername</module-option>

<module-option name = "password">yourpassword</module-option>

<module-option name = "managedConnectionFactoryName"> jboss.jca:service=LocalTxCM,name=MySqlDS</module-option>

</login-module>

</authentication>

</application-policy>

In login-config.xml, modify the section you pasted from the above step. Change "yourprincipal" into "developer" (value of Principle), "yourusername" into "developer" (value of Username), "yourpassword" into "mysql" (value of Password). Make sure "MySqlDS" is your data source name or change it accordingly.

Copyright © 2002 Purpose Solutions, Inc.

All Rights Reserved

 
 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
2023年上半年GDP全球前十五强
 百态   2023-10-24
美众议院议长启动对拜登的弹劾调查
 百态   2023-09-13
上海、济南、武汉等多地出现不明坠落物
 探索   2023-09-06
印度或要将国名改为“巴拉特”
 百态   2023-09-06
男子为女友送行,买票不登机被捕
 百态   2023-08-20
手机地震预警功能怎么开?
 干货   2023-08-06
女子4年卖2套房花700多万做美容:不但没变美脸,面部还出现变形
 百态   2023-08-04
住户一楼被水淹 还冲来8头猪
 百态   2023-07-31
女子体内爬出大量瓜子状活虫
 百态   2023-07-25
地球连续35年收到神秘规律性信号,网友:不要回答!
 探索   2023-07-21
全球镓价格本周大涨27%
 探索   2023-07-09
钱都流向了那些不缺钱的人,苦都留给了能吃苦的人
 探索   2023-07-02
倩女手游刀客魅者强控制(强混乱强眩晕强睡眠)和对应控制抗性的关系
 百态   2020-08-20
美国5月9日最新疫情:美国确诊人数突破131万
 百态   2020-05-09
荷兰政府宣布将集体辞职
 干货   2020-04-30
倩女幽魂手游师徒任务情义春秋猜成语答案逍遥观:鹏程万里
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案神机营:射石饮羽
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案昆仑山:拔刀相助
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案天工阁:鬼斧神工
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案丝路古道:单枪匹马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:与虎谋皮
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:李代桃僵
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:指鹿为马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:小鸟依人
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:千金买邻
 干货   2019-11-12
 
推荐阅读
 
 
 
>>返回首頁<<
 
靜靜地坐在廢墟上,四周的荒凉一望無際,忽然覺得,淒涼也很美
© 2005- 王朝網路 版權所有