Bug 1016087

Summary: Wrong syntax in CLI command for adding a HiLo generator
Product: [JBoss] JBoss Enterprise Application Platform 6 Reporter: Jan Martiska <jmartisk>
Component: DocumentationAssignee: Misha H. Ali <mhusnain>
Status: CLOSED CURRENTRELEASE QA Contact: Russell Dickenson <rdickens>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.2.0CC: sgilda, smumford
Target Milestone: ER5Keywords: Documentation, EasyFix
Target Release: EAP 6.3.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Build Name: 14874, Administration and Configuration Guide-6.2-1 Build Date: 02-10-2013 13:01:57 Topic ID: 5746-436208 [Latest]
Last Closed: 2014-08-06 14:34:25 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Jan Martiska 2013-10-07 13:15:44 UTC
Title: Configure EJB 2.x Container-Managed Persistence

Describe the issue:
/subsystem=cmp/hilo-keygenerator=DB_KEYS/:add(create-table=false,data-source=java:jboss/datasources/ExampleDS,drop-table=false,id-column=cmp_key_ids,select-hi-ddl=select max(cmp_key_ids) from cmp_key_seq,sequence-column=cmp_key_seq,table-name=cmp-keys))

Two errors:
- The SQL string in select-hi-ddl parameter must be in quotes. If it is not, EAP will accept the command, but the string will get deformed.
- There is an extra bracket in the end, which causes the command's syntax to be rejected

Suggestions for improvement:
/subsystem=cmp/hilo-keygenerator=DB_KEYS/:add(create-table=false,data-source=java:jboss/datasources/ExampleDS,drop-table=false,id-column=cmp_key_ids,select-hi-ddl="select max(cmp_key_ids) from cmp_key_seq",sequence-column=cmp_key_seq,table-name=cmp-keys)

Comment 3 Scott Mumford 2014-02-26 05:13:22 UTC
Moving to ON_QA.

The changes should be available for review on the documentation stage within an hour or so from this comment.

http://documentation-devel.engineering.redhat.com/site/documentation/en-US/JBoss_Enterprise_Application_Platform/

Comment 4 Scott Mumford 2014-02-26 05:15:34 UTC
Moving to ON_QA.

The changes should be available for review on the documentation stage within an hour or so from this comment.

http://documentation-devel.engineering.redhat.com/site/documentation/en-US/JBoss_Enterprise_Application_Platform/

Comment 5 Jan Martiska 2014-02-26 09:05:25 UTC
Sorry I forgot one more minor mistake :/ sequence-name is a required argument, so it should be included too. My final suggestion is:

/subsystem=cmp/hilo-keygenerator=DB_KEYS/:add(create-table=false,data-source=java:jboss/datasources/ExampleDS,drop-table=false,id-column=cmp_key_ids,select-hi-ddl="select max(cmp_key_ids) from cmp_key_seq",sequence-column=cmp_key_seq,table-name=cmp-keys, sequence-name=my-sequence)

This should work correctly.

Comment 6 Misha H. Ali 2014-02-27 06:47:54 UTC
Modified command to that recommended in comment #5

Comment 8 Jan Martiska 2014-05-22 08:38:23 UTC
Verified, thanks.