Experiences on JPA persistence providers other than standard SAP's

Hi developers,
in this thread I would like to gather experiences from all those who have tried using JPA persistence providers other than SAP standard implementation in productive environments
It would be very interesting if you could share you experiences, for instance with regards to:
- advantages of a specific implementation
- disadvantages (if any)
- new features available (e.g. Lazy support for Lob and single-value relationships)
- ease of transport (did you manage to somehow use the java dictionary DCs or what?)
- ease of build (e.g. EclipseLink requires additional build plugins to be developed)
- ease of overall setup: how long did it take to set the DI stuff up (SLD SC creation/track creation/check-in/check-out/activate/transport/...)?
thank you so much for sharing your experiences.
Regards
Vincenzo

Hi Vincenco,
yes, semantic IDs do not have a place in JPA. Semantic keys are needed, but not as IDs.
Both SAP JPA and EclipseLink use @GenerationType.TABLE generation if you define @GenerationType.AUTO. ("AUTO" just means that the persistence provider "should pick an appropriate strategy for the particular database" (javadoc)
Both TABLE and SEQUENCE are somewhat automatic.
I guess the fact of lost-values is because the fetching of IDs is done in another transaction (probably for performance reasons, not to have the sequence table as a bottle neck).
On Oracle, the combination of allocationSize on JPA side and INCREMENT BY / CACHE on Database side is as follows: allocationSize must be equal to INCREMENT BY, but JPA uses the intermediate numbers (which is not the case in normal (PL)SQL programming. There is no annotation-JPA-pendant to CACHE. But that JPA uses the intermediate numbers from memory may be considered as a JPA way of sequence caching (that may be further improved by Sequence CACHE for really big mass insers in one transaction).
CACHE>1 will give you lost values even with allocationSize = Increment BY = 1.
On the other hand, allocationSize=1 may give bad performance on mass inserts because the JPA provider must ask the database for every instance. allocationSize>1 (e.g. 20) is better but will again yield lost values. (But who cares with "long"?)
There is one important issue with both automated value creation strategies - GeneratorType.TABLE and GeneratorType.SEQUENCE: The ID cannot be set by yourself on instantiation of an Entity object. JPA spec defines that the ID is set at the latest on EntityManager.flush or EntityManager.commit, which is sometimes too late if you have container managed transaction boundaries.
But both SAP JPA and EclipseLink assure that the ID with Table and Sequence is set already after call EntityManager.persist(newObject). This improves a lot, but may be not enough.
Example:
@Entity(name="T_ORDER")
public class Order {
     @OneToMany(targetEntity=OrderItem.class, mappedBy="order", cascade=CascadeType.ALL)
     private List<OrderItem> items = new ArrayList<OrderItem>();
     public void addItem (OrderItem item) {
          this.items.add(item);
          item.setOrder(this);
@Entity(name="T_ORDERITEM")
public class OrderItem {
     @ManyToOne(targetEntity = Order.class)
     private Order order;
EntityManager em = emf.createEntityManager();
em.getTransaction().begin();
Order o = new Order();
OrderItem i1 = new OrderItem();
o.addItem(i1);
em.persist(o);
OrderItem i2 = new OrderItem();
o.addItem(i2);
At the end of this snippet, o and i1 have ID != null but i2 has ID==null. there is no way to "auto-persist" an object which gets into a relation to an already persisted object. i2 gets an ID!= null after flush or commit.
This may be tricky if your business logic that adds items is "pojo" without acces to EntityManager or if you do not want to mess up your business logic with flushes.
How to "broadcast" the  unique IDs of just inserted order items to the User Interface if they are not yet set in the last line of your SLSB?
We switched to simple UUIDs that are generated on instanciation. long VARCHAR2s, but it works fine and is very common.
Regards
-Rolf

Similar Messages

  • Email providers other than gmail and yahoo?

    We are moving and will be loosing our Comcast.net account. Are there any other internet providers other than gmail and yahoo that are nation wide that I can use firefox and thunderbird with?
    Thanks in advance for your help!

    Microsoft operates Outlook.com, formerly Hotmail. It offers IMAP connectivity so you can mirror your mail into any number of mail programs: http://blogs.office.com/2013/09/12/outlook-com-now-has-imap/
    There are, of course, dozens of companies around the globe that you could use as your free email service, but Google, Microsoft, and Yahoo probably are the "big 3" in this field.

  • Is it possible to place custom CIDX message other than standard CIDX SCom

    Hi ,
      Is it possible to place the custom CIDX message in any software component other than standard software component CIDX which SAP has provided.Is there any restriction for CIDX messages?
    Regards,
    Ravi

    Hi ,
      I have custom CIDX Message structure under standard SWC CIDX .when I applied Patch to this SWC ,the custom CIDX message structure has gone, only SAP provided CIDX message structures are available. So I would like to know can I have custom CIDX message structure in other SWC.
    Regards,
    Ravi

  • Goods Receipt requirement other than standard storage location

    Hi,
    SAP Guru,
    Kindly guide on how to take receipt of Raw Materials against Purchase order or without Purchase order at other than RM01 or RM02 Storage Location
    i.e. we purchase RM from Vendor A and we give this material to Vendor B for Job work and then we take GR from Vendor B
    We generated 2 Purchase Orders for Vendor A and Vendor B
    We cannot take receipt from Vendor A becuase they supplied prohibited material which cannot be taken as receipt directly in to SAP Standard Storage location instead we require to take receipt of same which accounts for Vendor B through which we can do Billing activity
    With Regards,
    kunal sheth

    hi
    as the vendor B is ur subcontractor ,u an use sub vendor deliery in po
    create po for vendor A
    now initem level delivery address tab ,at right side in vendor field give vendor B and tick for SC vendor
    now the delivery will be done at vendor side
    just try it
    regards
    KI

  • When will iPhone be availble for customers of providers other than AT&T

    Just curious to know if anyone has a clue, or guess, as to when Apple will release an iPhone that can legally be used with a service provider other than AT&T. That is if Apple ever will.

    AT&T has 5 year contract. Only have 1 year off so far, so four more years. As far as US goes, only TMoble has the type of network needed to be used on anyhow.

  • Reporting on date other than standard

    We would like to report on a different period than the standard. The report period starts on the 26th of the previous month and ends on the 25th of current month. For example. we would like to make a report that shows the opportunities per month based on the opportunity start date, an opportunity with start date 27th of December 2008 should be displayed in the month January of 2009. Is there any possibility to do this?

    Have a new field which shows Month, Put a formula using case statement stating if opportunity start date is greater than 25 then Next Month of the opportunity start date else the same month as the opportunity start date. This will help you

  • Idocs other than standard idocs?

    Hi friends,
            What idoc's would be used if our data is not a standard data like Sales order data(ORDERS idoc).
    I mean if our client has tyre manufacturing business, and he has data like article data, carton data etc. Then what idocs we would be importing in IR to send the article data or carton data from SAP system to any receiver system.

    You can either create your own Idocs or enhance standard idocs
    /people/jiaxiang.huang/blog/2008/01/14/some-experience-on-idoc-enhancement
    See Idoc section:
    http://www.henrikfrank.dk/abaptips/abapindex.htm

  • Providers other than AT&T

    Dears, my mobile service provider is Vodafone-Egypt, did the IPhone needs special crack to work with this network or what?

    Yes.
    The iPhone is sold by Apple in the U.S. as carrier locked with AT&T only, in the UK as carrier locked with O2 only, in Germany as carrier locked with T-Mobile only and in France as carrier locked with Orange and an unlocked version is also sold in France which is mandated by French law and sold at a significantly higher price than the carrier locked iPhone.
    These are the only countries where Apple sells the iPhone at the present time and even the unlocked version sold in France may not work with Vodafone in Egypt. The unlocked version may work with other French carriers in France only.

  • How do I change DHCP range other than standard options

    Recently I discoverd that the settings of the DHCP range of my Time Capsule changed after an update. Through my provider we have received a DHCP-range so I can access the disks remote via BTMM. Due the the internal fiber network it was necessary to adjust this. The range which was set started with 37.17. After the update it is only possible to choose from 10.0, 172.16 or 192.168.
    The problem now is that I cannot remotely access my TC from outside the office. Can anyone please hand me a sollution.
    See screen captures below
    NEW:
    OLD

    This is interesting one.. normally the setup when using a block of IP's is not NAT at all. NAT must use the private IP address range.
    So I am not sure how it worked in the old setup.
    On the Internet tab.. you should select the static IP.
    Then on the network tab, you set the dhcp to the actual range of addresses that you have been given.. surely not the whole block of 200 addresses.
    That is just how the Apple auto fills it in.
    It is only if you NAT that you would then have issues with the private IP range.
    In this case you are NOT going to NAT. You are applying an ISP provided range of IP addresses to your clients.. and you must use just dhcp..
    I cannot understand how you OLD picture with dhcp and nat could have worked. But it was a mistake in an older utility.. at a guess.

  • Does anyone provide connection to SAP sys. thru SolMan other than for SAP?

    I have had staff ask IF there are issues with having 'off shore' consultants log into our landscape thru SolMan?
    My preference would be NOT to, as we have we would be generating long distance charges as well as the connections tend to time out during a period that they are not in use.
    I believe this connection was meant to only have SAP log in to our systems for the purpose of trouble shooting issues for messages
    Anyone? please advise
    Thanks& Regards,
    Maria

    I think it depends on what you want your offshore consultants to do in your systems.
    If they have all access on the remote systems and on your SolMan, it doesn't really matter how they logon, wether it is using a gui or using the remote connections in SolMan.
    They have the same authorities.
    So, a best practice...... It's all up to your own wishes.
    All I know is SAP suggests that you administrate all your systems from Solution Manager.
    1 Access point to all systems. And when setup properly, you only need to logon once.
    From a technical point of view, I'd recommend setting it up.
    As far as the workcenters are concerned, these are webdynpro pages.
    They do exactly the same as the "normal" ABAP transactions. It only looks a bit more user-friendly.
    Plus the oversight is better. The content of the tabbed areas is logically grouped.
    Read the following document, might be helpfull
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/80f23fae-d7e2-2a10-34b5-f049d65d34d6
    Regards,
    David

  • WT SynchManager instl. on a different Server other than SAP/SQL Server.

    Hi,
    Is it possible to move/install WebTools SynchManager on a different server other than the SAP/SQL Server? Please let us know.
    Note: 
    1. We are aware of the recommendation:  u201CInstall the SynchManager on the SAP Business One server on which the DI API is installedu201D in the "Business One Web Tools SynchManager Guide.pdf".
    2. But, SAP/SQL Server at our Client is starving of RAM due to a high number of windows services/application trying to run at the same time (although the maximum amount of RAM possible under the current configuration is installed (4GB)).
    3. So, we are evaluating as to which of these application (WebTools being one of them) can be moved to a different server.
    Thanks and Regards,
    Kafil Shumon.

    Hi Kafil,
    You can put the synchmanager on a different server as  long as the DI API is installed and that server can access the B1 licensing server.

  • Slow running time of Standard SAP Reports

    Hi Experts,
    Standard PS reports (such as the one with the transaction code s_alr_87013558) are taking quite a lot of time to fetch the desired results.  After further analysis we have found that the time in retrieving the data from certain standard tables is the root cause behind this issue.
    Is there a way in which we can speed up the processing time for fetching the results?
    Regards
    Varun

    Hi Varun,
    Other than increasing the physical memory all other are standard SAP practices to increases the performance of the reports..
    The standard reports will definitely fetch the data from COEP, COSP or RPSCO tables, and these are very heavy tables.
    if you are taking help from ABAPer, he should be able to do some primary indexing on these tables to see the querying is faster..
    On a lighter note.. wait for HANA upgrade..
    Regards
    Sammar

  • Warning: Supported source version 'RELEASE_6' from annotation processor 'org.eclipse.persistence.internal.jpa.modelgen.CanonicalModelProcessor' less than -source '1.7'

    warning: Supported source version 'RELEASE_6' from annotation processor 'org.eclipse.persistence.internal.jpa.modelgen.CanonicalModelProcessor' less than -source '1.7'
    Note: Creating static metadata factory ...
    An annotation processor threw an uncaught exception.
    Consult the following stack trace for details.
    java.lang.ClassFormatError: Absent Code attribute in method that is not native or abstract in class file javax/persistence/PersistenceException
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:760)
        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:455)
        at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:367)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:360)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
        at java.lang.Class.getDeclaredFields0(Native Method)
        at java.lang.Class.privateGetDeclaredFields(Class.java:2570)
        at java.lang.Class.getDeclaredField(Class.java:2055)
        at org.eclipse.persistence.internal.security.PrivilegedAccessHelper.findDeclaredField(PrivilegedAccessHelper.java:67)
        at org.eclipse.persistence.internal.security.PrivilegedAccessHelper.getField(PrivilegedAccessHelper.java:223)
        at org.eclipse.persistence.internal.helper.Helper.getField(Helper.java:980)
        at org.eclipse.persistence.internal.descriptors.InstanceVariableAttributeAccessor.initializeAttributes(InstanceVariableAttributeAccessor.java:100)
        at org.eclipse.persistence.mappings.DatabaseMapping.preInitialize(DatabaseMapping.java:1455)
        at org.eclipse.persistence.mappings.foundation.AbstractDirectMapping.preInitialize(AbstractDirectMapping.java:913)
        at org.eclipse.persistence.oxm.mappings.XMLDirectMapping.preInitialize(XMLDirectMapping.java:439)
        at org.eclipse.persistence.oxm.XMLDescriptor.preInitialize(XMLDescriptor.java:559)
        at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.initializeDescriptors(DatabaseSessionImpl.java:649)
        at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.initializeDescriptors(DatabaseSessionImpl.java:632)
        at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.initializeDescriptors(DatabaseSessionImpl.java:568)
        at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.postConnectDatasource(DatabaseSessionImpl.java:799)
        at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.login(DatabaseSessionImpl.java:756)
        at org.eclipse.persistence.oxm.XMLContext$XMLContextState.setupSession(XMLContext.java:738)
        at org.eclipse.persistence.oxm.XMLContext$XMLContextState.setupSession(XMLContext.java:1)
        at org.eclipse.persistence.internal.oxm.Context$ContextState.<init>(Context.java:86)
        at org.eclipse.persistence.oxm.XMLContext$XMLContextState.<init>(XMLContext.java:702)
        at org.eclipse.persistence.oxm.XMLContext.<init>(XMLContext.java:192)
        at org.eclipse.persistence.oxm.XMLContext.<init>(XMLContext.java:164)
        at org.eclipse.persistence.oxm.XMLContext.<init>(XMLContext.java:154)
        at org.eclipse.persistence.internal.jpa.modelgen.objects.PersistenceXMLMappings.createXMLContext(PersistenceXMLMappings.java:139)
        at org.eclipse.persistence.internal.jpa.modelgen.objects.PersistenceXMLMappings.createXML2_1Context(PersistenceXMLMappings.java:123)
        at org.eclipse.persistence.internal.jpa.modelgen.objects.PersistenceUnitReader.initPersistenceUnits(PersistenceUnitReader.java:178)
        at org.eclipse.persistence.internal.jpa.modelgen.objects.PersistenceUnitReader.<init>(PersistenceUnitReader.java:72)
        at org.eclipse.persistence.internal.jpa.modelgen.CanonicalModelProcessor.process(CanonicalModelProcessor.java:376)
        at com.sun.tools.javac.processing.JavacProcessingEnvironment.callProcessor(JavacProcessingEnvironment.java:794)
        at com.sun.tools.javac.processing.JavacProcessingEnvironment.discoverAndRunProcs(JavacProcessingEnvironment.java:705)
        at com.sun.tools.javac.processing.JavacProcessingEnvironment.access$1800(JavacProcessingEnvironment.java:91)
        at com.sun.tools.javac.processing.JavacProcessingEnvironment$Round.run(JavacProcessingEnvironment.java:1035)
        at com.sun.tools.javac.processing.JavacProcessingEnvironment.doProcessing(JavacProcessingEnvironment.java:1176)
        at com.sun.tools.javac.main.JavaCompiler.processAnnotations(JavaCompiler.java:1173)
        at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:859)
        at com.sun.tools.javac.main.Main.compile(Main.java:523)
        at com.sun.tools.javac.main.Main.compile(Main.java:381)..................
    I'm an undergraduate student in software engineering. I worked with EE and tried to built a EJB Application. It worked. But when i connected it to database using persistence it getting error as mentioned.
    When i change my source Binary Format to jdk6 it runs without errors. What can i do for this without downgrading jdk version?

    I resolved my problem. The issue was the version of EclipseLink that I had specified in my pom.xml. Version 2.0.1 has an issue with the meta-model generation and, in fact, I wanted to be using version 2.1.1. Once I changed to 2.1.1 everything compiled correctly.
    Just make certain that you include the correct EclipseLink repository.
    <repository>
    <id>EclipseLink Repo</id>
    <name>EclipseLink Repository for the JPA implementation</name>
    <url>http://www.eclipse.org/downloads/download.php?r=1&amp;nf=1&amp;file=/rt/eclipselink/maven.repo</url>
    </repository>

  • I need to add a mileage calculation box to an existing form created by someone other than me. Please help, I am new to javascripting.

    I have the book 'Creating Dynamic Forms with Adobe LiveCycle Designer, but none of the javascript or formcalc script is working. Can someone tell me step-by-step how to go about adding this to the existing dynamic form?
    I added a small table on the existing subform, with the other 2 tables already in the form. This looked like a straight forward project. But, I have not any experience in java script other than googling for script and adding it to Adobe Acrobat fillable forms. So, I am sure I am going at this wrong.
    Respectfully

    Hi,
    can you provide the script you have tried and what exactly you want to do. What is the calculation you are trying to do?

  • How to install ovi suite to a drive other than C:?...

    how to install ovi suite to a drive other than c:??? my c: drive is almost full with other partitions perfectly free to install it, how do i do that? can i use previous versions of ovi suite to use with my e63? at this point, i'm unable to use ovi suite at all, because there's no room to install it on my c: drive.
    allllllllso there's one more thing, when i originally had tried installing ovi suite on my computer i had more than 1gb free. after installing it i on'ly had 500mb free. i had only intended for it to use a very small amount of space, and since i also use my c: drive for virtual memory i quickly uninstalled it, looking for an option i'd maybe skipped over while installing it the first time. no luck. anyways, when i looked in the add/remove programs control panel the installed size of ovi suite was only 40-50mb. even after uninstalling ovi suite the extra memory space that seemed to all of a sudden taken up by the installation stayed used.
    when looking at the file sizes of everything on my hard drive, (including system files and paging file) there is still a descreprency between the amount of memory used and the size of all files total on the drive. at this point im quite disgusted and disapointed in ovi suite as i'm mostly unable to use it to connect my phone to my computer and i'm also having problems with the CA101 cable as well. i guess i'll have to go check for another cable.
    nokia!!! wake up and fix yo **bleep**!!!!
    anyone have any solutions for the main problem? (installing to a drive other than c? is there support for this option in any of the new beta versions? can that be included in the newest betas? i'm suuuuuure i'm not the only one begging for this option!!!

    Hi ostrenga4, sorry to hear about your experiences.
    When installing Nokia Ovi Suite to PC, Windows makes "system restoration points", which are available to restore operating system to previous condition, if something goes wrong, for example in driver installation.
    You can change install location of Nokia Ovi Suite with following:
    - Download Nokia Ovi Suite install package from Nokia Ovi Suite pages
    - Start Windows Command prompt
    - From Command prompt, navigate to folder containing Nokia Ovi Suite install package, which you downloaded
    - Start Nokia Ovi Suite install package with command line "Nokia_Ovi_Suite_webinstaller.exe /TARGET="D:\TestDir\Test"
    - This results, that Nokia Ovi Suite installer creates folder D:\TestDir\Test (if that doesn't exist) and installs Nokia Ovi Suite there.
    - Unfortunately, Windows Installer still keeps installer cache files and system restoration points in C: drive (or whatever your system drive is)
    As you can see, this is possible, but it is very much recommend to have enough space for installing software into system drive.
    Cheers, Samuli

Maybe you are looking for

  • I can no longer receive my verizon email

    the mail server "incoming.verizon.net" is not responding. verify that you have entered the correct account info in mail settings. I haven't changed a thing but I can not longer get email

  • Error with Contribute 3 on Windows Vista

    Hi With Contribute 3 on Windows Vista, does anyone know if anything can be done about the following error: Error 1904.Module C:\Windows\system32\Macromed\Flash\Flash.ocx Failed to register. HRESULT -2147220473. Contact Your support personnel MMxtp ha

  • IPod cycles hard reset after Texas Hold'em install

    I'll send the message to Apple and call as well tomorrow, but thought I would throw this out there to see if anyone has advice - and also as a cautionary note. I downloaded Texas Hold'em tonight to install onto my 5G Video iPod. I'm running iTunes 7.

  • Russian Voice

    Dear friends, could you recommend me a way to make my mac tts speak russian text out? what ive realised through searching the internet, is that there must be some kind of voice for it. Russian voice. So im wondering how else (maybe?) to make my mac s

  • Iphoto doesnt open

    I´m getting insane!!! Please help me... My IPhoto, ITunes, PhotoBoot and even the software update doenst work. The icones start to "jump" but they dont open... What can I do?