README
上传用户:xfwatch
上传日期:2020-12-14
资源大小:872k
文件大小:6k
- JBoss, Home of Professional Open Source
- Copyright 2008, Red Hat, Inc., and others contributors as indicated
- by the @authors tag. All rights reserved.
- See the copyright.txt in the distribution for a
- full listing of individual contributors.
- This copyrighted material is made available to anyone wishing to use,
- modify, copy, or redistribute it subject to the terms and conditions
- of the GNU Lesser General Public License, v. 2.1.
- This program is distributed in the hope that it will be useful, but WITHOUT A
- WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
- You should have received a copy of the GNU Lesser General Public License,
- v.2.1 along with this distribution; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- MA 02110-1301, USA.
- NOTE: You may like to create a backup of this folder before starting!
NOTE: If you are using IPv6 you will need to change any references to localhost in the btconfig.xml files to be localhost4 or 127.0.0.1
- 1. SET ENVIRONMENT VARIABLES
- In order to run the example you need to make sure that you have set the environment
- appropriately. You will need to make sure that you edit the variables with values
- starting with REPLACE_WITH_:
- On Linux you need to edit:
- $BLACKTIE_HOME/setenv.sh
- On Windows:
- %BLACKTIE_HOME%setenv.bat
- Then, execute the script setenv
- On Windows:
- You MUST use an environment configured with the VC++ development tools, e.g. launch:
- C:Program FilesMicrosoft Visual Studio 9.0VCvcvarsall.bat
- 2. CREATE THE SERVER
- On Linux:
- generate_server.sh -Dservice.names=BAR -Dserver.includes=BarService.c
- On Windows:
- generate_server -Dservice.names=BAR -Dserver.includes=BarService.c
- NOTE: If you get the following error you have not installed ant-contrib into your ANT distribution:
- BUILD FAILED
- /home/tom/blacktie/dist/blacktie-1.0-M4-SNAPSHOT/bin/generate-executables.xml:160: Problem: failed to create task or type propertycopy
- NOTE: If you get the following error you have not installed cpp-tasks into your ANT distribution:
- BUILD FAILED
- /home/tom/blacktie/dist/blacktie-1.0-M4-SNAPSHOT/bin/generate-executables.xml:113: The following error occurred while executing this line:
- /home/tom/blacktie/dist/blacktie-1.0-M4-SNAPSHOT/bin/generate-executables.xml:140: Problem: failed to create task or type cc
- NOTE: If you get the following error you have not edited or executed setenv correctly:
- java org.apache.tools.ant.launch.Launcher -f /bin/generate-executables.xml -Dconfiguration.type
- =debug -Dbasedir=. -Dtoolchain.compiler=msvc server -Dservice.names=BAR -Dserver.includes=BarService.c
- Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/tools/ant/launch/Launcher
- Caused by: java.lang.ClassNotFoundException: org.apache.tools.ant.launch.Launcher
- at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
- at java.security.AccessController.doPrivileged(Native Method)
- at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
- at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
- at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
- at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
- at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
- Could not find the main class: org.apache.tools.ant.launch.Launcher. Program will exit.
- NOTE: On Windows - If you get the following error you have not used a command prompt with VC++ tools in it:
- BUILD FAILED
- C:blacktiedistblacktie-1.0-MR6-SNAPSHOTbingenerate-executables.xml:117: The following error occurred while executing this line:
- C:blacktiedistblacktie-1.0-MR6-SNAPSHOTbingenerate-executables.xml:144: Could not launch cl: java.io.IOException: Cannot run program "cl" (in directory "C:
- blacktiedistblacktie-1.0-MR6-SNAPSHOTexamplesxatmifooapptargetclasses"): CreateProcess error=2, The system cannot find the file specified
- 3. CREATE THE CLIENT
- On Linux:
- generate_client.sh -Dclient.includes=client.c
- On Windows:
- generate_client -Dclient.includes=client.c
- 4. DEPLOY THE BLACKTIE ADMIN SERVICE
- Undeploy any older versions of the blacktie admin service
- Copy the file $BLACKTIE_HOME/blacktie-admin-services/blacktie-admin-services-<VERSION>-jar-with-dependencies.jar into $JBOSS_HOME/server/all/deploy
Copy the file $BLACKTIE_HOME/blacktie-admin-services/btconfig.xml into $JBOSS_HOME/server/all/conf
- 5. RUN THE APPLICATION SERVER
- Make sure that the naming, messaging and transaction services are running, by running the JBoss server:
- <JBOSS_HOME>/bin/run.sh|bat -c all
- 6 RUN THE APPLICATIONS
- 6.1 RUN THE SERVER
Edit the btconfig.xml to set REPLACE_WITH_INSTALL_LOCATION as appropriate
Edit the btconfig.xml to set REPLACE_WITH_HOSTNAME as appropriate
btadmin startup
- NOTE: If you get the following error you have not started the JBoss server:
- 2009-06-23 08:51:51,270 [0x7f627be63750] ERROR AtmiBrokerServer - serverinit - Unexpected CORBA exception: TRANSIENT
- 2009-06-23 08:51:51,270 [0x7f627be63750] INFO AtmiBrokerLogc - main Unexpected exception in serverrun()
- 6.2 RUN THE CLIENT
- ./client
- NOTE: If you get the following error you have not sourced setenv.sh|bat
- ./client: error while loading shared libraries: libTAO_CosNaming.so.1.6.7: cannot open shared object file: No such file or directoryI
- 6.3 SHUTDOWN THE SERVER
btadmin shutdown
- 7. JAB CLIENTS
- If you would like to use a JAB Client to talk to the server, please see
- <BLACKTIE_HOME>/examples/jab/fooapp
- 8. ADMINISTRATION EXAMPLES
- If you would like to see administration in effect, please see
- <BLACKTIE_HOME>/examples/admin
- 9. SECURITY EXAMPLES
- If you would like to see security in effect, please see
- <BLACKTIE_HOME>/examples/security
- 10. TRANSACTION EXAMPLES
- If you would like to see transactions in effect, please see
- <BLACKTIE_HOME>/examples/xatmi/txfooapp