Common function

Hello,
We can use stored procedure and function in many application. This reduce the time of coding same procedure and function at application label.And there are so many advanteges of stored procedure and functions.
How to add user procedure or funtion to oracle library?

Where are these DBMS_STANDARD Package stored?STANDARD and DBMS_STANDARD are owned by SYS. If you DESC them you will recognise their methods.
Where Can I get the reference for these packages?The "documentation" for these pacakges is of course the SQL Reference.
Please do not even think about trying to change these packages. They are actually interfaces to C programs in the kernel. Tooling around with them will probably break your database. It will definitely invalidate any support contract you may have (although given you're using Oracle7 this last pointis entirely hypothetical).
/oracle7/lib
What does this directory have?A whole bunch of C libraries (and Java in more advanced versions of the database). This is the Oracle kernel code. Again, touch this lot at your peril.
Cheers, APC

Similar Messages

  • How can we create a common function for 2 or more java card applets?

    I have 2 java card applets. They use one common function. But i don't know how to set up it. Anybody knows it, please help me. Please show me step by step to do it. Thank you.

    When insert below line of code in the Test_Class_1.java and Test_Class_2, the Project will be failed:
    byte aP1 = Test_common_function.GetP1((byte)0x02);
    byte aP1 = Test_common_function.GetP1((byte)0x01);
    Here is the source code:
    Test_Class_2.java
    package Test_Class_2;
    import Test_common_function.Test_common_function;
    import javacard.framework.APDU;
    import javacard.framework.Applet;
    public class Test_Class_2 extends Applet
       public static void install(byte[] bArray, short bOffset, byte bLength)
          // GP-compliant JavaCard applet registration
          new Test_Class_2().register(bArray, (short) (bOffset + 1),
                bArray[bOffset]);
       public void process(APDU apdu)
          byte aP1 = Test_common_function.GetP1((byte)0x02);
    }Test_Class_1.java
    package Test_Class_1;
    import Test_common_function.Test_common_function;
    import javacard.framework.APDU;
    import javacard.framework.Applet;
    public class Test_Class_1 extends Applet
       public static void install(byte[] bArray, short bOffset, byte bLength)
          // GP-compliant JavaCard applet registration
          new Test_Class_1().register(bArray, (short) (bOffset + 1),
                bArray[bOffset]);
       public void process(APDU apdu)
          byte aP1 = Test_common_function.GetP1((byte)0x02);
    }Test_common_function.java
    package Test_common_function;
    import javacard.framework.APDU;
    import javacard.framework.ISO7816;
    import javacard.framework.Applet;
    import javacard.framework.ISOException;
    public class Test_common_function extends Applet
       public static void install(byte[] bArray, short bOffset, byte bLength)
          // GP-compliant JavaCard applet registration
          new Test_common_function().register(bArray,
                (short) (bOffset + 1), bArray[bOffset]);
       public void process(APDU apdu)
          // Good practice: Return 9000 on SELECT
          if (selectingApplet())
             return;
          byte[] buf = apdu.getBuffer();
          switch (buf[ISO7816.OFFSET_INS])
             case (byte) 0x00:
                break;
             default:
                // good practice: If you don't know the INStruction, say so:
                ISOException.throwIt(ISO7816.SW_INS_NOT_SUPPORTED);
       public static byte bP1_Class1 = (byte)0x90;
       public static byte bP1_Class2 = (byte)0x90;
       public static byte GetP1(byte idclass)
          return idclass == (byte)0x01? bP1_Class1:bP1_Class2;
    }and here is the trace log (in case of failure)
    cm>  /term "Remote|localhost:60351"
    --Opening terminal
    /card -a a000000003000000 -c com.ibm.jc.CardManagerresetCard with timeout: 0 (ms)
    --Waiting for card...
    ATR=3B F8 13 00 00 81 31 FE 45 4A 43 4F 50 76 32 34    ;.....1.EJCOPv24
        31 B7                                              1.
    IOCTL().
    ATR:
             T = 1                  
    => 00 A4 04 00 08 A0 00 00 00 03 00 00 00 00          ..............
    (578768 nsec)
    <= 6F 65 84 08 A0 00 00 00 03 00 00 00 A5 59 9F 65    oe...........Y.e
        01 FF 9F 6E 06 47 91 01 17 33 00 73 4A 06 07 2A    ...n.G...3.sJ..*
        86 48 86 FC 6B 01 60 0C 06 0A 2A 86 48 86 FC 6B    .H..k.`...*.H..k
        02 02 01 01 63 09 06 07 2A 86 48 86 FC 6B 03 64    ....c...*.H..k.d
        0B 06 09 2A 86 48 86 FC 6B 04 02 15 65 0B 06 09    ...*.H..k...e...
        2B 85 10 86 48 64 02 01 03 66 0C 06 0A 2B 06 01    +...Hd...f...+..
        04 01 2A 02 6E 01 02 90 00                         ..*.n....
    Status: No Error
    cm>  set-key 255/1/DES-ECB/404142434445464748494a4b4c4d4e4f 255/2/DES-ECB/404142434445464748494a4b4c4d4e4f 255/3/DES-ECB/404142434445464748494a4b4c4d4e4f
    cm>  init-update 255
    => 80 50 00 00 08 37 0D D8 24 C9 C8 32 53 00          .P...7..$..2S.
    (1829 usec)
    <= 00 00 DE 81 34 18 39 B7 09 70 FF 02 00 00 3D 02    ....4.9..p....=.
        9C 31 C7 89 7A 8E 57 44 05 A7 67 C7 90 00          .1..z.WD..g...
    Status: No Error
    cm>  ext-auth plain
    => 84 82 00 00 10 D8 BE 91 A3 94 E8 34 18 42 28 F6    ...........4.B(.
        74 EE 50 06 29                                     t.P.)
    (1683 usec)
    <= 90 00                                              ..
    Status: No Error
    cm>  delete -r 01020304050102
    => 80 E4 00 80 09 4F 07 01 02 03 04 05 01 02 00       .....O.........
    (833593 nsec)
    <= 6A 88                                              j.
    Status: Reference data not found
    jcshell: Error code: 6a88 (Reference data not found)
    jcshell: Wrong response APDU: 6A88
    Ignoring expected error
    cm>  delete -r 01020304050103
    => 80 E4 00 80 09 4F 07 01 02 03 04 05 01 03 00       .....O.........
    (769014 nsec)
    <= 6A 88                                              j.
    Status: Reference data not found
    jcshell: Error code: 6a88 (Reference data not found)
    jcshell: Wrong response APDU: 6A88
    Ignoring expected error
    cm>  delete -r 010203040501
    => 80 E4 00 80 08 4F 06 01 02 03 04 05 01 00          .....O........
    (734456 nsec)
    <= 6A 88                                              j.
    Status: Reference data not found
    jcshell: Error code: 6a88 (Reference data not found)
    jcshell: Wrong response APDU: 6A88
    Ignoring expected error
    cm>  upload -c -d -b 250 "D:\WorkSpace\Test_Common_Funcation\bin\Test_common_function\javacard\Test_common_function.cap"
    => 80 E6 02 00 13 06 01 02 03 04 05 01 08 A0 00 00    ................
        00 03 00 00 00 00 00 00 00                         .........
    (1864 usec)
    <= 00 90 00                                           ...
    Status: No Error
    Start loading Header.cap (44 byte)
    => 80 E8 00 00 2C C4 82 03 E3 01 00 25 DE CA FF ED    ....,......%....
        02 02 04 00 01 06 01 02 03 04 05 01 14 54 65 73    .............Tes
        74 5F 63 6F 6D 6D 6F 6E 5F 66 75 6E 63 74 69 6F    t_common_functio
        6E 00                                              n.
    (1607 usec)
    <= 00 90 00                                           ...
    Status: No Error
    Header.cap loaded (44 byte)
    Start loading Directory.cap (36 byte)
    => 80 E8 00 01 24 02 00 21 00 25 00 21 00 0C 00 0B    ....$..!.%.!....
        00 26 00 0E 00 4C 00 0C 00 0D 00 00 00 6F 02 5D    .&...L.......o.]
        00 02 00 00 00 00 01 01 00 00                      ..........
    (1368 usec)
    <= 00 90 00                                           ...
    Status: No Error
    Directory.cap loaded (36 byte)
    Start loading Import.cap (14 byte)
    => 80 E8 00 02 0E 04 00 0B 01 03 01 07 A0 00 00 00    ................
        62 01 01 00                                        b...
    (1096 usec)
    <= 00 90 00                                           ...
    Status: No Error
    Import.cap loaded (14 byte)
    Start loading Applet.cap (15 byte)
    => 80 E8 00 03 0F 03 00 0C 01 08 01 02 03 04 05 01    ................
        01 01 00 08 00                                     .....
    (1188 usec)
    <= 00 90 00                                           ...
    Status: No Error
    Applet.cap loaded (15 byte)
    Start loading Class.cap (17 byte)
    => 80 E8 00 04 11 06 00 0E 00 00 00 80 03 00 FF 00    ................
        07 01 00 00 00 1C 00                               .......
    (1457 usec)
    <= 00 90 00                                           ...
    Status: No Error
    Class.cap loaded (17 byte)
    Start loading Method.cap (79 byte)
    => 80 E8 00 05 4F 07 00 4C 00 01 10 18 8C 00 02 7A    ....O..L.......z
        05 30 8F 00 08 3D 8C 00 00 18 1D 04 41 18 1D 25    .0...=......A..%
        8B 00 01 7A 02 21 18 8B 00 06 60 03 7A 19 8B 00    ...z.!....`.z...
        04 2D 1A 04 25 73 00 09 00 00 00 00 00 0F 11 6D    .-..%s.........m
        00 8D 00 07 7A 02 10 1C 04 6B 07 7C 00 03 70 05    ....z....k.|..p.
        7C 00 05 78 00                                     |..x.
    (1101 usec)
    <= 00 90 00                                           ...
    Status: No Error
    Method.cap loaded (79 byte)
    Start loading StaticField.cap (15 byte)
    => 80 E8 00 06 0F 08 00 0C 00 02 00 00 00 00 00 00    ................
        00 02 90 90 00                                     .....
    (1069 usec)
    <= 00 90 00                                           ...
    Status: No Error
    StaticField.cap loaded (15 byte)
    Start loading ConstantPool.cap (41 byte)
    => 80 E8 00 07 29 05 00 26 00 09 06 00 00 01 03 80    ....)..&........
        03 02 06 80 03 00 05 00 00 00 03 80 0A 01 05 00    ................
        00 01 03 80 03 03 06 80 07 01 01 00 02 00 00       ...............
    (3134 usec)
    <= 00 90 00                                           ...
    Status: No Error
    ConstantPool.cap loaded (41 byte)
    Start loading RefLocation.cap (16 byte)
    => 80 E8 00 08 10 09 00 0D 00 00 00 09 05 06 04 0A    ................
        07 07 13 0A 05 00                                  ......
    (2067 usec)
    <= 00 90 00                                           ...
    Status: No Error
    RefLocation.cap loaded (16 byte)
    Start loading Descriptor.cap (114 byte)
    => 80 E8 00 09 72 0B 00 6F 01 00 01 00 02 00 00 02    ....r..o........
        00 04 00 09 00 00 00 80 03 01 09 00 00 01 80 03    ................
        00 81 00 01 00 14 00 05 00 00 00 00 01 09 00 08    ................
        00 16 00 12 00 00 00 00 07 01 00 1C 00 19 00 1F    ................
        00 00 00 00 02 09 00 3D 00 1D 00 0D 00 00 00 00    .......=........
        00 09 00 14 00 16 00 14 00 1F 00 21 00 1F 00 23    ...........!...#
        00 25 FF FF 01 10 04 B4 31 06 68 00 A1 02 33 01    .%......1.h...3.
        30 01 B0 01 20 02 41 00                            0... .A.
    (1344 usec)
    <= 00 90 00                                           ...
    Status: No Error
    Descriptor.cap loaded (114 byte)
    Start loading Debug.cap (608 byte)
    => 80 E8 00 0A FA 0C 02 5D 00 1A 00 29 54 65 73 74    .......]...)Test
        5F 63 6F 6D 6D 6F 6E 5F 66 75 6E 63 74 69 6F 6E    _common_function
        2F 54 65 73 74 5F 63 6F 6D 6D 6F 6E 5F 66 75 6E    /Test_common_fun
        63 74 69 6F 6E 00 19 6A 61 76 61 63 61 72 64 2F    ction..javacard/
        66 72 61 6D 65 77 6F 72 6B 2F 41 70 70 6C 65 74    framework/Applet
        00 19 54 65 73 74 5F 63 6F 6D 6D 6F 6E 5F 66 75    ..Test_common_fu
        6E 63 74 69 6F 6E 2E 6A 61 76 61 00 0A 62 50 31    nction.java..bP1
        5F 43 6C 61 73 73 31 00 01 42 00 0A 62 50 31 5F    _Class1..B..bP1_
        43 6C 61 73 73 32 00 06 3C 69 6E 69 74 3E 00 03    Class2..<init>..
        28 29 56 00 04 74 68 69 73 00 2B 4C 54 65 73 74    ()V..this.+LTest
        5F 63 6F 6D 6D 6F 6E 5F 66 75 6E 63 74 69 6F 6E    _common_function
        2F 54 65 73 74 5F 63 6F 6D 6D 6F 6E 5F 66 75 6E    /Test_common_fun
        63 74 69 6F 6E 3B 00 07 69 6E 73 74 61 6C 6C 00    ction;..install.
        07 28 5B 42 53 42 29 56 00 06 62 41 72 72 61 79    .([BSB)V..bArray
        00 02 5B 42 00 07 62 4F 66 66 73 65 74 00 01 53    ..[B..bOffset..S
        00 07 62 4C 65 6E 67 74 68 00 07 70 72 6F 63 00    ..bLength..proc.
    (937268 nsec)
    <= 00 90 00                                           ...
    Status: No Error
    => 80 E8 00 0B FA 65 73 73 00 1C 28 4C 6A 61 76 61    .....ess..(Ljava
        63 61 72 64 2F 66 72 61 6D 65 77 6F 72 6B 2F 41    card/framework/A
        50 44 55 3B 29 56 00 04 61 70 64 75 00 19 4C 6A    PDU;)V..apdu..Lj
        61 76 61 63 61 72 64 2F 66 72 61 6D 65 77 6F 72    avacard/framewor
        6B 2F 41 50 44 55 3B 00 03 62 75 66 00 05 47 65    k/APDU;..buf..Ge
        74 50 31 00 04 28 42 29 42 00 07 69 64 63 6C 61    tP1..(B)B..idcla
        73 73 00 14 54 65 73 74 5F 63 6F 6D 6D 6F 6E 5F    ss..Test_common_
        66 75 6E 63 74 69 6F 6E 00 19 00 01 00 00 00 01    function........
        00 02 00 01 00 02 00 00 02 00 04 00 03 00 04 00    ................
        09 00 00 00 00 00 05 00 04 00 09 00 00 00 01 00    ................
        06 00 07 00 01 00 01 02 00 05 00 01 00 01 00 00    ................
        08 00 09 00 00 00 05 00 00 00 04 00 0F 00 0A 00    ................
        0B 00 09 00 08 02 00 12 00 03 00 04 00 00 0C 00    ................
        0D 00 00 00 12 01 00 0E 00 0F 00 00 00 12 02 00    ................
        10 00 04 00 00 00 12 00 00 00 07 00 14 00 08 00    ................
        0D 00 15 00 0E 00 10 00 14 00 11 00 11 00 16 00    ................
    (785421 nsec)
    <= 00 90 00                                           ...
    Status: No Error
    => 80 E8 80 0C 6C 00 11 00 12 00 01 00 1C 02 00 1F    ....l...........
        00 03 00 06 00 00 08 00 09 00 00 00 1F 01 00 13    ................
        00 14 00 00 00 1F 02 00 15 00 0D 00 0C 00 13 00    ................
        00 00 05 00 1B 00 06 00 06 00 1D 00 07 00 0B 00    ................
        20 00 0C 00 17 00 21 00 18 00 1D 00 27 00 1E 00     .....!.....'...
        1E 00 29 00 16 00 17 00 09 00 3D 02 00 0D 00 01    ..).......=.....
        00 01 00 00 18 00 04 00 00 00 0D 00 00 00 0C 00    ................
        2F 00                                              /.
    (1986 usec)
    <= 00 90 00                                           ...
    Status: No Error
    Debug.cap loaded (608 byte)
    Load report:
      999 bytes loaded in 0.0 seconds
      effective code size on card:
          + package AID       6
          + applet AIDs       15
          + classes           17
          + methods           79
          + statics           2
          + exports           0
            overall           119  bytes
    cm>  install -i 0102030405010101  -q C9#() 010203040501 0102030405010101
    => 80 E6 0C 00 1F 06 01 02 03 04 05 01 08 01 02 03    ................
        04 05 01 01 01 08 01 02 03 04 05 01 01 01 01 00    ................
        02 C9 00 00 00                                     .....
    (2346 usec)
    <= 00 90 00                                           ...
    Status: No Error
    cm>  upload -c -d -b 250 "D:\WorkSpace\Test_Common_Funcation\bin\Test_Class_2\javacard\Test_Class_2.cap"
    jcshell: Cannot read <D:\WorkSpace\Test_Common_Funcation\bin\Test_Class_2\javacard\Test_Class_2.cap>: java.io.FileNotFoundException: D:\WorkSpace\Test_Common_Funcation\bin\Test_Class_2\javacard\Test_Class_2.cap (The system cannot find the path specified)
    cm>  install -i 0102030405010303  -q C9#() 01020304050103 0102030405010303
    => 80 E6 0C 00 20 07 01 02 03 04 05 01 03 08 01 02    .... ...........
        03 04 05 01 03 03 08 01 02 03 04 05 01 03 03 01    ................
        00 02 C9 00 00 00                                  ......
    (1231 usec)
    <= 6A 88                                              j.
    Status: Reference data not found
    jcshell: Error code: 6a88 (Reference data not found)
    jcshell: Wrong response APDU: 6A88
    Unexpected error; aborting executionThank very much!
    Edited by: WhoKnows on Apr 20, 2012 9:32 PM

  • Common Functional Location Question

    Hi
    In my Clients senario there are many functional locations. Now in his functional locations the work is carried out by various Maintenace Groups like ELE / MEC / INST.
    All these Departments have there Own Work Centres & Cost Centres. Now the problem is
    1. What costcentre is to be maintained in functiona location master. ( Coz order are created on these common functional locations) what does SAP Recomends.
    2. The requirements is that if Electrical Depatment creates an Order on these locations then the Cost to be captured in Electrical department cost centre similarly for other departments.
    regards
    Sabyasachi

    Hi Pete
    I went across some of the customer sites, where they are using SAP PM....
    According to the Question of this thread...
    They dont have different cost center or work center... they have only one cost center and one Work center...
    All the maintenance cost (ELE,MECH or INST) will be clubbed into one Cost center and it is assigned to the G/L accoutn....
    Work center also common.... Since its all internal cost comes from the work center for the employees.. they said... the cost is common for all..
    But... this scenario is different from others.. like Separate cost center or work center...
    Once the notification is created... the person.. should know, who is gonna take the job... if its mech or elec or both... there is a issue in criticality of the work ur gonna take.. if its a shaft problem.. then its purely mech.. if its motor problem its elect... even though both the depts have work.. but some one will have high criticality... he has to use the particular work center.,,,
    Then in the order... u need to enter the operations with different work centers... so u will be getting the cost of both the work center...
    For equipment, i think one cost center is enough.. since it will take all the cost... sinc ein one order u cannot give two or three cost centers... am i rite....
    - Pithan

  • How to create a common function in Sqlserver to get Effective working hours of employee

    Hi
    The following is the logic applied in the application , But I want to create an server function , Pls help
    adc_opening  is starting time and   is an argument 1
    adc_break is finishing time and   is an argument 2
    adc_break is breake time and   is an argument 3
    My  Existing logic is  given below, I want to create sqlserver function , to replace the given logic. Please help
    long ll_opening_in_minutes, ll_closing_in_minutes, ll_break_in_minutes, ll_effective_in_minutes
    decimal {2} ldc_result
    ll_opening_in_minutes = truncate(adc_opening, 0) * 60 + (adc_opening - truncate(adc_opening, 0)) * 100
    ll_closing_in_minutes = truncate(adc_closing, 0) * 60 + (adc_closing - truncate(adc_closing, 0)) * 100
    // If the closing time is on the next day, add 24 hours to the value
    if ll_closing_in_minutes < ll_opening_in_minutes then ll_closing_in_minutes += 24 * 60
    ll_break_in_minutes = truncate(adc_break, 0) * 60 + (adc_break - truncate(adc_break, 0)) * 100
    // Use max function to disallow negative results
    ll_effective_in_minutes = Max(ll_closing_in_minutes - ll_opening_in_minutes - ll_break_in_minutes, 0)
    ldc_result = truncate(ll_effective_in_minutes / 60, 0) + mod(ll_effective_in_minutes, 60) / 100
    return ldc_result
    polachan

    That is not datetime information, the argument of the function 
    adc_opening = 8.30
    adc_break = 1.00
     adc_closing = 17.30
    I want to get net hours  ( 8.30 - 17.30 ) - 1.00 . The result minutes  part
     should be shown like 
    if .75  should be shown as .45.  if .50 should be shown as .30  , if  .25  as
    .15. 
    I cannot give datediff function because the argument will not be  the date , its like decimal  
    as I given above.
    Any idea
    polachan
    isnt it enough to multiply by 0.6?
    0.75 * 0.6 = 0.45
    0.5 * 0.6 = 0.3 etc
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • Put common functionality in EJB or not?

    There is a java program at my job which generates an HTML form "<form>...</form>" based on some criteria it received. This program is written as Stateless Session Bean. Lets call it "HTML Form Generator".
    Now the module I am working on needs to call the "HTML Form Generator". My module has couple of Stateless Session Beans from where I needs to call the "HTML Form Generator".
    Right now I am doing EJB to EJB call which is giving me the following warning in JBoss:
    11:13:02,070 WARN [TxConnectionManager] Prepare called on a local tx. Use of local transactions on a jta transaction with more than one branch may result in inconsistent data in some cases of failure.
    Any way to resolve this issue? I am thinking that the "HTML Form Generator" dont have to be in an EJB. Instead it can be in normal classes. What advantages I going to loose any thing if I recommend this approach?
    Thanks

    We have some rules which I cannot clasify whether
    they belong in business layer or presentationlayer.
    For example I have a rule that if the Status of arow
    displayed is "Approved" or "Not Approved" thenmake
    the whole row read-only. Now it appears to me a
    business rule but the businees layer is sendingDTOs
    to presentation layer. How can I sepcify suchtypes
    of rule so that presentation layer knows what todo?
    In your DTO bean, put in a method isReadOnly(). Your
    business layer sets the value, and your view layer
    interprets it and acts accordingly.Thanks. This makes sense. But there are some times complex rules: like if control 1's value is A then the control 2's value can only be C,D else X,Y,Z. OR if the User is not a Manager then hide the employee's Baes Rate. Stuff like that.
    If one property in DTO bean represents one column of the web page then there can be potentially numerous proprties of that column. Does that mean every property in DTO bean is another class?
    Another concern I have is how the DTO will match up with the HTML. Let me explain:
    Suppose we have two different test cases: one is Employee and another one is Shift. We create EmployeeDTO and Shift DTO.
    The business layer will create Lists of specific DTO type. So in 1st test case the business layer will return a List of EmployeeDTO type. In 2nd test case the business layer will return a List of ShiftDTO type.
    Suppose the HTML Generator class have 1 method to generate HTML:
    public String generateHTML(String pageName, List list);
    where pageName is the name of the Page as defined in the database. Now I have 2 concerns:
    1) how to know that which control in database belongs to which property in class?
    2) when looping through the List and converting it to specific type will be a problem. How will i know that i have to convert to EmployeeDTO in first test case and ShiftDTO in second test case?
    Thanks

  • Accessing Common functionality from multiple parts of my web app

    I have a web app and one of the modules is getting used by other modules in the application.
    This was ok when we had 2 modules accessing this module but now we are adding more and more.
    The module consists of JSP and Servlets and Backend DAO's.
    Right now I have special cases (if statements) that determine what module is accessing this module (each module passes in it id in the URL for example testId, correctionId.
    Basically what this module creates can be assoicated with other modules, so the DAO will save and then check to see if certian module ids are present and then does a save based on that.
    I dont think this solution is very elegent and I was wondering if anyone had any suggestions on a good way to design this module so it can be easily accessed from other modules in my application.
    So to summerize:
    All my modules are JSP/Servlet/DAO/Model Code
    One of my Modules is accessed from many other modules.
    When this module saves its data to the database, it has to take the id that the calling module passsed into it and determine what database bridge table it should save to.
    I want to if anyone has any suggestions on how to design this so allowing more modules to access this module will not require anot of extra code in the module.
    Thank you,
    Al

    Hello Al,
    Use DAO Pattern.
    Have a Factory Class which determines which DAO object it instantiates and hands it over to the Servlet.
    Based on the ID, Create the instance object of the DAO and have an interface which has the contract method.
    What I mean is :
    For Example lets say u have a Interface "ModuleDAO". Have a method "persistData"...
    Create 2 DAO Implementations which implement the same Interface and both will have their own "persistData" implementation going to the respective Tables. The reason why I am recommending multiple DAO implementation is to avoid If else / etc and complex coding.The implementations are independant of each other.
    Have a DAO Factory [or you can use Spring Framework Bean Factory] infront and have your servlet request for the DAO Implemntation based on the ID.
    Your servlet should have NO reference to the Internal Implementation which is being retuirned. It only need to know about the Interface. This way code is clean, decoupled from logic and easier if you want to move the logic out to EJB / External WebServices, etc...
    Hope this helps.
    By this way, you are exercising all "Factory, DAO and Bridge" Design Patterns.
    Thanks,
    Pazhanikanthan. P

  • How do I notify Apple of a software failure:  in Win 7 64 bit, using Get Info function causes iTunes 10.5 to fail and exit?

    I have Win7 64 bit running iTunes 10.5. When I import a CD and click on the "Get Info" context menu item for the CD drive item on the left side of the window, the expected context menu and input boxes appear. When I type anything into any of the available input boxes, iTunes immediately throws a fail exit to Windows. Here are relevant screen shots:
    Right click on CD Device item to get context menu:
    Click on Get Info menu item to open CD Info window:
    Key in "A" in Artist input box, get immediate failure:
    So far Microsoft hasn't notified me of any solutions to this failure.
    This info needs to get to Apple, but I am not paying to give them information to fix their problems!
    Thanks for passing this along.
    D. V. Hirst
    PS:  As a work around, I can highlight the entire CD worth of tracks and edit the common information in the Get Info function at that level...  Still, iTunes should not be throwing program failure exceptions in any case.  It is especially annoying on such common functions.  One might have expected a more thorough testing program prior to general release.
    DVH

    Thanks for your response. I attempted to do that, but I couldn't find any way to access the configuration for the Zhone router. Typing the IP address into my web browser's address bar only resulted in "page could not be found" or "page timed out", etc. I called tech support at Northstate, who likewise suggested that the Zhone router should be set to bridge mode and the AEBS set to router mode since it would be easier for me to configure the AirPort. After wrangling a bit with them over my inability to change any settings for the Zhone, they sent a technician over. He messed around with the Zhone, apparently putting it in bridge mode, and we managed to get the AirPort to work without any double NAT errors. I reset the AirPort and created a new configuration file. Unfortunately, when I went to the Advanced/Port Mapping menu and repeated the original steps to forward port 7777, tests at www.whatsmyip.org still returned "timed out". The technician said he wasn't knowledgable enough about Apple products to assist me any further and suggested I call their tech support or visit the nearest Genius Bar. So that's about it. Any other ideas?

  • Issue with Multivalue report parameters optional functionality

    I am using SSRS 2012 reporting services to develop my SSRS report. I came across that I cannot have multi-value parameters as optional. In a report I have 5 parameters and 3 parameters (Invoice Type, Markupcode, Accountnum has multivalue selection so user
    can select mutltiple accountnum or codes to get data). There is no option you can choose Allow null value. I went through various forums but unable to get worked. So I created this question. I am not doing any complex functionality, its very common functionality.
    In the past I have used various reporting tools and never came across this issue. so please help here. I appreciate all your kind help. thanks.
    Regards
    Nitin

    Hi Nitin,
    As per my understanding, it seems that you want to build a multi-value parameter including the NULL value. By default, when we configure the parameter with the two options: Allow null value and Allow multiple values, we will receive an error message. To
    work around this issue, we can use the ISNULL function to change null values to blank values (''). For more details, please refer to the following steps:
    1. Modify the dataset used to retrieve data for the tablix like below:
    SELECT id, invoiceType, markupCode, AccountNum FROM table WHERE ISNULL(invoiceType, '') IN (@InvoiceType)
    2. Modify the dataset used to retrieve values for @InvoiceType like below:
    SELECT DISTINCT ISNULL(invoiceType, '') AS invoice, ISNULL(invoiceType, 'NULL') AS InvoiceDescription FROM table
    3. Modify parameter @InvoiceType, check Allow blank values ('') and Allow multiple values check boxes. Change the available values: Value field: @Invoice, Label field: InvoiceDescription.
    The following screenshot is for your reference:
    If you have any more questions, please feel free to ask.
    Thanks,
    Wendy Fu

  • I no longer have any toolbars, address bar or any access to any usual functions. How can I restore these functions in my browser?

    All functions are gone from the top of my browser - no menu bar, no tool bars of any kind, no address bar... nothing. Right click or left click - nothing to use. How can I restore these common functions?

    '''F11''' to get you out of FullScreen mode?
    If you hid the Menu bar and the Navigation bar - hit the '''Alt''' key to show the Menu bar, then open View > Toolbars and select Menu bar, so it has a check-mark.

  • Best practice for read-only functionality

    Hi,
    I'm part of the development team of a system with about 100 screens. The customer would like us to add some read-only functionality to the system, so that certain users are able to access the screens but not change any of the data on them. We already have policies in place on the database level that keeps read-only users from saving data, but it's not very user friendly to allow users to change data on a screen, only to tell them that they're not allowed to save those changes once they try to do so. It would clearly be better if all components are rendered as read-only components for read-only users, making them unable to make any data changes in the first place.
    User privileges in the system are controlled by roles defined and set in the system (not ADF roles or Weblogic roles). At any given time and place, it's possible to check whether the current user has a certain role. We already use this in a number of places to make it possible to control which user has access to which screens. In a few places we even control which functionality should be enabled for the current user within a screen, but mostly the access control is currently on the screen level. With read-only users getting access to all screens, it seems we will need lot of extra in-screen access control to keep these users from changing anything.
    But what's the best practice here? One way to go would be to add some logic to every single active component on every single screen, to determine whether it should be rendered as active or disabled/read-only. But that would require a lot of extra coding.
    So my question is: Is there a smarter way to do this? Maybe something done through skinning? Or something else?
    (I'm not sure how relevant this is for this sort of question, but we're currently using JDev 11.1.1.4.0, and expect to upgrade to 11.1.1.6.0 within the next 6 months)
    Best regards,
    Andreas

    Hi Guna, Puthanampatti and Don,
    Thanks a lot for your replies. I'm currently looking into implementing something along the lines of what Guna has suggested:
    Our application consists of a number of individual work spaces that are deployed as adflibs which have all been added to a "master application work space", and the master application is deployed as an .ear file. Most of the individual work spaces are for all the different functional areas of the application, with their own task flows, page fragments etc. The rest are work spaces with common functionality, like datamodel (entity definitions), utility methods, page templates, and framework extensions. In the latter, we have defined custom classes for all the base classes (somewhat similar to what Don describes, I believe).
    In our custom class for ViewRowImpl, I have added an isAttributeUpdateable method, and in our custom class for ApplicationModuleImpl I have added an isReadOnlyUser method. The isAttributeUpdateable method uses the isReadOnlyUser method to determine if the current user is a read-only user or not; if the user is a read-only user the isAttributeUpdateable method will return false, otherwise true. The isReadOnlyUser method in our base class is just a dummy method that always returns true. But in the ApplicationModuleImpl classes of our individual work spaces, i've written an override for isReadOnlyUser, giving the answer that is relevant for the work space in question (for instance, whether or not the current user has the role "User Administrator").
    That pretty much takes care of all input fields in tables and forms, which is a big step in the right direction. This still leaves some work to be done for components that are not directly linked to view object attributes (like buttons), but I guess that can't be helped. Also, there are a few of the work spaces that contain a number of pages that are related to different user privileges (as in: page 1 requires user privilege A, and page 2 requires user privilege B); in these cases I will have to do something different than just writing an override in the "local" ApplicationModuleImpl class.
    @Don: What you describe seems to be pretty close in functionality to what we already have, though your implementation is different from ours. You have used your custom base ApplicationModuleImpl class to keep read-only users from committing changes. We use Virtual Private Database and database policies to the same end: If a user without the required full-access role tries to commit data it will cause a database error, which we then handle in the application (so the user gets a message like "You don't have the required privileges to changes this data", rather than an ORA message). Unfortunately, our customers are not content with this. They want a solution where all input fields and most of the buttons etc. are disabled for read-only users, and that's why I'm looking into the best/smartest way to do this.
    @Puthanampatti: We already use something similar to what you're suggesting. The challenge I'm currently facing is how best to disable/enable components based on the current user's roles, not how to determine and store those roles.
    Best regards,
    Andreas

  • Functions used in Java mapping

    hi
    If anybody has worked on Java mapping, Can anybody tell me the common functions that are used in Java mapping along with some examples
    Also how java mapping is more useful as compared to XSLT and ABAP mapping, when to use java mapping and some demo example on java mapping if available
    Thanks & regards,
    Loveena.

    Hi Loveena
    refer these Blogs for Step-via step for java mapping
    /people/alessandro.guarneri/blog/2007/03/25/xi-java-mapping-helper-dom
    http://help.sap.com/saphelp_nw04/helpdata/en/e2/e13fcd80fe47768df001a558ed10b6/frameset.htm
    <b>Java Mapping (Part I)</b>
    /people/prasad.ulagappan2/blog/2005/06/29/java-mapping-part-i
    /people/prasad.ulagappan2/blog/2005/06/29/java-mapping-part-i
    /people/prasad.ulagappan2/blog/2005/06/29/java-mapping-part-ii
    /people/prasad.ulagappan2/blog/2005/06/29/java-mapping-part-iii
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/xi/javaMappingusingDOMParser&
    /people/alessandro.guarneri/blog/2007/03/25/xi-java-mapping-helper-dom
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/snippets/binary%2bconversion%2bin%2bxi%2b-%2bjava%2bmapping
    JAVA Mapping :If you have complex mapping in your scenarios and also some times if you have more than 100 field to map then better to choose the JAVA MApping
    Java Mapping uses 2 types of parsers. DOM and SAX. DOM is easier to use with lots of classes to help you create nodes and elements, but, DOM is very processor intensive.
    SAX parser is something that parses your XML one after the other, and so is not processor intensive. But, it is not exactly easy to develop either.
    DOM and SAX are APIs
    In NWDS we have to develop the mapping and create jar and archieve and import it under Iported archieved in IR. this can be used in Interface mapping.
    See the below links so that you can have screen shots,...
    Java Mapping
    /people/prasad.ulagappan2/blog/2005/06/29/java-mapping-part-i
    /people/prasad.ulagappan2/blog/2005/06/29/java-mapping-part-ii
    /people/prasad.ulagappan2/blog/2005/06/29/java-mapping-part-iii
    Re: java ,abap and XSLT mapping
    Re: java ,abap and XSLT mapping
    Re: When to Use XSLT,Java or Graphical Mapping
    mapping
    Testing and Debugging Java Mapping -/people/stefan.grube/blog/2006/10/23/testing-and-debugging-java-mapping-in-developer-studio
    Thanks !!
    Regards
    Abhishek Agrahari

  • How to use contains() function in bpel?

    Hi
    Am facing a problem in using contains() function in a switch case... my condition inside a switch case is contains(bpws:getVariableData('singleSIS'),bpws:getVariableData('singleSIS_check')) where the variable 'singleSIS' has a value 'ABCDE' and 'singleSIS_check' has a value 'ABCDE' ... Ideally this condition should return true,but its not happening..Can someone tell me what is the issue with this ?
    P.S both the variables are of string type. Please help me with this..

    Sure:
    <?xml version = "1.0" encoding = "UTF-8" ?>
    <!--
    Oracle JDeveloper BPEL Designer
    Created: Fri Apr 06 12:41:59 IDT 2012
    Author: DELL
    Purpose: Asynchronous BPEL Process
    -->
    <process name="BPELProcess1"
    targetNamespace="http://xmlns.oracle.com/SodaDev_jws/Project4/BPELProcess1"
    xmlns="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
    xmlns:client="http://xmlns.oracle.com/SodaDev_jws/Project4/BPELProcess1"
    xmlns:ora="http://schemas.oracle.com/xpath/extension"
    xmlns:bpelx="http://schemas.oracle.com/bpel/extension"
    xmlns:bpws="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
    xmlns:xp20="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.Xpath20"
    xmlns:mhdr="http://www.oracle.com/XSL/Transform/java/oracle.tip.mediator.service.common.functions.MediatorExtnFunction"
    xmlns:bpel2="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
    xmlns:oraext="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.ExtFunc"
    xmlns:dvm="http://www.oracle.com/XSL/Transform/java/oracle.tip.dvm.LookupValue"
    xmlns:hwf="http://xmlns.oracle.com/bpel/workflow/xpath"
    xmlns:med="http://schemas.oracle.com/mediator/xpath"
    xmlns:ids="http://xmlns.oracle.com/bpel/services/IdentityService/xpath"
    xmlns:bpm="http://xmlns.oracle.com/bpmn20/extensions"
    xmlns:xdk="http://schemas.oracle.com/bpel/extension/xpath/function/xdk"
    xmlns:xref="http://www.oracle.com/XSL/Transform/java/oracle.tip.xref.xpath.XRefXPathFunctions"
    xmlns:bpmn="http://schemas.oracle.com/bpm/xpath"
    xmlns:socket="http://www.oracle.com/XSL/Transform/java/oracle.tip.adapter.socket.ProtocolTranslator"
    xmlns:ldap="http://schemas.oracle.com/xpath/extension/ldap">
    <!--
    PARTNERLINKS
    List of services participating in this BPEL process
    -->
    <partnerLinks>
    <!--
    The 'client' role represents the requester of this service. It is
    used for callback. The location and correlation information associated
    with the client role are automatically set using WS-Addressing.
    -->
    <partnerLink name="bpelprocess1_client" partnerLinkType="client:BPELProcess1" myRole="BPELProcess1Provider" partnerRole="BPELProcess1Requester"/>
    </partnerLinks>
    <!--
    VARIABLES
    List of messages and XML documents used within this BPEL process
    -->
    <variables>
    <!-- Reference to the message passed as input during initiation -->
    <variable name="inputVariable" messageType="client:BPELProcess1RequestMessage"/>
    <!-- Reference to the message that will be sent back to the requester during callback -->
    <variable name="outputVariable" messageType="client:BPELProcess1ResponseMessage"/>
    </variables>
    <!--
    ORCHESTRATION LOGIC
    Set of activities coordinating the flow of messages across the
    services integrated within this business process
    -->
    <sequence name="main">
    <!-- Receive input from requestor. (Note: This maps to operation defined in BPELProcess1.wsdl) -->
    <receive name="receiveInput" partnerLink="bpelprocess1_client" portType="client:BPELProcess1" operation="process" variable="inputVariable" createInstance="yes"/>
    <!--
    Asynchronous callback to the requester. (Note: the callback location and correlation id is transparently handled using WS-addressing.)
    -->
    <switch name="Switch_1">
    <case condition="contains(bpws:getVariableData('inputVariable','payload','/client:process/client:input'), 'ABCDE' )">
    <empty name="Empty_1"/>
    </case>
    <otherwise>
    <sequence>
    <empty name="Empty_2"/>
    <empty name="Empty_3"/>
    </sequence>
    </otherwise>
    </switch>
    <invoke name="callbackClient" partnerLink="bpelprocess1_client" portType="client:BPELProcess1Callback" operation="processResponse" inputVariable="outputVariable"/>
    </sequence>
    </process>

  • How to create 'service' tier with functionality multiple struts apps

    I am looking for some advice regarding a future project. I have 3 struts webapps (running on Tomcat 4.1.3) each with some overlapping functionality. I would like to create a 'service tier' to accommodate common functionality which can be shared between the 3 struts web apps.
    What framework would best achieve this? Are EJBs the way to go? My struts apps all use DTOs so are not tied to the Action Form object. I have been looking at Spring but am not sure exactly how this will fit? Will tomcat serve my needs or do I need to migrate to something with full J2EE support. I have also considered JBOSS with Seam linking JSF to EJBs. Is this a viable option?
    The service layer can be on the same machine as the struts apps although I would like to have the flexibility to move it to a separate server in the future if necessary.
    I will be happy to provide more details to any who can offer me some guidance.

    Hi Saish,
    Thanks for your help.
    I have considered both options. The main goal is to
    eliminate duplicate code. However the presentation
    tiers of the applications are quite different. I
    will look into Martins book.
    It's outstanding. One of my top five favorite books.
    Would creating a jar file which is included in each
    .war end up becomming a maintenance nightmare?
    Depends on what you mean by ' maintenance'. In terms of onging development with your Java source, in a modern IDE, no. In terms of deployment, it does add a minor bit of complexity. However, if you are using an automated build and deployment tool such as Ant or Maven, the amount of extra work is trivial.
    In your opinion what would be the advantages of
    implementing the common functionality as a seperate
    tier (with SPRING/EJB) vs using a JAR file and
    distributing it with each app?They are not mutually exclusive. If you want to remove duplicate code, then simple refactoring is the start. As part of that refactoring, you may decide enough classes are providing similar functionality (such as transaction management, a coarse-grained public API, etc.) and create a tier. You mentioned in particular a service tier. This is a design and architectural decision. You could still completely refactor common functionality into a better design without the introduction of a new tier.
    Whether to create a tier is, IMO, more art than science. Adding a tier adds complexity. However, the net effect should be to reduce system complexity. It is more 'work' to implement a true persistence tier than to simply code JDBC in model objects (or use Hibernate/JDO objects). However, as overall system complexity grows, the addition of a persistence tier adds many benefits. Business objects concern themselves solely with business logic, where as data acccess objects concern themselves with persistence. You can even have different developers with different skills specialize within a tier.
    So, tiering really is a big topic. Fortunately, there are many architecture templates and design patterns to guide your decisions. "Patterns of Enterprise Architecture" (also by Fowler) compares and contrasts the more common ones. There is lively debate as to the pros and cons of different strategies. In the end, there is no cookie-cutter architecture. You will need (sometimes through the painful process of making a mistake) to see what works best for your actual system.
    Finally, about remoting. Remember the first law of distributed objects, "Don't distribute your objects". There is always a performance penalty compared to an in-JVM local call. Remoting has its uses, but these should be careful architecture-level decisions. (I should concded that even this paragraph is sometimes contentious and debated).
    - Saish

  • Besst way to find a function module

    Hi there
    I am quiet new to ABAP and I am curiouse about how to best approach the search for a function module??
    can u guys please tell me how you search for functions modules that preform a specific task.
    For example if I search for a function module that would display a itab in an alv grid, how would I do that?
    Thanks,
    Nana

    Hi Nana Lohmanns 
    Generic way of Finding the function module is only to go to se37 type any combination like ALV na dpress F4.
    You will get name of function modules along with short text,then you can try the one you think as useful.
    Like when you are looking for a Function module which can perform Operation on DATE.go to SE37 Type _DATE then press F4.You will get list of Function modules like:
    <b>DATE_CHECK_PLAUSIBILITY</b>: Check to see if a date is in a valid format for SAP. Works well when validating dates being passed in from other systems.
    <b>DATE_COMPUTE_DAY</b>: Returns a number indicating what day of the week the date falls on. Monday is returned as a 1, Tuesday as 2, etc.
    <b>DATE_GET_WEEK</b> :will return the week that a date is in.
    <b>DATE_IN_FUTURE</b>: Calculate a date N days in the future.
    Visit this link also,That will also be helpful for you,to get feel of Some Common Function MOdules.
    http://www.sapgenie.com/abap/functions.htm
    Close the thread,If your Question is answered.
    Regards,
    Vijay Raheja

  • [JS] Event handler function is shown as the result in the ESTK

    I have a ScriptUI tree, with an onExpand event, like this:
    Window1.tvwTree.onExpand  = function (item){
        $.writeln(item.key + " is now expanded.");
    Every time the script is run, I get this in the Javascript console of the ExtendScript Toolkit:
    Execution finished. Result: onExpand()
    First question is: why?
    Second question: What's the best and cleanest way to take care of the onExpand event? I didn't manage to assign a function to the onExpand event, in the same way as I do for parameter-less functions.
    For simpler events, with no parameters, I do it like this:
    Window1.....DropDownList2.onChange = cboNewLanguage_onChange;
    ... but the onExpand event has its "item" parameter to take care of, and I don't manage to assign the function in a similar way. Please enlighten me.
    (Would it be possible to use a prototype approach, for events like this? Getting a common function for all onExpand events...???)
    Thanks,
    Andreas

    Hi Andreas,
    First question: what is supposed to be item.key? Have you extended the ListItem properties?
    The way you assign the onExpand function seems correct to me. The following code should work:
    var myExpandHandler = function(/*ListItem*/ item)
         // this => TreeView
         // item => expanded ListItem
         alert( item.text + ' is now expanded.' );
    myTree.onExpand = myExpandHandler;
    Alternately, you can create a generic handler through the TreeView prototype:
    TreeView.prototype.onExpand = function(/*ListItem*/ item)
         // this => TreeView
         // item => expanded ListItem
         alert( item.text + ' is now expanded.' );
    Works for me in CS4 & CS5+.
    Note: the onExpand function has no event listener counterpart, so you cannot use the form:  <widget>.addEventListener('expand', myEventListener).
    I don't know why your script causes the ESTK console to display "Result: onExpand()". Probably your code contains the corresponding $.writeln somewhere, doesn't it? Also, take into account that if your UI code uses sth like myListItem.expanded = true; then the onExpand handler is called before the win.show(). This may explain unexpected feedback in the console (?)
    @+
    Marc

Maybe you are looking for

  • SSL cert on ASA 5512 from Thwate or Digitcert

    I ran into the issue when I install SSL123 cert from Thwate . I did not have issue with SSL cert from DIgitcert- their process and steps are simple and using better encryoption - SHA256. Compare to Thwate - their support did not let me use SHA2 and I

  • Read & Write all folders and files

    How do I allow another account user read & write privileges to all my files and folders? I have set the other user as an administrator however each file and folder that i've copied into their documents folder still need to be changed individually (th

  • Adobe Photoshop CS6 Problem

    I have successfully installed Photoshop CS6 to my computer. However, when I open the front page to CS6 everything "freezes up", and I cannot open any of the tabs - not even the file or close tabs. Have uninstalled and re-installed the CS6 several tim

  • 32 bits on Snow Leopard : old dylib, dylib paths and xcode

    Hello ! I've got a problem with 32 bits on Snow Leopard. I'm unable to change paths inside and old leopard dylib, and i have architecture compilation problems when i compile the dylib and the project that uses it. (i've replaced personal information

  • What is diffrence bet'n allocate channel & maintenance channel in RMAN Back

    Dear All, Please tell me the diffrence between allocate channel & maintenance channel in RMAN BACKUP. waiting for reply... Regards, .................