Overview | Package | Class | Tree | Deprecated | Index | Help
| bea Systems, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## examples.extending
Class ExtendingExample

    java.lang.Object
      |
      +--examples.extending.ExtendingExample

public class ExtendingExample
extends java.lang.Object

This example demonstrates extending a Business Smart Component. For this example, we have taken the theory.smart.axiom.util.AlphaNumericSequencer eBSC and extended it so it produces the sequencer string differently. On the new bean, the counter portion of the sequencer string is in hexadecimal notation. Pay careful attention to what class or interface each of the four class files (interface, home, impl) extends.

See Also:
  `AlphaNumericSequencer`, `AlphaNumericSequencerExtension`, `Item`

Field Summary
`static java.lang.String` | `HOME_NAME`

Constructor Summary
`ExtendingExample()` ExtendingExample constructor.

Method Summary
`void` | `exitExample(java.lang.String message, java.lang.Exception e)` Exit program, displaying the exception
`AlphaNumericSequencerExtension` | `findOrCreateSequencer(java.lang.String sequencerKey)` If the sequencer already exists in DB, this method gets it, otherwise it creates a new sequencer in DB.
`static javax.naming.Context` | `getInitialContext()` Gets an initial context for the current user, password and url.
`static void` | `main(java.lang.String[] argv)`
`boolean` | `run(java.lang.String sequencerKey)` gets a sequencer and displays a 10 of the strings in a row.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### HOME_NAME

    public static final java.lang.String HOME_NAME

Constructor Detail

### ExtendingExample

    public ExtendingExample()

  ExtendingExample constructor.

Method Detail

### exitExample

    public void exitExample(java.lang.String message,
                            java.lang.Exception e)

  Exit program, displaying the exception

### findOrCreateSequencer

    public AlphaNumericSequencerExtension findOrCreateSequencer(java.lang.String sequencerKey)

  If the sequencer already exists in DB, this method gets it, otherwise it creates a new sequencer in DB.
  Parameters:
    `sequencerKey` - java.lang.String
  Returns:
    examples.extending.AlphaNumericSequencerExtension

### getInitialContext

    public static javax.naming.Context getInitialContext()
                                                  throws java.lang.Exception

  Gets an initial context for the current user, password and url.
  Returns:
    Context
  Throws:
    java.lang.Exception - if there is an error in getting the Contex

### main

    public static void main(java.lang.String[] argv)

### run

    public boolean run(java.lang.String sequencerKey)

  gets a sequencer and displays a 10 of the strings in a row.
  Parameters:
    `argv` - java.lang.String

Overview | Package | Class | Tree | Deprecated | Index | Help
| bea Systems, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

© Copyright 2000 bea Systems, Inc. All rights reserved.