
Administration Commands                    create-jms-resource(1)

NAME
     create-jms-resource - creates a JMS resource

SYNOPSIS
     create-jms-resource
     [--terse={true|false}][ --echo={true|false} ]
     [ --interactive={true|false} ] [ --host  host]
     [--port port] [--secure| -s ] [ --user  admin_user]
     [--passwordfile filename] [--help]
     [ --target  target]
     --restype type [--enabled=true]
     [--description text] [--property (name=value)[:name=value]*]
     jndi_name

DESCRIPTION
     The create-jms-resource command creates a Java Message  Ser-
     vice  (JMS) connection factory resource or a JMS destination
     resource. This command is supported in remote mode only.

OPTIONS
     -t --terse                  Indicates that any  output  data
                                 must  be very concise, typically
                                 avoiding   human-friendly   sen-
                                 tences    and   favoring   well-
                                 formatted data  for  consumption
                                 by a script. Default is false.

     -e --echo                   Setting to true  will  echo  the
                                 command  line  statement  on the
                                 standard  output.   Default   is
                                 false.

     -I --interactive            If set to true  (default),  only
                                 the  required  password  options
                                 are prompted.

     -H --host                   The  machine  name   where   the
                                 domain  administration server is
                                 running. The  default  value  is
                                 localhost.

     -p --port                   The HTTP/S port for  administra-
                                 tion.  This is the port to which
                                 you should point your browser in
                                 order  to manage the domain. For
                                 example, http://localhost:4848.

Java EE 5           Last change: 30 Jan 2007                    1

Administration Commands                    create-jms-resource(1)

                                 The default port number is 4848.

     -s --secure                 If set to true, uses SSL/TLS  to
                                 communicate   with   the  domain
                                 administration server.

     -u --user                   The authorized  domain  adminis-
                                 tration   server  administrative
                                 username.

                                 If you have authenticated  to  a
                                 domain  using  the asadmin login
                                 command,  then  you   need   not
                                 specify  the  --user  option  on
                                 subsequent  operations  to  this
                                 particular domain.

     --passwordfile              The --passwordfile option speci-
                                 fies  the  name,  including  the
                                 full path, of a file  containing
                                 the   password   entries   in  a
                                 specific format. The  entry  for
                                 the   password   must  have  the
                                 AS_ADMIN_ prefix followed by the
                                 password   name   in   uppercase
                                 letters.

                                 For  example,  to  specify   the
                                 domain   administration   server
                                 password, use an entry with  the
                                 following                format:
                                 AS_ADMIN_PASSWORD=password,
                                 where  password  is  the  actual
                                 administrator  password.   Other
                                 passwords  that can be specified
                                 include AS_ADMIN_MAPPEDPASSWORD,
                                 AS_ADMIN_USERPASSWORD,       and
                                 AS_ADMIN_ALIASPASSWORD.

                                 All remote commands must specify
                                 the  admin password to authenti-
                                 cate to the  domain  administra-
                                 tion  server,  either through --
                                 passwordfile or  asadmin  login,
                                 or  interactively on the command
                                 prompt. The asadmin  login  com-
                                 mand can be used only to specify
                                 the admin  password.  For  other
                                 passwords,    that    must    be

Java EE 5           Last change: 30 Jan 2007                    2

Administration Commands                    create-jms-resource(1)

                                 specified for  remote  commands,
                                 use  the --passwordfile or enter
                                 them at the command prompt.

                                 If you have authenticated  to  a
                                 domain  using  the asadmin login
                                 command,  then  you   need   not
                                 specify   the   admin   password
                                 through    the    --passwordfile
                                 option  on subsequent operations
                                 to this particular domain.  How-
                                 ever, this is applicable only to
                                 AS_ADMIN_PASSWORD  option.   You
                                 will  still  need to provide the
                                 other  passwords,  for  example,
                                 AS_ADMIN_USERPASSWORD,   as  and
                                 when required by individual com-
                                 mands, such as update-file-user.

                                 For security reasons,  passwords
                                 specified   as   an  environment
                                 variable will  not  be  read  by
                                 asadmin.

                                 The    default     value     for
                                 AS_ADMIN_MASTERPASSWORD       is
                                 changeit.

     --help                      Displays the help text  for  the
                                 command.

     --target                    This option  helps  specify  the
                                 target  for which you are creat-
                                 ing  the  JMS  resource.   Valid
                                 values are:

                                     o    server-  Specifies  the
                                          default server instance
                                          as   the   target   for
                                          creating     the    JMS
                                          resource. server is the
                                          name   of  the  default
                                          server instance and  is
                                          the default value.

                                     o    domain-   Specifies   a
                                          certain  domain  as the
                                          target for creating the
                                          JMS resource.

Java EE 5           Last change: 30 Jan 2007                    3

Administration Commands                    create-jms-resource(1)

                                     o    cluster_name- Specifies
                                          a  certain  cluster  as
                                          the target for creating
                                          the JMS resource.

                                     o    instance_name-   Speci-
                                          fies a certain instance
                                          as   the   target   for
                                          creating     the    JMS
                                          resource.

     --restype                   The JMS resource type, which can
                                 be              javax.jms.Topic,
                                 javax.jms.Queue,javax.jms.TopicConnectionFactory,
                                 or
                                 javax.jms.QueueConnectionFactory.

     --enabled                   If set to true, the resource  is
                                 enabled at runtime.

     --description               Text providing  details  of  the
                                 JMS resource.

     --property                  Optional  attribute   name/value
                                 pairs  for  configuring  the JMS
                                 resource.

                                 You can  specify  the  following
                                 properties for a connection fac-
                                 tory resource:

                                 ClientId                     Speci-
                                                              fies
                                                              a
                                                              client
                                                              ID
                                                              for
                                                              a
                                                              con-
                                                              nec-
                                                              tion
                                                              fac-
                                                              tory
                                                              that
                                                              will
                                                              be
                                                              used
                                                              by

Java EE 5           Last change: 30 Jan 2007                    4

Administration Commands                    create-jms-resource(1)

                                                              a
                                                              dur-
                                                              able
                                                              sub-
                                                              scriber.

                                 AddressList                  This
                                                              is
                                                              a
                                                              comma-
                                                              separated
                                                              list
                                                              of
                                                              mes-
                                                              sage
                                                              queue
                                                              addresses.
                                                              It
                                                              speci-
                                                              fies
                                                              the
                                                              names
                                                              (and,
                                                              option-
                                                              ally,
                                                              port
                                                              numbers)
                                                              of
                                                              a
                                                              mes-
                                                              sage
                                                              broker
                                                              instance
                                                              or
                                                              instances
                                                              with
                                                              which
                                                              your
                                                              appli-
                                                              ca-
                                                              tion
                                                              will
                                                              com-
                                                              mun-
                                                              i-
                                                              cate.
                                                              Each
                                                              address
                                                              in
                                                              the
                                                              list

Java EE 5           Last change: 30 Jan 2007                    5

Administration Commands                    create-jms-resource(1)

                                                              speci-
                                                              fies
                                                              the
                                                              host
                                                              name
                                                              (and,
                                                              option-
                                                              ally,
                                                              host
                                                              port
                                                              and
                                                              con-
                                                              nec-
                                                              tion
                                                              ser-
                                                              vice)
                                                              for
                                                              the
                                                              con-
                                                              nec-
                                                              tion.
                                                              For
                                                              exam-
                                                              ple,
                                                              the
                                                              value
                                                              could
                                                              be
                                                              earth
                                                              or
                                                              earth:7677.
                                                              Specify
                                                              the
                                                              port
                                                              number
                                                              if
                                                              the
                                                              mes-
                                                              sage
                                                              broker
                                                              is
                                                              run-
                                                              ning
                                                              on
                                                              a
                                                              port
                                                              other
                                                              than
                                                              the
                                                              default
                                                              (7676).
                                                              If

Java EE 5           Last change: 30 Jan 2007                    6

Administration Commands                    create-jms-resource(1)

                                                              you
                                                              specify
                                                              mul-
                                                              ti-
                                                              ple
                                                              hosts
                                                              and
                                                              ports
                                                              in
                                                              a
                                                              clustered
                                                              environ-
                                                              ment,
                                                              the
                                                              first
                                                              avail-
                                                              able
                                                              host
                                                              on
                                                              the
                                                              list
                                                              is
                                                              used.
                                                              Default:
                                                              An
                                                              address
                                                              list
                                                              com-
                                                              posed
                                                              from
                                                              the
                                                              jms-
                                                              hosts
                                                              defined
                                                              in
                                                              the
                                                              target's
                                                              jms-
                                                              service
                                                              con-
                                                              fi-
                                                              gura-
                                                              tion.
                                                              The
                                                              default
                                                              for
                                                              PE
                                                              is
                                                              local
                                                              host
                                                              and
                                                              the

Java EE 5           Last change: 30 Jan 2007                    7

Administration Commands                    create-jms-resource(1)

                                                              default
                                                              port
                                                              number
                                                              is
                                                              7676.
                                                              The
                                                              client
                                                              will
                                                              attempt
                                                              a
                                                              con-
                                                              nec-
                                                              tion
                                                              to
                                                              a
                                                              broker
                                                              on
                                                              port
                                                              7676
                                                              of
                                                              the
                                                              local
                                                              host.

                                 MessageServiceAddressList    Same
                                                              as
                                                              AddressList.
                                                              This
                                                              pro-
                                                              perty
                                                              name
                                                              is
                                                              depre-
                                                              cated.
                                                              Use
                                                              AddressList
                                                              instead.

                                 UserName                     The
                                                              user
                                                              name
                                                              for
                                                              the
                                                              con-
                                                              nec-
                                                              tion
                                                              fac-
                                                              tory.
                                                              Default:
                                                              guest.

Java EE 5           Last change: 30 Jan 2007                    8

Administration Commands                    create-jms-resource(1)

                                 Password                     The
                                                              pass-
                                                              word
                                                              for
                                                              the
                                                              con-
                                                              nec-
                                                              tion
                                                              fac-
                                                              tory.
                                                              Default:
                                                              guest.

                                 ReconnectEnabled             If
                                                              enabled
                                                              (value
                                                              =
                                                              true),
                                                              it
                                                              indi-
                                                              cates
                                                              that
                                                              the
                                                              client
                                                              run-
                                                              time
                                                              attempts
                                                              to
                                                              recon-
                                                              nect
                                                              to
                                                              a
                                                              mes-
                                                              sage
                                                              server
                                                              (or
                                                              the
                                                              list
                                                              of
                                                              addresses
                                                              in
                                                              the
                                                              AddressList)
                                                              when
                                                              a
                                                              con-
                                                              nec-
                                                              tion
                                                              is
                                                              lost.
                                                              Default:

Java EE 5           Last change: 30 Jan 2007                    9

Administration Commands                    create-jms-resource(1)

                                                              false.

                                 ReconnectAttempts            Speci-
                                                              fies
                                                              the
                                                              number
                                                              of
                                                              attempts
                                                              to
                                                              con-
                                                              nect
                                                              (or
                                                              recon-
                                                              nect)
                                                              for
                                                              each
                                                              address
                                                              in
                                                              the
                                                              AddressList
                                                              before
                                                              the
                                                              client
                                                              run-
                                                              time
                                                              tries
                                                              the
                                                              next
                                                              address
                                                              in
                                                              the
                                                              list.
                                                              A
                                                              value
                                                              of
                                                              -1
                                                              indi-
                                                              cates
                                                              that
                                                              the
                                                              number
                                                              of
                                                              recon-
                                                              nect
                                                              attempts
                                                              is
                                                              unlim-
                                                              ited
                                                              (the
                                                              client
                                                              runtime

Java EE 5           Last change: 30 Jan 2007                   10

Administration Commands                    create-jms-resource(1)

                                                              attempts
                                                              to
                                                              con-
                                                              nect
                                                              to
                                                              the
                                                              first
                                                              address
                                                              until
                                                              it
                                                              succeeds).
                                                              Default:
                                                              6.

                                 ReconnectInterval            Speci-
                                                              fies
                                                              the
                                                              inter-
                                                              val
                                                              in
                                                              mil-
                                                              liseconds
                                                              between
                                                              recon-
                                                              nect
                                                              attempts.
                                                              This
                                                              applies
                                                              to
                                                              attempts
                                                              on
                                                              each
                                                              address
                                                              in
                                                              the
                                                              AddressList
                                                              and
                                                              for
                                                              suc-
                                                              ces-
                                                              sive
                                                              addresses
                                                              in
                                                              the
                                                              list.
                                                              If
                                                              the
                                                              inter-
                                                              val
                                                              is
                                                              too

Java EE 5           Last change: 30 Jan 2007                   11

Administration Commands                    create-jms-resource(1)

                                                              short,
                                                              the
                                                              broker
                                                              does
                                                              not
                                                              have
                                                              time
                                                              to
                                                              recover.
                                                              If
                                                              it
                                                              is
                                                              too
                                                              long,
                                                              the
                                                              recon-
                                                              nect
                                                              might
                                                              represent
                                                              an
                                                              unac-
                                                              cept-
                                                              able
                                                              delay.
                                                              Default:
                                                              30,000
                                                              mil-
                                                              liseconds.

                                 AddressListBehavior          Speci-
                                                              fies
                                                              whether
                                                              con-
                                                              nec-
                                                              tion
                                                              attempts
                                                              are
                                                              in
                                                              the
                                                              order
                                                              of
                                                              addresses
                                                              in
                                                              the
                                                              AddressList
                                                              attri-
                                                              bute
                                                              (PRIOR-
                                                              ITY)
                                                              or
                                                              in

Java EE 5           Last change: 30 Jan 2007                   12

Administration Commands                    create-jms-resource(1)

                                                              a
                                                              ran-
                                                              dom
                                                              order
                                                              (RAN-
                                                              DOM).
                                                              PRIOR-
                                                              ITY
                                                              means
                                                              that
                                                              the
                                                              recon-
                                                              nect
                                                              will
                                                              always
                                                              try
                                                              to
                                                              con-
                                                              nect
                                                              to
                                                              the
                                                              first
                                                              server
                                                              address
                                                              in
                                                              the
                                                              AddressList
                                                              and
                                                              will
                                                              use
                                                              another
                                                              one
                                                              only
                                                              if
                                                              the
                                                              first
                                                              broker
                                                              is
                                                              not
                                                              avail-
                                                              able.
                                                              If
                                                              you
                                                              have
                                                              many
                                                              clients
                                                              attempt-
                                                              ing
                                                              a
                                                              con-
                                                              nec-
                                                              tion

Java EE 5           Last change: 30 Jan 2007                   13

Administration Commands                    create-jms-resource(1)

                                                              using
                                                              the
                                                              same
                                                              con-
                                                              nec-
                                                              tion
                                                              fac-
                                                              tory,
                                                              specify
                                                              RAN-
                                                              DOM
                                                              to
                                                              prevent
                                                              them
                                                              from
                                                              all
                                                              being
                                                              con-
                                                              nected
                                                              to
                                                              the
                                                              same
                                                              address.
                                                              Default:
                                                              The
                                                              AddressList-
                                                              Behavior
                                                              value
                                                              of
                                                              the
                                                              target's
                                                              jms-
                                                              service
                                                              con-
                                                              fi-
                                                              gura-
                                                              tion.

                                 AddressListIterations        Speci-
                                                              fies
                                                              the
                                                              number
                                                              of
                                                              times
                                                              the
                                                              client
                                                              run-
                                                              time
                                                              iterates
                                                              through
                                                              the

Java EE 5           Last change: 30 Jan 2007                   14

Administration Commands                    create-jms-resource(1)

                                                              AddressList
                                                              in
                                                              an
                                                              effort
                                                              to
                                                              estab-
                                                              lish
                                                              (or
                                                              re-
                                                              establish)
                                                              a
                                                              con-
                                                              nec-
                                                              tion).
                                                              A
                                                              value
                                                              of
                                                              -1
                                                              indi-
                                                              cates
                                                              that
                                                              the
                                                              number
                                                              of
                                                              attempts
                                                              is
                                                              unlim-
                                                              ited.
                                                              Default:
                                                              -1.

                                 You can  specify  the  following
                                 properties   for  a  destination
                                 resource:

                                 Name           (Required)   This
                                                property   speci-
                                                fies the name  of
                                                the physical des-
                                                tination to which
                                                the resource will
                                                refer. You create
                                                a physical desti-
                                                nation  with  the
                                                create-jmsdest
                                                command.

                                 Description    This     property
                                                provides        a
                                                description    of
                                                the      physical

Java EE 5           Last change: 30 Jan 2007                   15

Administration Commands                    create-jms-resource(1)

                                                destination.

OPERANDS
     jndi_name                   The  JNDI  name   of   the   JMS
                                 resource to be created.

EXAMPLES
     Example 1 Creating a JMS  connection  factory  resource  for
     durable subscriptions

     The following command creates a connection factory  resource
     of  type javax.jms.TopicConnectionFactory whose JNDI name is
     jms/DurableTopicConnectionFactory.  The  ClientId   property
     sets a client ID on the connection factory so that it can be
     used for durable subscriptions. The  JNDI  name  for  a  JMS
     resource customarily includes the jms/ naming subcontext.

       asadmin> create-jms-resource --user admin1
       --passwordfile passwords.txt --host pigeon --port 5001
       --restype javax.jms.TopicConnectionFactory --description
       "example of creating a JMS connection factory"
       --property ClientId=MyID jms/DurableTopicConnectionFactory
       Command create-jms-resource executed successfully.

     Example 2 Creating a JMS destination resource

     The following command creates a destination  resource  whose
     JNDI  name  is  jms/MyQueue. The Name property specifies the
     physical destination to which the resource refers.

       asadmin> create-jms-resource --user admin1
       --passwordfile passwords.txt --host pigeon --port 5001
       --restype javax.jms.Queue --property Name=PhysicalQueue jms/MyQueue
       Command create-jms-resource executed successfully.

EXIT STATUS
     0                           command executed successfully

     1                           error in executing the command

Java EE 5           Last change: 30 Jan 2007                   16

Administration Commands                    create-jms-resource(1)

SEE ALSO
     delete-jms-resource(1),    list-jms-resources(1),    create-
     jmsdest(1)

Java EE 5           Last change: 30 Jan 2007                   17

