1
1
<!--
2
2
3
- Copyright 2005-2015 Red Hat, Inc.
3
+ Copyright 2005-2015 Red Hat, Inc.
4
4
5
- Red Hat licenses this file to you under the Apache License, version
6
- 2.0 (the "License"); you may not use this file except in compliance
7
- with the License. You may obtain a copy of the License at
5
+ Red Hat licenses this file to you under the Apache License, version
6
+ 2.0 (the "License"); you may not use this file except in compliance
7
+ with the License. You may obtain a copy of the License at
8
8
9
- http://www.apache.org/licenses/LICENSE-2.0
9
+ http://www.apache.org/licenses/LICENSE-2.0
10
10
11
- Unless required by applicable law or agreed to in writing, software
12
- distributed under the License is distributed on an "AS IS" BASIS,
13
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
14
- implied. See the License for the specific language governing
15
- permissions and limitations under the License.
11
+ Unless required by applicable law or agreed to in writing, software
12
+ distributed under the License is distributed on an "AS IS" BASIS,
13
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
14
+ implied. See the License for the specific language governing
15
+ permissions and limitations under the License.
16
16
17
17
-->
18
18
# Description
@@ -329,6 +329,31 @@ consult the solution [on IBM website](http://www-01.ibm.com/support/docview.wss?
329
329
330
330
# JBoss Fuse installation and configuration
331
331
332
+ 1 . Unzip the ` jboss-fuse-full-6.2.0.redhat-060.zip ` archive distribution. The target directory ` jboss-fuse-6.2.0.redhat-060 ` will
333
+ be referred to as ` $JBOSS_FUSE_HOME ` .
334
+ 2 . Add the following credentials to ` $JBOSS_FUSE_HOME/etc/users.properties ` :
335
+
336
+ admin=admin,admin,manager,viewer,Operator,Maintainer,Deployer,Auditor,Administrator,SuperUser
337
+
338
+ 3 . Start JBoss Fuse:
339
+
340
+ $JBOSS_FUSE_HOME/bin/fuse
341
+
342
+ 4 . Make sure only one ` transaction ` bundle is installed:
343
+
344
+ JBossFuse:karaf@root> osgi:list -t 0 -s | grep transaction
345
+ [ 163] [Active ] [ ] [ ] [ 30] org.apache.aries.transaction.manager (1.1.0)
346
+ [ 164] [Active ] [Created ] [ ] [ 30] org.apache.aries.transaction.blueprint (1.0.1)
347
+ [ 190] [Active ] [ ] [ ] [ 50] org.apache.aries.transaction.manager (1.0.0)
348
+
349
+ If the above is the case, please uninstall all versions except ` 1.1.0 ` :
350
+
351
+ JBossFuse:karaf@root> osgi:uninstall 190
352
+ You are about to access system bundle 190. Do you wish to continue (yes/no): yes
353
+
354
+ (This problem should be fixed in the next version of JBoss Fuse 6.2)
355
+
356
+
332
357
# Examples
333
358
334
359
## Camel route with 2 transaction managers
@@ -341,6 +366,78 @@ This example is comprised of the following projects:
341
366
342
367
Ensure you have installed and configured a database server of choice (currently: PostgreSQL)
343
368
369
+ 1 . ` cd $PROJECT_HOME `
370
+ 2 . ` mvn clean install -Ppostgresql ` (or other DB, like ` mariadb ` , ` h2 ` , ` derby ` , ` db2 ` , ` oracle ` )
371
+ 3 . install features repository:
372
+
373
+ features:addurl mvn:org.jboss.fuse.examples.camel-persistence-part2/features/6.2/xml/features
374
+
375
+ 4 . install ` reportincident-jpa-two ` feature:
376
+
377
+ features:install -v reportincident-jpa-two
378
+
379
+ 5 . make sure relevant bundles are installed:
380
+
381
+ JBossFuse:karaf@root> list | grep Examples
382
+ [ 309] [Active ] [Created ] [ ] [ 80] JBoss Fuse :: Examples :: Fuse ESB & Persistence :: Datasource (6.2.0)
383
+ [ 310] [Active ] [Created ] [ ] [ 80] JBoss Fuse :: Examples :: Fuse ESB & Persistence :: DAO (6.2.0)
384
+ [ 311] [Active ] [Created ] [ ] [ 80] JBoss Fuse :: Examples :: Fuse ESB & Persistence :: Camel - 2 Tx Managers (6.2.0)
385
+
386
+ 6 . Start PostgreSQL client and observe ` REPORT.T_INCIDENT ` table:
387
+
388
+ $ docker exec -ti fuse-postgresql-server /bin/bash
389
+ root@b052efff5a53:/# psql -d reportdb -U fuse
390
+ psql (9.4.0)
391
+ Type "help" for help.
392
+
393
+ reportdb=# select * from report.t_incident order by incident_id asc;
394
+ incident_id | incident_ref | incident_date | given_name | family_name | summary | details | email | phone | creation_date | creation_user
395
+ -------------+--------------+---------------------+------------+-------------+----------------------+-------------------------------------------+---------------------------+----------------+-------------------------+---------------
396
+ 1 | 001 | 2015-01-23 00:00:00 | Charles | Moulliard | incident webinar-001 | This is a report incident for webinar-001 | [email protected] | +111 10 20 300 | |
397
+ 2 | 002 | 2015-01-24 00:00:00 | Charles | Moulliard | incident webinar-002 | This is a report incident for webinar-002 | [email protected] | +111 10 20 300 | |
398
+ 3 | 003 | 2015-01-25 00:00:00 | Charles | Moulliard | incident webinar-003 | This is a report incident for webinar-003 | [email protected] | +111 10 20 300 | |
399
+ 4 | 004 | 2015-01-26 00:00:00 | Charles | Moulliard | incident webinar-004 | This is a report incident for webinar-004 | [email protected] | +111 10 20 300 | |
400
+ (5 rows)
401
+
402
+ reportdb=#
403
+
404
+ 7 . Launch JConsole (inside $JAVA_HOME/bin) and connect using the following information:
405
+
406
+ * Remote process: ` service:jmx:rmi://localhost:44444/jndi/rmi://localhost:1099/karaf-root `
407
+ * Username: ` admin `
408
+ * Password: ` admin `
409
+
410
+ 8 . Switch to the MBeans tab at the top. On the left pane, expand the ` org.apache.activemq ` domain, then
411
+ navigate to: Broker > amq > Queue. You will see the ` incident ` and ` rollback ` queues. The ` registerCall `
412
+ queue will appear when it is first used. For these queues, you will be interested in tracking the
413
+ ` EnqueueCount ` attribute.
414
+
415
+ 9 . Copy the following files to ` $JBOSS_FUSE_HOME/datainsert ` and notice the effect in the ` registerCall ` queue and the ` REPORT.T_INCIDENT ` table:
416
+
417
+ * ` $PROJECT_HOME/data/csv-one-record-allok.txt ` :
418
+ * ` REPORT.T_INCIDENT ` table: new record
419
+ * ` incident ` queue: new message enqueued
420
+ * ` rollback ` queue: no new messages
421
+ * ` registerCall ` queue: new message enqueued
422
+
423
+ * ` $PROJECT_HOME/data/csv-one-record-failjms-dbok.txt ` :
424
+ * ` REPORT.T_INCIDENT ` table: new record
425
+ * ` incident ` queue: new message enqueued
426
+ * ` rollback ` queue: no new messages
427
+ * ` registerCall ` queue: no new messages
428
+
429
+ * ` $PROJECT_HOME/data/csv-one-record-jmsok-faildb.txt ` :
430
+ * ` REPORT.T_INCIDENT ` table: no record inserted
431
+ * ` incident ` queue: no new messages
432
+ * ` rollback ` queue: new message enqueued
433
+ * ` registerCall ` queue: new message enqueued
434
+
435
+ * ` $PROJECT_HOME/data/csv-one-record-failjms-faildb.txt ` :
436
+ * ` REPORT.T_INCIDENT ` table: no record inserted
437
+ * ` incident ` queue: no new messages
438
+ * ` rollback ` queue: new message enqueued
439
+ * ` registerCall ` queue: no new messages
440
+
344
441
## Camel route with 1 global transaction manager
345
442
346
443
This example is comprised of the following projects:
@@ -353,11 +450,20 @@ Ensure you have installed and configured a database server of choice (currently:
353
450
354
451
To install and test, assuming that you have previously run the "Camel Route with 2 Tx Managers" example above:
355
452
356
- 1 . First uninstall the reportincident-jpa-two feature (TODO)
453
+ 1 . First uninstall the ` reportincident-jpa-two ` feature:
454
+
455
+ features:uninstall reportincident-jpa-two
456
+
457
+ 2 . Install the reportincident-jpa-one feature:
458
+
459
+ features:install -v reportincident-jpa-one
357
460
358
- 2 . Install the reportincident-jpa-one feature (TODO)
461
+ 3 . make sure relevant bundles are installed:
359
462
360
- 3 . Execute the "list" command in the ESB shell and check that the following bundles are Active (TODO)
463
+ JBossFuse:karaf@root> list | grep Examples
464
+ [ 314] [Active ] [Created ] [ ] [ 80] FuseSource :: Examples :: Fuse ESB & Persistence :: Datasource (6.2.0)
465
+ [ 315] [Active ] [Created ] [ ] [ 80] FuseSource :: Examples :: Fuse ESB & Persistence :: DAO - JTA (6.2.0)
466
+ [ 316] [Active ] [Created ] [ ] [ 80] FuseSource :: Examples :: Fuse ESB & Persistence :: Camel - 1 Tx Manager (6.2.0)
361
467
362
468
4 . Copy the following files to ` $JBOSS_FUSE_HOME/datainsert ` and notice the new behaviour in the second and third cases, in terms of the registerCall queue and the REPORT.T_INCIDENT table:
363
469
@@ -368,19 +474,19 @@ To install and test, assuming that you have previously run the "Camel Route with
368
474
* ` registerCall ` queue: new message enqueued
369
475
370
476
* ` $PROJECT_HOME/data/csv-one-record-failjms-dbok.txt ` :
371
- * ` REPORT.T_INCIDENT ` table: new record
477
+ * ` REPORT.T_INCIDENT ` table: no record inserted
372
478
* ` incident ` queue: new message enqueued
373
479
* ` rollback ` queue: no new messages
374
480
* ` registerCall ` queue: no new messages
375
481
376
- * ` $PROJECT_HOME/data/csv-one-record-failjms -faildb.txt ` :
377
- * ` REPORT.T_INCIDENT ` table: new record
482
+ * ` $PROJECT_HOME/data/csv-one-record-jmsok -faildb.txt ` :
483
+ * ` REPORT.T_INCIDENT ` table: no record inserted
378
484
* ` incident ` queue: no new messages
379
485
* ` rollback ` queue: new message enqueued
380
486
* ` registerCall ` queue: no new messages
381
487
382
- * ` $PROJECT_HOME/data/csv-one-record-jmsok -faildb.txt ` :
383
- * ` REPORT.T_INCIDENT ` table: new record
488
+ * ` $PROJECT_HOME/data/csv-one-record-failjms -faildb.txt ` :
489
+ * ` REPORT.T_INCIDENT ` table: no record inserted
384
490
* ` incident ` queue: no new messages
385
491
* ` rollback ` queue: new message enqueued
386
492
* ` registerCall ` queue: no new messages
0 commit comments