Benefits of generics

This might be a simple question to some of you but I am still trying to understand all the benefits of generics. Compile-time type safety is clearly one benefit. Is it the only one ? I see posts referring to generic IOC containers etc. So it seems that there is more to it than meets the eye. What in your view are the design and language benefits that are currently recognized ?

I have done some pretty obscure things with generics, including using them to express (and enforce) relationships between classes (in a Patterns sort of way), where in fact due to erasure, the classes used to actually express the relationship are never loaded into the runtime. But even that case probably still falls under the description "Compile-time type safety".
So at the level of what happens in silicon then "Compile-time type safety " probably pretty well sums it up, though the range of things possible here is actually much broader than you might presume.
However there is another benefit which accrues outside of the silicon.
Because generics gives us a formal language for expressing (some of) the concepts involved in abstracting over types, there is an additional two fold benefit.
Firstly, our thinking can move from fuzzy to concrete because of this formal language. We can think more clearly about such concepts because we have a language with which to think. This benefits the design phase of software development in particular.
Secondly, we have a way to communicate this thinking in a way that has precise meaning. This communication can be in design documents, discussions and the code itself. This benefits the maintenance phase of software development in particular.
As an example, I was looking at a colleague's J2EE code a few days ago, and there was a method that returned a raw List. My first thought was "List of what?" This code seemed to me about as naive as declaring all reference variables as Object. There were specifics about that code that were not expressed, and which I expected to be expressed because of the way generics has enhanced the way I think and communicate about code. Of course he couldn't use generics, but what was interesting was the way generics had changed the way I responded to that code.
Personally, I think this cranial based benefit is at least as important as the silicon based one.
cheers
Bruce

Similar Messages

  • Say good-bye to pirated computer games. Reasons for you to buy generic games!

    Found this article!
    It is totally true. So many benefits of generic games!!
    Please check its source here for more picture reference:
    http://happylifegreen.blogspot.tw/2015/01/say-good-bye-to-pirated-computer-games.html
    IT IS CHEAPER
    One of major reasons for most people installing pirated games is because they want to save money. However, they are wrong! If they play it wisely, purchasing generic games can be much cheaper!
    Thanks to this digital era; nowadays you can buy and download almost all games from internet. There are several major gaming platforms. Biggest ones are Steam, Uplay, and Origin.
    Steam is the biggest digital platform which houses thousands of games in more than 237 countries and in 21 different languages. Uplay started with Ubisoft games like Assassin’s Creed series and now expands to a much wider range of games. Origin, on the other hand, is (currently) purely for EA games.
    You can literally find so many game discounts EVERYDAY on these game platforms. Moreover, every now and then, they have big sales as well. For example, last month Steam had its holiday big sales which had more than 5554 games on sale!
    It is common to see many, many 90% off, 75% off, 60% off… You need to be very self-constrained before you put too many games in your Shopping Cart! Haha!
    Another good thing is that games in digital format do drop in prices.
    In Steam, it is common that after a couple of months of its launch, a game will start to have discount, and then it will drop in prices. For example, when Thief was first launched in 2014, the price was US$59.99. But if you check it on Steam, its price now already dropped to US$29.99.
    If you go to a retail shop and want to buy a box version of this game, the price will probably still be close to US$59.99.
    On the other hand, if you buy pirated games. It could cost more.
    Pirated games usually charges by number of DVDs, and one DVD costs around US$3.
    Because of nice visual graphic, it is common to see games exceed 15GB—which will requires roughly 3 DVDs or more. One DVD cost $3; in another word, you need to pay $9 for one game.
    Some games, for example, The Evil Within, requires more than 38.6GB of disk space. It will need, I’m not sure, maybe more than 8 DVDs? Which means US$24??
    What I usually do is to add games in Wish List. When the game is on sales, Steam will send me email, and I will be able to track if I am satisfied with the discount percentage or not. Easy!
    IT IS SAFE WITH NO VIRUS
    This is easy. No one will argue that almost all, if not all, pirated games (or software) have malware hidden inside! There is no free meal. If you want to save money, you need to trade in something else.
    I am not sure how those virus will do to me, but I don’t want it secretly downloading some funny stuff from internet, and definitely I don’t want my credit card or other personal info be stolen!
    YOU CAN CLOUD-SYNC GAME PROGRESS
    Many games support cloud sync, meaning that you can go to any computer and start a game from where it left.
    It is quite convenient. I have two laptops for home and office. When I go to a business trip, I can still continue my games from my work laptop.
    In Steam, if you see a small cloud icon in front of games, it mean that the game supports cloud sync. The function works quite well!
    ENJOY TEAM WORK AND DLC
    If you play pirated Battlefield 4 or Titanfall (and many others), say good-bye to team mode~
    Quite a number of games—especially EA games— require you to connect to game server via internet in order to play in multiplayer mode.
    If you want to play with friends or want to challenge other games, buy generic games!
    Many games have DLC packs which allow you to equip with different weapons, outfit, or special items. Sometime, pre-purchased games give you these for free.
    Well, no such benefits in pirated versions.
    EASY INSTALL AND UPDATE
    How to install a game? You just need to click a “DOWNLOAD” button and then worry free. After installed, the game will update automatically; so you will always have the latest version of the game.
    HAVE A SENSE OF FULFILLMENT
    Currently I have more than 140 games in Steam and many others in Uplay and Origin. I have quite a sense of fulfillment to see all those game icons in one place.
    GAMES WILL NEVER LOST
    Years ago when there is no those digital platforms, you need to keep your game DVDs (or VCDs) well. Once lost, then bye-bye to the game. The same applies to pirated games that cannot comply with game platform.
    If you own generic games, you will never lose them! You can change as many computers as you like; you can un-install games; you can buy-it-and-forget-it; you can keep games for generation for your grand-children. Those games will always be there waiting for you.
    Once you want to put your hands on the games again, you just need to click “DOWNLOAD” button, and the game will alive once again!

    So long, and thanks for contributing, in your way.

  • Basic questions regarding OVM for a pair of physical hosts

    We have two servers available to try creating a small production-ready (Oracle supported) environment using Oracle VM. This system is for a service that my department is piloting and we're trying to do it without buying more hardware. If the initial pilot goes well then we'll improve / enhance where we need to.
    We are not using Oracle VM right now and I have no experience with it, so I am hoping the forum membership can sanity-check me and answer a few questions.
    Here is what we have:
    * "BigGuy" - Dell R510 / Xeon X5650 / 6 cores with HT / 24 GB RAM
    * "LittleGuy" - Dell R310 / Xeon X3450 / 4 cores with HT / 16 GB RAM
    * We do not have a SAN, all the storage is on the physical hosts and there is plenty of it (about 1.5 TB each)
    On BigGuy, we were thinking about putting:
    A guest to host the production database
    A guest to host the production web server
    On LittleGuy, we were thinking about putting:
    A guest to host the standby database
    A guest to host a standby web server (this would be an image of the prod web server that we could bring up if we need to do hardware maintenance on BigGuy)
    A guest to host an RMAN repository
    If we have to fail over to the standy on LittleGuy then we will revert back to the primary db on BigGuy as soon as possible.
    The questions:
    1. In general, does this seem a reasonable approach given the nature of the project?
    2. I'm confused about where we install the Oracle VM Manager. It seems like we actually need a third physical host for the VM manager and its database. However, we don't have a third machine at our disposal, so can we get by with installing it (complete with an SE database) within the Oracle VM Server running on LittleGuy?
    3. Since these hosts are dissimilar, my understanding is that Live Migration won't work, but can I still run virtual machines on each physical host and manage them from the Oracle VM Manager running on LittleGuy (assuming the answer to Question 1 is Yes)? If I understand correctly, BigGuy would be in one server pool and LittleGuy would be in another. Is that correct?
    Thanks,
    -Tom

    Tom N wrote:
    1. In general, does this seem a reasonable approach given the nature of the project?Possibly. There is no HA or Live Migration without shared storage, so you'd only be getting the benefits of generic virtualization. Also keep in mind that Oracle VM Server only provides access to completely unusued local storage, so don't create one big RAID array on your Dells, as the unused space would be unusable. Rather, create two distinct devices, one for the operating system install (which only requires 10-15GB) and another to store your virtual disk images. Also, as you intend to host database instances, I would also recommend creating physical devices for ASM storage for those instances, for the best possible performance.
    2. I'm confused about where we install the Oracle VM Manager. It seems like we actually need a third physical host for the VM manager and its database. However, we don't have a third machine at our disposal, so can we get by with installing it (complete with an SE database) within the Oracle VM Server running on LittleGuy?Not easily with OVM3: there is no Oracle VM Manager template and you need Oracle VM Manager up and running to fully configure your Oracle VM Servers. Some customers have had some success creating a VirtualBox instance with Oracle VM Manager and then migrating that instance to an Oracle VM Server guest, but I haven't found a detailed how-to document on this. You could also run Oracle VM Manager as a guest of an alternatively virtualization platform (if one exists).
    3. Since these hosts are dissimilar, my understanding is that Live Migration won't work, but can I still run virtual machines on each physical host and manage them from the Oracle VM Manager running on LittleGuy (assuming the answer to Question 1 is Yes)? If I understand correctly, BigGuy would be in one server pool and LittleGuy would be in another. Is that correct?The lack of shared storage makes live migration impossible anyway, so the dissimilarity between the hosts is just an additional factor that would prevent live migration were shared storage to be made available later. However, you can manage multiple physical hosts and server pools from a single Oracle VM Manager instance, so the second half of your question is correct.

  • ESS Benefits Generic Enrollment - Different behavior backend v/s portal

    We are using the ESS Benefits generic enrollment service for enrollment kicking off the adjustment reasons on IT 0378.
    Here is the configuration set up, trying to simplify to explain the matter. We are on ECC 6.0 with EHP2.
    1.  Configured one plan type in savings category.
    2.  Within this plan type,  configured 2 plans.
    3.  Configured all other related configuration to set up the 2 plans.
    4. Configured the adjustment reason and the appropriate plan type created in step 2.
    5.  Created the required adjustment reason on 378.
    In HRBEN0001 transaction via backendwe can  see the 2 plans configured within the plan type.
    But when Trying to enroll from ESS - only one plan can be seen for that plan type, the other plan is not shown at all.
    OK - eventually, debugged and found this piece of code in FM HR_BEN_ESS_FILL_SELECTION_DISP.  The 2 different plans are there until this piece of code takes one of them Off...
      CODE -
    3.) Reduce entries to one entry per type and period
      delete adjacent duplicates from selection_display_gt
        comparing pernr
                  barea
                  bpcat
                  pltyp
                  begda
                  sprps.
    CODE -
    This FM is called only for ESS application and not for backed program.
    What we do not understand is why is it behaving differntly on backend v/s portal.
    Any information or experience with this form any one of you will be highly appreciated.
    Thanks.

    Siddharth,
    Thanks for your reply. Yes ESS has its own FMs.  The UI, user exits, BADIs etc are different for backend v/s front end.
    What we are not clear with, is the different behavior in core functionality --  i.e. When the adjustment reason is processed from the backend using HRBEN0001 - The 2 plans within the Plan Type are available for elections. BUT the same adjustment reason for the same penr when processed from  ESS - there is just one plan available for elections.
    It's clear from the code, that it is deleting one plan and this code is within the FM which is called only from ESS.  But we are still not sure why it should behave differently i.e. 2 plans via backend v/s one plan  via ESS. 
    Wanted to see if anyone can share any information if they have a similar benefits set up .. 2 plans within one plan type FOR savings plan category and then having a adjustment reason set up.
    Regards.

  • What do people think about the different Generic Java approaches?

    I have seen a lot of different approaches for Generic Java, and when people find problems with each approach the normal response has been: the other approach is worse with such and such a problem, do you have a better way?
    The different approaches I have seen are: (in no particular order)
    Please correct me if I am wrong and add other approaches if they are worthy of mention.
    1) PolyJ - by MIT
    This is a completely different approach than the others, that introduces a new where clause for bounding the types, and involves changing java byte codes in order to meet it's goals.
    Main comments were not a java way of doing things and far too greater risk making such big changes.
    2) Pizza - by Odersky & Wadler
    This aims at extending java in more ways than just adding Generics. The generic part of this was replaced by GJ, but with Pizza's ability to use primitives as generic types removed, and much bigger changes allowing GJ to interface with java.
    Main comments were that Pizza doesn't work well with java, and many things in Pizza were done in parallel with java, hence were no longer applicable.
    3) GJ - by Bracha, Odersky, Stoutamire & Wadler
    This creates classes with erased types and bridging methods, and inserts casts when required when going back to normal java code.
    Main comments are that type dependent operations such as new, instanceof, casting etc can't be done with parametric types, also it is not a very intuitive approach and it is difficult to work out what code should do.
    4) Runtime Generic Information - by Natali & Viroli
    Each instance holds information about its Runtime Type.
    Main comments from people were that this consumes way too much memory as each instance holds extra information about its type, and the performance would be bad due to checking Type information at runtime that would have been known at compile.
    5) NextGen - by Cartwright & Steele
    For each parameterized class an abstract base class with types erased is made and then for each new type a lightweight wrapper class and interface are created re-using code from the base class to keep the code small.
    Main comments from people were that this approach isn't as backwards compatible as GJ due to replacing the legacy classes with abstract base classes which can't be instantiated.
    6) .NET common runtime - by Kennedy & Syme
    This was written for adding Generics to C#, however the spec is also targeted at other languages such as VB.
    Main comments from people were that this approach isn't java, hence it is not subject to the restrictions of changing the JVM like java is.
    7) Fully Generated Generic Classes - by Agesen, Freund & Mitchell
    For each new type a new class is generated by a custom class loader, with all the code duplicated for each different type.
    Main comments from people were that the generated code size gets too big, and that it is lacking a base class for integration with legacy code.
    8) JSR-14 - by Sun
    This is meant to come up with a solution Generic Solution to be used in java. Currently it is heavily based on GJ and suffering from all the same problems as GJ, along with the fact that it is constantly undergoing change and so no one knows what to expect.
    See this forum for comments about it.
    As if we didn't have enough approaches already, here is yet another one that hopefully has all of the benefits, and none of the problems of the other approaches. It uses information learnt while experimenting with the other approaches. Now when people ask me if I think I have a better approach, I will have somewhere to point them to.
    (I will be happy to answer questions concerning this approach).
    9) Approach #x - by Phillips
    At compile time 1 type is made per generic type with the same name.
    e.g.class HashSet<TypeA> extends AbstractSet<TypeA> implements Cloneable, Serializable will be translated to a type: class HashSet extends AbstractSet implements Cloneable, SerializableAn instance of the class using Object as TypeA can now be created in 2 different ways.
    e.g.Set a = new HashSet();
    Set<Object> b = new HashSet<Object>();
    //a.getClass().equals(b.getClass()) is trueThis means that legacy class files don't even need to be re-compiled in order to work with the new classes. This approach is completely backwards compatible.
    Inside each type that was created from a generic type there is also some synthetic information.
    Information about each of the bounding types is stored in a synthetic field.
    Note that each bounding type may be bounded by a class and any number of interfaces, hence a ';' is used to separate bounding types. If there is no class Object is implied.
    e.g.class MyClass<TypeA extends Button implements Comparable, Runnable; TypeB> will be translated to a type: class MyClass {
      public static final Class[][] $GENERIC_DESCRIPTOR = {{Button.class, Comparable.class, Runnable.class}, {Object.class}};This information is used by a Custom Class Loader before generating a new class in order to ensure that the generic types are bounded correctly. It also gets used to establish if this class can be returned instead of a generated class (occurs when the generic types are the same as the bounding types, like for new HashSet<Object> above).
    There is another synthetic field of type byte[] that stores bytes in order for the Custom Class Loader to generate the new Type.
    There are also static methods corresponding to each method that contain the implementation for each method. These methods take parameters as required to gain access to fields, contructors, other methods, the calling object, the calling object class etc. Fields are passed to get and set values in the calling object. Constructors are passed to create new instances of the calling object. Other methods are passed when super methods are called from within the class. The calling object is almost always passed for non static methods, in order to do things with it. The class is passed when things like instanceof the generated type need to be done.
    Also in this class are any non private methods that were there before, using the Base Bounded Types, in order that the class can be used exactly as it was before Generics.
    Notes: the time consuming reflection stuff is only done once per class (not per instance) and stored in static fields. The other reflection stuff getting done is very quick in JDK1.4.1 (some earlier JDKs the same can not be said).
    Also these static methods can call each other in many circumstances (for example when the method getting called is private, final or static).
    As well as the ClassLoader and other classes required by it there is a Reflection class. This class is used to do things that are known to be safe (assuming the compiler generated the classes correctly) without throwing any exceptions.
    Here is a cut down version of the Reflection class: public final class Reflection {
      public static final Field getDeclaredField(Class aClass, String aName) {
        try {
          Field field = aClass.getDeclaredField(aName);
          field.setAccessible(true);
          return field;
        catch (Exception ex) {
          throw new Error(ex);
      public static final Object get(Field aField, Object anObject) {
        try {
          return aField.get(anObject);
        catch (Exception ex) {
          throw new Error(ex);
      public static final void set(Field aField, Object anObject, Object aValue) {
        try {
          aField.set(anObject, aValue);
        catch (Exception ex) {
          throw new Error(ex);
      public static final int getInt(Field aField, Object anObject) {
        try {
          return aField.getInt(anObject);
        catch (Exception ex) {
          throw new Error(ex);
      public static final void setInt(Field aField, Object anObject, int aValue) {
        try {
          aField.setInt(anObject, aValue);
        catch (Exception ex) {
          throw new Error(ex);
    }Last but not least, at Runtime one very lightweight wrapper class per type is created as required by the custom class loader. Basically the class loader uses the Generic Bytes as the template replacing the erased types with the new types. This can be even faster than loading a normal class file from disk, and creating it.
    Each of these classes has any non private methods that were there before, making calls to the generating class to perform their work. The reason they don't have any real code themselves is because that would lead to code bloat, however for very small methods they can keep their code inside their wrapper without effecting functionality.
    My final example assumes the following class name mangling convention:
    * A<component type> - Array
    * b - byte
    * c - char
    * C<class name length><class name> - Class
    * d - double
    * f - float
    * i - int
    * l - long
    * z - boolean
    Final Example: (very cut down version of Vector)public class Vector<TypeA> extends AbstractList<TypeA> implements RandomAccess, Cloneable, Serializable {
      protected Object[] elementData;
      protected int elementCount;
      protected int capacityIncrement;
      public Vector<TypeA>(int anInitialCapacity, int aCapacityIncrement) {
        if (anInitialCapacity < 0) {
          throw new IllegalArgumentException("Illegal Capacity: " + anInitialCapacity);
        elementData = new Object[initialCapacity];
        capacityIncrement = capacityIncrement;
      public synchronized void setElementAt(TypeA anObject, int anIndex) {
        if (anIndex >= elementCount) {
          throw new ArrayIndexOutOfBoundsException(anIndex + " >= " + elementCount);
        elementData[anIndex] = anObject;
    }would get translated as:public class Vector extends AbstractList implements RandomAccess, Cloneable, Serializable {
      public static final Class[][] $GENERIC_DESCRIPTOR = {{Object.class}};
      public static final byte[] $GENERIC_BYTES = {/*Generic Bytes Go Here*/};
      protected Object[] elementData;
      protected int elementCount;
      protected int capacityIncrement;
      private static final Field $0 = Reflection.getDeclaredField(Vector.class, "elementData"),
                                 $1 = Reflection.getDeclaredField(Vector.class, "elementCount"),
                                 $2 = Reflection.getDeclaredField(Vector.class, "capacityIncrement");
      static void $3(int _0, Field _1, Object _2, Field _3, int _4) {
        if (_0 < 0) {
          throw new IllegalArgumentException("Illegal Capacity: " + _0);
        Reflection.set(_1, _2, new Object[_0]);
        Reflection.setInt(_3, _2, _4);
      static void $4(int _0, Field _1, Object _2, Field _3, Object _4) {
        if (_0 >= Reflection.getInt(_1, _2)) {
          throw new ArrayIndexOutOfBoundsException(_0 + " >= " + Reflection.getInt(_1, _2));
        ((Object[])Reflection.get(_3, _2))[_0] = _4;
      public Vector(int anInitialCapacity, int aCapacityIncrement) {
        $3(anInitialCapacity, $0, this, $2, aCapacityIncrement);
      public synchronized void setElementAt(Object anObject, int anIndex) {
        $4(anIndex, $1, this, $0, anObject);
    } and new Vector<String> would get generated as:public class Vector$$C16java_lang_String extends AbstractList$$C16java_lang_String implements RandomAccess, Cloneable, Serializable {
      protected Object[] elementData;
      protected int elementCount;
      protected int capacityIncrement;
      private static final Field $0 = Reflection.getDeclaredField(Vector$$C16java_lang_String.class, "elementData"),
                                 $1 = Reflection.getDeclaredField(Vector$$C16java_lang_String.class, "elementCount"),
                                 $2 = Reflection.getDeclaredField(Vector$$C16java_lang_String.class, "capacityIncrement");
      public Vector$$C16java_lang_String(int anInitialCapacity, int aCapacityIncrement) {
        Vector.$3(anInitialCapacity, $0, this, $2, aCapacityIncrement);
      public synchronized void setElementAt(String anObject, int anIndex) {
        Vector.$4(anIndex, $1, this, $0, anObject);
    }Comparisons with other approaches:
    Compared with PolyJ this is a very java way of doing things, and further more it requires no changes to the JVM or the byte codes.
    Compared with Pizza this works very well with java and has been designed using the latest java technologies.
    Compared with GJ all type dependent operations can be done, and it is very intuitive, code does exactly the same thing it would have done if it was written by hand.
    Compared with Runtime Generic Information no extra information is stored in each instance and hence no extra runtime checks need to get done.
    Compared with NextGen this approach is completely backwards compatible. NextGen looks like it was trying to achieve the same goals, but aside from non backwards compatibility also suffered from the fact that Vector<String> didn't extend AbstractList<String> causing other minor problems. Also this approach doesn't create 2 types per new types like NextGen does (although this wasn't a big deal anyway). All that said NextGen was in my opinion a much better approach than GJ and most of the others.
    Compared to .NET common runtime this is java and doesn't require changes to the JVM.
    Compared to Fully Generated Generic Classes the classes generated by this approach are very lightweight wrappers, not full blown classes and also it does have a base class making integration with legacy code simple. It should be noted that the functionality of the Fully Generated Generic Classes is the same as this approach, that can't be said for the other approaches.
    Compared with JSR-14, this approach doesn't suffer from GJ's problems, also it should be clear what to expect from this approach. Hopefully JSR-14 can be changed before it is too late.

    (a) How you intend generic methods to be translated.
    Given that Vector and Vector<Object> are unrelated types,
    what would that type be represented as in the byte code of
    the method? In my approach Vector and Vector<Object> are related types. In fact the byte code signature of the existing method is exactly the same as it was in the legacy code using Vector.
    To re-emphasize what I had said when explaining my approach:
    System.out.println(Vector.class == Vector<Object>.class);  // displays true
    System.out.println(Vector.class == Vector<String>.class);  // displays false
    Vector vector1 = new Vector<Object>(); // legal
    Vector<Object> vector2 = new Vector();  // legal
    // Vector vector3 = new Vector<String>(); // illegal
    // Vector<String> vector4 = new Vector();  // illegal
    Vector<String> vector5 = new Vector<String>();  // legal
    You must also handle the case where the type
    parameter is itself a parameterized type in which the type
    parameter is not statically bound to a ground instantiation.This is also very straightforward: (let me know if I have misunderstood you)
    (translation of Vector given in my initial description)
    public class SampleClass<TypeA> {
      public static void main(String[] args) {
        System.out.println(new Vector<Vector<TypeA>>(10, 10));
    }would get translated as:public class SampleClass {
      public static final Class[][] $GENERIC_DESCRIPTOR = {{Object.class}};
      public static final byte[] $GENERIC_BYTES = {/*Generic Bytes Go Here*/};
      private static final Constructor $0 = Reflection.getDeclaredConstructor(Vector$$C16java_util_Vector.class, new Class[] {int.class, int.class});
      static void $1(Constructor _0, int _1, int _2) {
        try {
          System.out.println(Reflection.newInstance(_0, new Object[] {new Integer(_1), new Integer(_2)}));
        catch (Exception ex) {
          throw (RuntimeException)ex;
      public static void main(String[] args) {
        $1($0, 10, 10);
    }and SampleClass<String> would get generated as:public class SampleClass$$C16java_lang_String {
      private static final Constructor $0 = Reflection.getConstructor(Vector$$C37java_util_Vector$$C16java_lang_String.class, new Class[] {int.class, int.class});
      public static void main(String[] args) {
        SampleClass.$1($0, 10, 10);
    Also describe the implementation strategy for when these
    methods are public or protected (i.e. virtual).As I said in my initial description that for non final, non static, non private method invocations a Method may be passed into the implementing synthetic method as a parameter.
    Note: the following main method will display 'in B'.
    class A {
      public void foo() {
        System.out.println("in A");
    class B extends A {
      public void foo() {
        System.out.println("in B");
    public class QuickTest {
      public static void main(String[] args) {
        try {
          A.class.getMethod("foo", null).invoke(new B(), null);
        catch (Exception ex) {}
    }This is very important as foo() may be overwritten by a subclass as it is here. By passing a Method to the synthetic implementation this guarantees that covariance, invariance and contra variance all work exactly the same way as in java. This is a fundamental problem with many other approaches.
    (b) The runtime overhead associated with your translationAs we don't have a working solution to compare this to, performance comments are hard to state, but I hope this helps anyway.
    The Class Load time is affected in 4 ways. i) All the Generic Bytes exist in the Base Class, hence they don't need to be read from storage. ii) The custom class loader, time to parse the name and failed finds before it finally gets to define the class. iii) The generation of the generic bytes to parametric bytes (basically involves changing bytes from the Constant Pool worked out from a new Parametric type, Utf8, Class and the new Parametric Constant types may all be effected) iv) time to do the static Reflection stuff (this is the main source of the overhead). Basically this 1 time per class overhead is nothing to be concerned with, and Sun could always optimize this part further.
    The normal Runtime overhead (once Classes have been loaded) is affected mainly by reflection: On older JDKs the reflection was a lot slower, and so might have made a noticeable impact. On newer JDKs (since 1.4 I think), the reflection performance has been significantly improved. All the time consuming reflection is done once per class (stored in static fields). The normal reflection is very quick (almost identical to what is getting done without reflection). As the wrappers simply include a single method call to another method, these can be in-lined and hence made irrelevant. Furthermore it is not too difficult to make a parameter that would include small methods in the wrapper classes, as this does not affect functionality in the slightest, however in my testing I have found this to be unnecessary.
    (c) The space overhead (per instantiation)There are very small wrapper classes (one per new Type) that simply contain all non private methods, with single method calls to the implementing synthetic method. They also include any fields that were in the original class along with other synthetic fields used to store reflected information, so that the slow reflection only gets done once per new Type.
    (d) The per-instance space overheadNone.
    (e) Evidence that the proposed translation is sound and well-defined for all relevant cases (see below)Hope this is enough, if not let me know what extra proof you need.
    (f) Evidence for backward compatibility
    (For example, how does an old class file that passes a Vector
    to some method handle the case when the method receives a Vector<T>
    where T is a type parameter? In your translation these types are unrelated.)As explained above, in my approach these are only unrelated for T != Object, in the legacy case T == Object, hence legacy code passing in Vector is exactly the same as passing in Vector<Object>.
    (g) Evidence for forward compatibility
    (How, exactly, do class files that are compiled with a generics compiler run on an old VM)They run exactly the same way, the byte codes from this approach are all legal java, and all legal java is also legal in this approach. In order to take advantage of the Generics the Custom Class Loader would need to be used or else one would get ClassNotFoundExceptons, the same way they would if they tried using Collections on an old VM without the Collections there. The Custom Class Loader even works on older VMs (note it may run somewhat slower on older VMs).
    (h) A viable implementation strategyType specific instantiations are at Class Load time, when the Custom Class Loader gets asked for a new Class, it then generates it.
    The type specific instantiations are never shipped as they never get persisted. If you really wanted to save them all you need to do is save them with the same name (with the $$ and _'s etc), then the class loader would find them instead of generating them. There is little to be gained by doing this and the only reason I can think of for doing such a thing would be if there was some reason why the target VM couldn't use the Custom Class Loader (the Reflection class would still need to be sent as well, but that is nothing special). Basically they are always generated at Runtime unless a Class with the same name already exists in which case it would be used.
    The $GENERIC_DESCRIPTOR and $GENERIC_BYTES from the base class along with the new Type name are all that is required to generate the classes at runtime. However many other approaches can achieve the same thing for the generation, and approaches such as NextGen's template approach may be better. As this generation is only done once per class I didn't put much research into this area. The way it currently works is that the $GENERIC_DESCRIPTOR are basically used to verify that a malicious class files is not trying to create a non Type Safe Type, ie new Sample<Object>() when the class definition said class Sample<TypeA extends Button>. The $GENERIC_BYTES basically correspond to the normal bytes of a wrapper class file, except that in the constant pool it has some constants of a new Parametric Constant type that get replaced at class load time. These parametric constants (along with possibly Utf8 and Class constants) are replaced by the Classes at the end of the new type name, a little more complex than that but you probably get the general idea.
    These fine implementation details don't affect the approach so much anyway, as they basically come down to class load time performance. Much of the information in the $GENERIC_BYTES could have been worked out by reflection on the base type, however at least for now simply storing the bytes is a lot easier.
    Note: I have made a small syntax change to the requested class:
    public T(X datum) --> public T<X>(X datum)
    class T<X> {
      private X datum;
      public T<X>(X datum) {
        this.datum = datum;
      public T<T<X>> box() {
        return new T<T<X>>(this);
      public String toString() {
        return datum.toString();
      public static void main(String[] args) {
        T<String> t = new T<String>("boo!");
        System.out.println(t.box().box());
    }would get translated as:
    class T {
      public static final Class[][] $GENERIC_DESCRIPTOR = {{Object.class}};
      public static final byte[] $GENERIC_BYTES = {/*Generic Bytes Go Here*/};
      private Object datum;
      private static final Field $0 = Reflection.getDeclaredField(T.class, "datum");
      private static final Constructor $1 = Reflection.getDeclaredConstructor(T$$C1T.class, new Class[] {T.class});
      static void $2(Field _0, Object _1, Object _2) {
        Reflection.set(_0, _1, _2);
      static Object $3(Constructor _0, Object _1) {
        try {
          return Reflection.newInstance(_0, new Object[] {_1});
        catch (Exception ex) {
          throw (RuntimeException)ex;
      static String $4(Field _0, Object _1) {
        return Reflection.get(_0, _1).toString();
      static void $5() {
        T$$C16java_lang_String t = new T$$C16java_lang_String("boo!");
        System.out.println(t.box().box());
      public T(Object datum) {
        $2($0, this, datum);
      public T$$C1T box() {
        return (T$$C1T)$3($1, this);
      public String toString() {
        return $4($0, this);
      public static void main(String[] args) {
        $5();
    }as the generic bytes aren't very meaningful and by no means a requirement to this approach (NextGen's template method for generation may work just as well), here are the generated classes with some unused code commented out instead:
    class T$$C28T$$C22T$$C16java_lang_String {
      private T$$C22T$$C16java_lang_String datum;
      private static final Field $0 = Reflection.getDeclaredField(T$$C28T$$C22T$$C16java_lang_String.class, "datum");
    //  private static final Constructor $1 = Reflection.getDeclaredConstructor(T$$C34T$$C28T$$C22T$$C16java_lang_String.class, new Class[] {T$$C28T$$C22T$$C16java_lang_String.class});
      public T$$C28T$$C22T$$C16java_lang_String(T$$C22T$$C16java_lang_String datum) {
        T.$2($0, this, datum);
    //  public T$$C34T$$C28T$$C22T$$C16java_lang_String box() {
    //    return (T$$C34T$$C28T$$C22T$$C16java_lang_String)T.$3($1, this);
      public String toString() {
        return T.$4($0, this);
      public static void main(String[] args) {
        T.$5();
    class T$$C22T$$C16java_lang_String {
      private T$$C16java_lang_String datum;
      private static final Field $0 = Reflection.getDeclaredField(T$$C22T$$C16java_lang_String.class, "datum");
      private static final Constructor $1 = Reflection.getDeclaredConstructor(T$$C28T$$C22T$$C16java_lang_String.class, new Class[] {T$$C22T$$C16java_lang_String.class});
      public T$$C22T$$C16java_lang_String(T$$C16java_lang_String datum) {
        T.$2($0, this, datum);
      public T$$C28T$$C22T$$C16java_lang_String box() {
        return (T$$C28T$$C22T$$C16java_lang_String)T.$3($1, this);
      public String toString() {
        return T.$4($0, this);
      public static void main(String[] args) {
        T.$5();
    class T$$C1T {
      private T datum;
      private static final Field $0 = Reflection.getDeclaredField(T$$C1T.class, "datum");
    //  private static final Constructor $1 = Reflection.getDeclaredConstructor(T$$C6T$$C1T.class, new Class[] {T$$C1T.class});
      public T$$C1T(T datum) {
        T.$2($0, this, datum);
    //  public T$$C6T$$C1T box() {
    //    return (T$$C6T$$C1T)T.$3($1, this);
      public String toString() {
        return T.$4($0, this);
      public static void main(String[] args) {
        T.$5();
    class T$$C16java_lang_String {
      private String datum;
      private static final Field $0 = Reflection.getDeclaredField(T$$C16java_lang_String.class, "datum");
      private static final Constructor $1 = Reflection.getDeclaredConstructor(T$$C22T$$C16java_lang_String.class, new Class[] {T$$C16java_lang_String.class});
      public T$$C16java_lang_String(String datum) {
        T.$2($0, this, datum);
      public T$$C22T$$C16java_lang_String box() {
        return (T$$C22T$$C16java_lang_String)T.$3($1, this);
      public String toString() {
        return T.$4($0, this);
      public static void main(String[] args) {
        T.$5();
    }the methods from the Reflection class used in these answers not given in my initial description are:
      public static final Object newInstance(Constructor aConstructor, Object[] anArgsArray) throws Exception {
        try {
          return aConstructor.newInstance(anArgsArray);
        catch (InvocationTargetException ex) {
          Throwable cause = ex.getCause();
          if (ex instanceof Exception) {
            throw (Exception)ex;
          throw new Error(ex.getCause());
        catch (Exception ex) {
          throw new Error(ex);
      public static final Constructor getDeclaredConstructor(Class aClass, Class[] aParameterTypesArray) {
        try {
          Constructor constructor = aClass.getDeclaredConstructor(aParameterTypesArray);
          constructor.setAccessible(true);
          return constructor;
        catch (Exception ex) {
          throw new Error(ex);
      }

  • ACE SSL Sticky class-map generic vs class default differences.

    There was a thread recently titled "ACE 3.0(0) SW / LB with SSL Session-ID" where Giles Dufour outlined a configuration for an ACE performing sticky based on SSL Session ID.
    Can anyone explain the benefits and differences of using a specific class-map generic such as this:
    class-map type generic match-any SSL-v3-32
      2 match layer4-payload regex "\x16\x03\x00..\x01.*"
      3 match layer4-payload regex "\x16\x03\x01..\x01.*"
    Versus just matching class default?
    So if I have a configuration such as this:
    policy-map type loadbalance generic first-match SSL-v3-Sticky
    class SSL-v3-32
       sticky-serverfarm ssl-v3
    vs
    policy-map type loadbalance generic first-match SSL-v3-Sticky
    class class-default
       sticky-serverfarm ssl-v3
    What's the benefit or drawback?

    The SSL session id is only available in version 3.0.1 and 3.1.1
    So you can match this particular version and then attempt to do stickyness.
    You are guaranteed to find what you're looking for.
    If you match a class-default it means you apply stickyness to any version of ssl packet.
    So there is a risk to misinterpret the content of the packet and stick on something else than the session id.
    Gilles.

  • Benefits and Payments in ESS Portal

    1) How can employee know when their benefits should start (cant enter start date via ESS)
    -           It appears that they need to enter a start date but cannot
    2) For insurance enrollment, why does BASIC COVERAGE show ZERO amount. Can we remove if we can?
    3) We need to relabel some of these plans we set up for HSA - how can we do that?

    1) How can employee know when their benefits should start (cant enter start date via ESS)
    - It appears that they need to enter a start date but cannot
    Typically, EEs are not allowed to enter a start date for benefits coverage. The start date usually depends on the type of enrollment.
    If it is a new hire enrollment - the start date for benefits coverage will be the employee start date.
    If it is open enrollment - the start date for benefits coverage will be the beginning of the following year (open enrollment is done usually towards the end of the current year - for benefits coverages of the following year)
    If it is a generic enrollment (for example - birth of a new child) - the start date will be the beginning date of the corresponding adjustment reason (IT0378 record start date).
    2) For insurance enrollment, why does BASIC COVERAGE show ZERO amount. Can we remove if we can?
    This is a generic screen used for all the plans and hence it shows ZERO amount. You may choose to customize the code if you want to.
    3) We need to relabel some of these plans we set up for HSA - how can we do that?
    This can be done by changing the corresponding texts in the benefits configuration. The webdynpro application reads it from there.

  • Customizing Benefits and Payments iview in ESS Portal

    Hi Guys ;
    I am working on ESS portal.
    I want to add new links and textviews in the Benefits and Payments iview. After adding them I want to rearrange their positions with respect to existing fields on the iview.
    I tried by opening the preview of iview from
    Content Administration -> portal Content -> ESS->iviews ->Benefits and Payments iview.
    Then I selected an existing link on the preview of iview and did ctrl + right click but when I select any uielement and click on rearrange I don't get any filed inthe table to rearrange its empty.
    Is there any particular node in UI element tree to be selected to rearrange the fieldst?
    Please reply I am in a fix.

    1) How can employee know when their benefits should start (cant enter start date via ESS)
    - It appears that they need to enter a start date but cannot
    Typically, EEs are not allowed to enter a start date for benefits coverage. The start date usually depends on the type of enrollment.
    If it is a new hire enrollment - the start date for benefits coverage will be the employee start date.
    If it is open enrollment - the start date for benefits coverage will be the beginning of the following year (open enrollment is done usually towards the end of the current year - for benefits coverages of the following year)
    If it is a generic enrollment (for example - birth of a new child) - the start date will be the beginning date of the corresponding adjustment reason (IT0378 record start date).
    2) For insurance enrollment, why does BASIC COVERAGE show ZERO amount. Can we remove if we can?
    This is a generic screen used for all the plans and hence it shows ZERO amount. You may choose to customize the code if you want to.
    3) We need to relabel some of these plans we set up for HSA - how can we do that?
    This can be done by changing the corresponding texts in the benefits configuration. The webdynpro application reads it from there.

  • Help inheriting multiple generic interfaces of same type

    Hi-
    I am trying to re-factor some current code bloat.
    Here is the solution I want
    I want to define one generic subscriber interface, e.g.
    public interface Subscriber <TYPE> {
    public void valueChanges (TYPE T) ;
    And then I would like to (in theory) implements a class like this
    public class MyClass extends foo implements Subscriber<String> ,
    Subscriber <Integer> , Subscriber <Double> {
    public void valueChanged (String s) {
    public void valueChanged (Integer s) {
    public void valueChanged (Double s) {
    But this does not seem to be allowed becuase it says you can not inherit the
    same interface multiple times. I even tried something like this
    public interface Stringsubscriber implements Subscriber <String> for all the
    interfaces to specialize. That does not work.
    Can this be done (via some mechanism) in java or is this not possible.
    I am just learning the way generics work (I come from c++ world were templates
    are a bit more flexible and work a bit differently so its trying).
    Any hlep would be great.
    thanks in advance
    matt

    OK, Bruce, I'll bite: how do you attach
    parameterized types as annotation member values?
    There's no ".class" for them. It must be textual,
    , right? No.
    Actually I don't attach them as such, I put them somewhere else where I can find them by association.
    And you parse these stringual declarations
    later?The mirror API does not have an equivalent method to com.sun..javadoc.ClassDoc.findClass(String name), so you can't do it textually unless you require every type to be fully qualified. Thats too ugly for me.
    I tried writing a recursive annotation like this@interface Type {
        Class<?> value();
        Type[] args() default {};
    }but you can't write cyclic annotations (whose members are of its own type, directly or indirectly).
    So I thought that since I was annotating a class, I would just create some placeholder interfacesinterface S2WFGC1<T1> {}
    interface S2WFGC2<T1,T2> {}
    thru
    interface S2WFGC15<T1,T2,... T15> {}and do this
        @MyAnnotation(base=Map.class, add=@Flavor(EventDispatcher.class))
    class MyClass implements S2WFGC2<
                    Map<String,Integer>,
                    EventDispatcher<FooListener,FooEvent>
                > {
    }which gets interpreted as
        @MyAnnotation(
            base=Map<String,Integer>,
            add=@Flavor(EventDispatcher<FooListener,FooEvent>)
    class MyClass {}So I just put the raw type in the annotation, and for each of those (because the annotation is more complex than above), I get the type parameters from the S2WFGCn interface. I just use whichever S2WFGCn interface has the right number of type parameters.
    For each type in the annotation, if it is generic, I just read the next type argument from the S2WFGCn superinterface and use that instead (but error if its raw type is not the same as the annotation value). Each S2WFGCn actually extends S2WFGC, which makes it easy to find the S2WFGCn amongst (possibly other) superinterfaces.
    The S2WFGCn interfaces are sort of marker interfaces, but as well as having no methods, they also have no meaning. They are more like a variable for holding an array of types at the meta level.
    Sorry, but thats the best I can come up with. Its not pretty for sure, and I'd rather have a nicer mechanism, but for this application at least, the benefits are still positive, since in most cases there are no generic classes, so all the trickery disappears, and when there are generics, the ends justify the means.
    If only the JSR-175 EG had realised that generics was a meta type of the language...
    This was their biggest failure by a country mile.

  • Generics usage with combined enum & interface class

    I would like to use an enum to store constants for a drop down list, and be able to reuse the structure in a generics method. What I have done is created a interface with basic functionality, and then created an Enum class that implements my interface. Now that I have a single class, I want to pass the resulting class to a static helper function that will have access to the interface functions, and still have the ability to use the benefits of the enum (foreach loops & access to enum constants).
    Is there a way to do this with Generics? I know that this is not right, but maybe it will give an idea of what I am trying to do: <? extends <Enum extends Menu_Interface>>.
    public interface Selection_List {
         public String getName();
         public void setName( String name );
         public String getValue();
         public void setValue( String value );
         public String getGroup();
         public void setGroup( String group );
         boolean isSelected();
    public enum Tool_Types implements Selection_List
         SAMPLE_ONE( "name1", "value1" ),
         SAMPLE_TWO( "name2", "value2" );
         // ... implementation of interface functions
    public class FormGenerator
         public static <T extends <Enum extends Selection_List>>
              String doCreateDropDown( T selectionList )
              //  ... implementation of function
    };

    You surely can. The following is an example on implementing Runnable:
    public class EnumWithInterface {
        enum Days implements Runnable {
         MON, TUE, WED, THU, FRI, SAT, SUN;
         @Override
         public void run() {
             System.out.println("Running " + this);
        static <E extends Enum<E> & Runnable> void runAll(Class<E> runnableEnum) {
         for (E e : runnableEnum.getEnumConstants()) {
             e.run();
        public static void main(String[] args) {
         runAll(Days.class);
    }

  • Generic Enrollment link not showing up on Portal

    Hi,
    Generic Enrollment link not showing up in portal. I have Adjustment reason record in 378 and openenrollment is open.
    Both are open but I do not see General enrollment link in portal.
    Even I took off proxy class entry from genral enrollment CL_BENEFITS_AREAPAGE for testing  then only open enrollment link come up.
    How can I show both generic enrollment and open enrollment together.
    I appreciate immidiate help.
    Regards
    Mark

    Hi Mark,
    Please ensure that the user has read access to Infotype 171 (General Benefits Information) for Authorization Object P_PERNR. 
    You don't have to take the Proxy Class entry out. The proxy class is required as it determines which links are displayed based on the employee country code and benefits adj reasons.
    Thanks,
    Zubair Khan
    Edited by: Zubair Khan on Nov 16, 2011 11:22 PM

  • Selection Criterion of Contents Server's Storage Types : Used by Generic Object Services

    Hi experts.
    I'm considering Contents Server Storage Types of attached files uploaded by Generic Object Services.
    I want to adapt Storage Type that can be housekeeped by specifying retention period.
    Please give me how to housekeep and how to use the benefits of each Contents Server Types.
    Regards,
    Taiki Shoji

    Hi Deepak,
    I don't use Open Text.
    When I attache file, I do following steps.
    Select "Service for Object"
         ->Create
              ->Create Attachement
                   ->Select attachement file and Open
    Regards,
    Taiki Shoji

  • Comments on benefits and disadvantages of Journaled HD format ? Anyone?

    Lately I was trying to change a format of an internal HD, and in a process I learned a little about the "Jornaled" part of the Mac OS Extended format; more info: http://support.apple.com/kb/HT2355
    What do you think about this? As - when it make sense to use the Jornaled format and when it does not? What could be a benefit and what could be a disadvantage of this use? Anyone cares to comment, perhaps some may provide some real life examples of both..? so others may learn something useful?

    Hi - I'm not miffed - perhaps I do not write good enough - I got the message, accepted it as a common forum rule, and simply tried to comply by looking for a way to delete my post/cancel the discussion before it starts... But perhaps enough on this...
    Back to the main point - yes - there are some articles - I also read the papers that are linked to Wikipedia article, but it is the same as my search results for "Journaled" on this forum - there is some info but I could not see anywhere the practical approach, besides very generic and sporadic remarks that one should weight the benefits of Journalizing the files vs. accessing media especially. I knew that - that there is a dilemma, and that's why I wanted to see some "real life" use or non-use of this function... I could not find any specifics...
    But I can search elsewhere.. and again - sorry for being out-of-step here, and thank you for letting me know that an issue like that might occur at all )this was written with an intention of using a not very dramatic case..).

  • Oracle 11g benefits

    Hello Guys
    Oracle 11g new features notes as found on web very generic
    if i want to convince my client to switch from oracle 10g to oracle 11g,this information will not be useful
    if you had migrated to 11g and worked on it,please reply practical reasons from dba point of view
    how customer will be benefited from migrating from oracle 10 g to 11g
    like if i mentioned to him ADR feature it doesnt makes sense to him
    Active dataguard may be one of feature but will be have any benefit where dataguard is implemented
    still to application guys also it will give any advantage
    say for example i am discussing this with Application team head ,how will he benefit from migrating to 11g
    what feature will be benefitted to him and how
    will this feature will be appealing enough to efforts in migration
    thanks
    cheers

    In my opinion, the best way to convince them is to do an assessment for their particular environment, based on the specifics.
    For example, I've done such one for a database and here are some of the points:
    1. Almost 30%(as reported by Grid Control) of frequently executed queries are on tables like XX.XXXX and YY.YYYYY. These tables are relatively small and statements , and functions on them are good candidates for modification to use :
    Query Results Cache and PL/SQL Function Result Cache (Oracle 11G Enterprise Edition option, no extra cost needed).
    2. From time to time we experience sudden execution plan changes and get worse plans. This degrades applications' performance orders of magnitude. Oracle 11g has a new built-in feature called "SQL Plan Management". As described in the docs:
    "SQL plan management prevents performance regressions resulting from sudden changes to the execution plan of a SQL statement by providing components for capturing, selecting, and evolving SQL plan information. If you are performing a database upgrade that installs a new optimizer version, it can result in plan changes for a small percentage of SQL statements, with most of the plan changes resulting in either no performance change or improvement. However, certain plan changes may cause performance regressions.
    With SQL plan management, the optimizer automatically manages execution plans and ensures that only known or verified plans are used. When a new plan is found for a SQL statement, the plan is not used until it has been verified by the database to have comparable or better performance than the current plan. This means if you seed SQL plan management with your current (pre-11g) execution plan, which will become the SQL plan baseline for each statement, the optimizer uses these plans after the upgrade. If the 11g optimizer determines that a different plan should be used, the new plan is queued for verification and will not be used until it has been confirmed to have comparable or better performance than the current plan."
    I don't expect this to be perfect but at least it will decrease the number of such problematic periods.
    3. 10g Recovery Manager doesn't support parallelism per datafile. In our environment we have several 30+GB datafiles and since our storage system is not very fast for such type of operations, non-parallel restore of a single datafile will take much more time compared to the same activity on 11g. 11g supports RMAN datafile restore in parallel.
    4. Several optimizations in optimizer work. One of them is better handling of full scans:
    We've done some tests 10g/11g and were surprised because of this direct path read/db file scattered reads thing. Our tests are:
    Two databases - one 11g and one 10g with same sga_target,sga_max_size(500MB) and pga_aggregate_target(200MB), everything else is as it is set during install by DBCA. These two databases run on one host.
    The storage is a NAS(6 discs) managed by 11g ASM (one normal redundancy diskgroup ) which is used by the databases.
    I imported a 3GB table on every database and gathered stats. To not go in detail as of now, the results are:
    three consecutive runs on 11g.
    average execution time - 50 seconds
    three consecutive runs on 10g.
    average execution time - 125 seconds
    The statement is:
    select /*+ full(t) nocache(t) */ count(1) from zz.zzz t;
    and there is no other activity on the host and the storage.
    Same number of logical and physical reads during 11g and 10g runs.
    During the above runs while run on:
    11g, iostat reports ~14MB/s per disk
    10g, iostat reports ~5MB/s per disk
    After tracing these sessions we figured out that on 11g direct path read is used, while 10g uses db file scattered read.
    5. We can use AUDIT_SYS_OPERATIONS in conjunction with XML,EXTENDED for auditing purposes. 10.2.0.4 has a bug for this that is fix in 11.1.0.6 onwards.
    6. Database Resident Connection Pooling(Concepts guide 11g documentation)
    "Database Resident Connection Pooling (DRCP) provides a connection pool in the database server for typical Web application usage scenarios. DRCP pools dedicated servers, which comprise of a server foreground combined with a database session, to create pooled servers.
    A Web application typically acquires a database connection, uses the connection for a short period, and then releases the connection. DRCP enables multiple Web application threads and processes to share the pooled servers for their connection needs.
    DRCP complements middle-tier connection pools that share connections between threads in a middle-tier process. DRCP also enables you to share database connections across multiple middle-tier processes. These middle-tier processes may belong to the same or different middle-tier host.
    DRCP enables a significant reduction in key database resources that are required to support a large number of client connections. DRCP reduces the amount of memory required for the database server and boosts the scalability of both the database server and the middle-tier. The pool of readily available servers also reduces the cost of re-creating client connections.
    DRCP is especially useful for architectures with multi-process, single-threaded application servers, such as PHP and Apache servers, that cannot do middle-tier connection pooling. The database can scale to tens of thousands of simultaneous connections with DRCP."
    It will help us to improve dedicated server usage(currently we use shared server).
    7. A lot of bug fixes for bugs that don't have 10g patches , fixed in 11g only and affect us - examples XML,EXTENDED and AUDIT_SYS_OPERATIONS bug, FGA bugs, job system on logical standby database , "ORA-12569: TNS:packet checksum failure" during sqlplus login and so on.
    It's for sure that there are much more such convincing points, but a several days assessment will make it possible to identify the most important ones from performance/availability/security perspective for their environment. As it is often the case - the devil is in the details. It's all about the way they use the database.

  • Problem with persistence in Generic Sync application

    Hi:
    We are developing an application which runson SAP Mi 2.5, SP 18,
    Windows Mobile 5.0 and Generic Sync for PDAs.
    We need persistence in our application. We tried with persistence API but
    we found a problem and we send a message to SAP. Until we can solve
    this issue we must implement persistence in other way to satisfy our customer requierements
    Since now,we have implemented persistence with files but the performance of this solution does not meet our customer requirements (the search of data in the PDA is very slow).
    We are thinking in another solution, which consists on using
    Syncbos.Using this alternative, before making a generic sync, and
    executing the code shown below:
    SmartSyncRuntime.getInstance().getSyncBoDescriptorFacade
    ().getAllSyncBoDescriptors()
    the returned syncBOS are those which I have defined in XML. On the
    contrary, after making a generic sync, executing the same code, the
    returned syncbos ARE NOT those whic I have defined in XML. The only
    return that I get is the MIAUTH.
    Any other ideas?
    Thanks
    Kind Regards

    hi satur,
    there are some things to take care if you want to use the persistence layer of the
    SmartSync layer from your GenericSync app.
    first, you have to let the MI client think that your application is using the
    SmartSync functionality. this can be achieved by just including a dummy metadata
    meRepMeta.xml file in the war archive during the deployment process. once the
    MI client framework sees this during the installation, it will set a flag on the MSD
    that your app is a smartsync.
    second, if your app is considered a smartsync, MI will generate the delta request
    and upload messages for your data if ever you have your SyncBo defined in the
    metadata. Since you don't want such functionalities to be ON, i would suggest to
    mark all your SyncBo as local ones; i.e. using attributes suppressDownload=true
    and suppressUpload=true. this way, the MI framework will skip creating the requests
    and delta upload messages for your app during the synchronization process.
    third, your application has to have the syncEventListener implementation to get
    notification when the Sync button (or event) was initiated. if you don't want your
    app to be notified, you may just add synchronization button within your application
    that will call your data manager to prepare your containers (i.e. retrieving the newly
    inserted syncbo, modified syncbos and the list of deleted ones -> genericSync
    containers) and to call the synchronizeWithBackend method.
    fourth, you need to have the inboundProcessor that will parse your data and insert
    them a SyncBo into your local database.
    having tried this but i guess it might work...
    regards
    jo

Maybe you are looking for

  • Compressor crashes on start-up.

    Hi all, whenever I launch Compressor it Crashes just a moment after the splash screen appears. I use compressor with Final Cut Studio and all software is up to date. I have followed the instruction from the knowledge bace to delete certain files and

  • Mail Services:  Is fetchmail supported?

    I have a Mac Pro running OS X and is configured to provide mail and DNS services. When I need to use a VPN connection, these services become unavailable to other systems on my network. As a solution to this problem a purchased a Mac Mini Server. Afte

  • Re: No order confirmation or order history

    I made an online order this morning as well, but mine is to ship out rather than pick up. I never got a confirmation email from BBY, nor is my order showing up on the order history page. I did get a confirmation of the order from PayPal, however. Unl

  • User Exit BEFORE Login

    Hi experts, I have a problem: We use differerent solutions for Web Access for externals - Web Dynpro and a normal GUI, shown via WEBGUI. So we create a new user (SU01) for the external and he can access the system But this problem may appear: The ext

  • Windows won't load! Help!

    I have a Toshiba C655-S5132.  In the middle of doing a Windows upgrade, we lost power and now Windows won't load.  I have removed power cord, taken out the battery and turned back on (several times).  I get "Windows failed to start.  A recent hardwar