-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME.jboss
62 lines (50 loc) · 2.44 KB
/
README.jboss
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
(C) Copyright 2006,2008 The Apache Software Foundation.
----------------------------------------------------------------------
These are instructions for building and useing daytrader with JBoss:
First create a $JBOSS_SERVER_HOME/deploy/jms/daytrader-destinations-service.xml
file with the fiollowing contents:
<?xml version="1.0" encoding="UTF-8"?>
<server>
<mbean code="org.jboss.mq.server.jmx.Queue"
name="jboss.mq.destination:service=Queue,name=jms/TradeBrokerQueue">
<attribute name="JNDIName">TradeBrokerQueue</attribute>
<depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
</mbean>
<mbean code="org.jboss.mq.server.jmx.Topic"
name="jboss.mq.destination:service=Topic,name=jms/TradeStreamerTopic">
<attribute name="JNDIName">TradeStreamerTopic</attribute>
<depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
</mbean>
</server>
Then edit your $JBOSS_SERVER_HOME/deploy/ejb-deployer.xml file and find the
line that sets the VerifyDeployments attribute and set to false. It should
look like the following:
...
<attribute name="VerifyDeployments">false</attribute>
...
If using MySQL, create a mysql database called tradedb and load it with
the derby.sql. Create a user named daytrader and grant the proper
privileges as follows:
grant all on tradedb.* to daytrader identified by 'daytrader';
grant all on tradedb.* to daytrader@localhost identified by 'daytrader';
Then create a JBoss mysql datasource by creating a
$JBOSS_SERVER_HOME/deploy/mysql-ds.xml file with the following contents:
<?xml version="1.0" encoding="UTF-8"?>
<datasources>
<local-tx-datasource>
<jndi-name>jdbc/TradeDataSource</jndi-name>
<use-java-context>false</use-java-context>
<connection-url>jdbc:mysql://localhost:3306/tradedb</connection-url>
<driver-class>com.mysql.jdbc.Driver</driver-class>
<user-name>daytrader</user-name>
<password>daytrader</password>
<exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.MySQLExceptionSorter</exception-sorter-class-name>
<metadata>
<type-mapping>mySQL</type-mapping>
</metadata>
</local-tx-datasource>
</datasources>
Finally build a mysql version of daytrader with the following command:
mvn clean install -Ddatabase=mysql
Copy the $DAYTRADER_SRC_HOME/modules/ear/target/daytrader-ear-1.1-SNAPSHOT.ear
to your $JBOSS_SERVER_HOME/deploy directory.