Issues in using JPA in Desktop Application

Hi, I have some doubts in certain issues. For my desktop application, I have 4 manager class, which includes all logic codings in it and serve different area in the application, with each using an entity manager. It seems to me that creating an entity manager to each manager class is a bad design. Is there any other ways that could allow me to share the same entity manager? Or a better design that I dont know of? Thanks!

Hi Vishnu,
There is no solution for this, you cannot have GUI interactions(nor any statements that might invoke a implicit/explicit commit) in a V2 update. When you say this worked, did you have update debugging enabled, if so then it might have worked as the debugger session can access GUI...
If the whole idea/need of this output is to download a file, use OPEN DATASET, TRANSFER and CLOSE DATASET.
Even for the RSNAST00 execution, i am sure that in the actual business scenario(in production) this would be scheduled as a background job, where in again "GUI_DOWNLOAD" wouldn't work.
Regards,
Chen

Similar Messages

  • What data binding framework to use for EJB(JPA) - Swing desktop application

    Hi!
    I am developing EJB server application which mostly uses the same entities and session EJB's both for web and for desktop user interface. While JSF is working nicely, I am stuck with necessity to make decision with data binding framework to use for desktop application - I investigated:
    - JSR295 reference impementation at java.net (beans binding)
    - Eclipse JFace
    - JSR295 implementation at kenai.com (better beans binding)
    - JGoodies binding
    At present I like JGoodies, but I am not sure whether I am not missing something - I guess - large enterprises should develop a lot of desktop applications as well and what binding framework they are using?

    user454720 wrote:
    At present I like JGoodies, but I am not sure whether I am not missing something - I guess - large enterprises should develop a lot of desktop applications as well and what binding framework they are using?No, not really. I create them sometimes but they are service tools, not part of the main application framework. Generally you keep everything on the server, web based - this keeps it secure, accessible and contained. With all the web 2.0 javascript toolkits available nowadays you can go quite far creating a desktop experience in a browser, with limitations.

  • Known Issue while running Adobe Story desktop application for the first time on Mac OS 10.8

    You may encounter the following error message while running the Adobe Story desktop application for the first time on Mac OS 10.8:
    For resolution, please go to:
    http://helpx.adobe.com/story/kb/run-story-app-mac-os.html

    The /Developer directory contains the compiler(s) and various tools and libraries.
    Does your user account name really contain a single quote? If so, it looks like the quote is getting eaten by one of the build scripts, which is resulting in a file path that doesn't exist.

  • Communicate with MTP device using C# desktop application

    I want to communicate(Read / Write) with android phone connected with desktop machine as MTP device using C# in Desktop application.
    When phone is connected in MTP mode, not as USB drive.
    Ram Swami

    Hi,
    mybe the links below can assist you:>
    WPD Application Programming Interface
    WPD: Transferring Content
    MTP, WPD, OMG
    Mark as answer or vote as helpful if you find it useful | Ammar Zaied [MCP]

  • Using AIR for all application.

    Hi to all!
    In this days i'm trying to use Adobe AIR with FLEX to build
    RIA on Desktop and other application (like company managment and
    other:) In past i used VB .NET, C++, C#, and JAVA. I know that this
    are the language for "antonomasia" to build company managment
    software, but for you, what is the negative aspect to use AIR in
    Desktop application? For example:
    - Performane? (Database handling is not optimal, or other
    issue....)
    - Using AIR interpreters means up RAM and CPU usage, or
    others?
    - Other..
    Thanks boys!

    Its possible but you would need to tell each movieclip and audioclip to play/pause. You can create a for loop inside your mouse event function to find each movieclip and pause/play its timeline and a separate for loop for audio clips. Also instead of setting fame rate to 0 for pause just use a stop() command.

  • How to use GUI_DOWNLOAD inside BSP Application event

    Hi All,
    I am facing one issue while using GUI_DOWNLOAD inside BSP Application. When the processing goes at GUI_DOWNLOAD it gives me unknown error where as the same code is working when used in report program. My requirement is to save password into excel file at my local machine. I am using FM MS_EXCEL_OLE_STANDARD_DAT to save password in excel file but this function module fail when it reach at GUI_DOWNLOAD . Can you please help me out.
    Thanks and Regards
    Pradeep Kr. Rai

    Dear Pradeep,
    Find the below link which explains a simple data download to excel from a table view.
    www.sapt echnical.com/Tutorials/BSP/Excel/Index.htm
    Try to avoid the way your using in the BSP application and it is abdicable to use the standard methods / class available like "cl_bsp_utility"
    Hope this will be helpful.
    Regards,
    Gokul.N
    Edited by: Gokul on Oct 8, 2009 9:57 AM

  • "Severe database error" makes it impossible to sign into Story desktop application. How can I fix?

    When I open the Adobe Story desktop application and sign in, I immediately receive the following message:
    "ERROR:
    Sorry, your Story Free subscription does not allow access to the application in online mode. You can work in the offline mode to retrieve your files."
    I want to work in offline mode, so I click "Work Offline."
    Immediately after I click this, I got another error message:
    "OFFLINE DATABASE ERROR - ADOBE STORY
    Adobe Story has encountered a severe database error and will not be able to retrieve some of your data from your last session. You can recover rest [sic] of your data by either restoring your account to the last backup date or by synchronizing it with your online account."
    I'm then given two options:
    Restore to the last backup date [GRAYED OUT, because I never backed up]
    Sync with my online account( Sign in required )
    I choose the only option I can, then click "Continue."
    This immediately cycles me back to the opening screen, "Your next great story starts here," with the options "Learn more" or "Sign in."
    Every time I click "Sign in," Adobe Story repeats all the steps listed above, making it impossible for me to actually use the program, UNLESS of course I upgrade to Adobe Story Plus, which I don't intend to do.
    Is there any way my account can be fixed to allow me to use the Story desktop application without all these error messages? (I've tried uninstalling and reinstalling already.)
    I just started using Story, so I have no earlier projects to retrieve. Story can wipe my account clean if necessary, it doesn't matter.
    However, I've run into so many problems just trying to *start* using Story that I'm really worried about this program's reliability, especially for the middle of a production. Hopefully after further testing I won't run into so many problems.

    Hi,
    try this
    open item Ifile

  • Flash air desktop application

    Hello there,
    We developed an application.
    The window of our application cannot be maximize after it is install on our desktop.
    How could we get this fonctionnality?
    Please help.
    Many thanks

    Are you saying that it is possible to get this fonctionality (maximise
    without stretching) when using flash air desktop application?
    Yes, you can maximize a window without distorting the contents. When using Flash, the stage scale mode defaults to one of the scaling modes. For your app it sounds like you should set the scale mode to the "noScale" option.
    If yes, Do you recommend the utilization of aire for the distribution of our
    application?
    I don't know enough about your application to make any kind of recommendation, and anyway my opinion might be biased since I am an Adobe employee.
    Also could you recommend us a way for limiting the illegal distribution?
    I don't think there is a fool proof way to do it (in general DRM is a race between the publishers and the hackers). Adobe doean't provide any tools for this. Presumably, there are 3rd party tools for application DRM that you could use (but that's outside my area of expertise).
    For a homegrown approach to the problem, you could require that users of your application create a user account on your web site and download a license file in order to run the application.  This isn't perfect, because someone could hack your application to remove the check for the license, but it would prevent casual copying.

  • Weird issue with merge using JPA...?

    Hi all,
    I have the following code snippet (HsTrans has a manytoone relation with Hss), Hss is the parent
                HsTrans hsTrans = new HsTrans();
             Hss hss=em.find(Hss.class, studyId);
             hsTrans.setStudy(studyId);
             hsTrans.setState(state.toString());
             hsTrans.setTimestamp(timeOfState);
             hss.getHsTrans().add(hsTrans); //Add child to aprent
             hsTrans.setHss(hss);                //Child Parent
                em.merge(hss);  // Does not work Throws a Unique Key violation error
    Whereas replacing the same with this
             Hss hss2=hsStudyTrans.getHsStudy(); 
                em.merge(hss2); // Works fine
       Does anyone know if this is a JPA bug or some other issue.
    Thx
    VR

    RainaV wrote:
    Does anyone know if this is a JPA bug or some other issue.JPA is a specification, so it has no bugs (only design flaws). If there is a bug somewhere it is in the persistence provider you are using, but most likely it is just you not understanding how merge and transaction management in general works. I've written dozens of applications now that use JPA and I think I really needed merge a grand total of once.
    In this snippet you provide, you are apparently making the 'hss' object managed through the em.find() method. This means that any changes you make to it will be made persistent as soon as the transaction is committed. You don't need to call merge() at all, you only call that on entities that are detached.
    Now for the actual problem of unique key violation, I don't even see you committing hsTrans. Change the code to this:
    HsTrans hsTrans = new HsTrans();
    Hss hss=em.find(Hss.class, studyId);
    hsTrans.setStudy(studyId);
    hsTrans.setState(state.toString());
    hsTrans.setTimestamp(timeOfState);
    hsTrans.setHss(hss); // set managed hss object
    em.persist(hsTrans); // persist hsTrans and make it managed
    hss.getHsTrans().add(hsTrans); // add the new managed hsTrans to the hss mapped collection

  • Help needed to create desktop application background using javaFx.

    Hi,
    i need to create background for my desktop application in JavaFx. It have top side bottom menu bars to place icon buttons for my app. The whole scene need to resize. I had tried this using
    JavaFx composer. But my issue is like in java swing i can not able to create different panels and set different styles. Please help me on this issue.
    Thankyou.

    Hi mate take a rectangle and fill it to scene width !
    use fill gradient and bind it to your main scene.width
    for example :
    Rectangle {
    fill: color.Blue
    stroke: LinearGradient {
    startX: 125.0, startY: 0.0, endX: 225.0, endY: 0.0
    proportional: false
    stops: [
    Stop { offset: 0.0 color: Color.web("#1F6592") }
    Stop { offset: 1.0 color: Color.web("#80CAFA") }
    use appropriate start and offset then bind it to scene width and height.
    width : bind scene.width;
    height : bind scene.height ;

  • We have developed a desktop application using Flash software and published the same for MAC environment. When we double click on the index.app file, the application is working perfectly in Mac 10.6.7 at our office. But if the same index.app file is double

    We have developed a desktop application using Flash software and published the same for MAC environment. When we double click on the index.app file, the application is working perfectly in Mac 10.6.7 at our office. But if the same index.app file is double clicked in Mac 10.6.7 at out clients location, its not opening. For your information the client is able to open this same application by double clicking on index.swf file. The main problem is that client is not able to open the application using index.app file at their office whereas we are able to do so at our office. Can anyone give some suggestions to sort this problem?

    The most common reason is different versions of Flash, or different versions of web browsers used.  Some users may elect to not have Flash installed at all because of the processor overhead of Flash.  If you are going to make an application for a client, check what operating system and browser versions they are using first.  Then determine if a stand alone application is required, or if they have the necessary plugins to run specific browser enhanced code.
    P.S. MAC is an acronym for Media Access Control.  Mac is the shorthand for Macintosh, the operating system and computers made by Apple Inc.

  • When using my MAC desktop, when I try to play a video on the Apple Homepage I just get a spinning wheel and it says "missing plug-in".  What's the issue?

    When using my MAC desktop, when I try to play a video on the Apple Homepage I just get a spinning wheel and it says "missing plug-in".  What's the issue?

    Yep. I installed Lion this morning. Open Mail. All is good. Went to video on the Apple's homepage and my whole computer froze up. I couldn't even shut down the computer properly. I just had to shut it off and restart. :|
    Although, no "missing plug in" prompts were coming up for me. Just a frozen (brand new) iMac.

  • What is the best practice when distributing a desktop application which uses SMO

    I have a WPF application which installs a web site. One of the installation steps is to execute a number of SQL scripts which will install website's database. The database server is not necessarily the same machine as the product is installed - in most cases
    it's a different server on the same network. All the scripts are generated by a build of database project (visual studio 2012 db project) - hence all of those are in sqlcmd mode.
    I can workaround sql variables (:variable - type of creature) by making some simple text replacements. The big problem is with the "GO" statements. At first I thought that I can split the script into many subscripts using a regex split operation
    defining "GO" to be the separator - this did not work; having a world Polygon in the script will cause the whole operation to fail. Unfortunately I have no control  over the content of the script hence if someone will decide
    to put a comment like /* If you do not know how to use this script then GO TO HELL */ would break the installation process.
    I have then tried executing the whole script (with "GO" statements) using SMO. This works well on my development machine but once I try to do this on a server, application falls over missing dlls. Now for Microsoft.SqlServer.ConnectionInfo, Microsoft.SqlServer.Smo, Microsoft.SqlServer.SqlClrProvider
    and Microsoft.SqlServer.SqlEnum the solution is simple - I can just set "Copy local" to true and those dlls will be distributed with the application. 
    Big problem is with Microsoft.SqlServer.SqlClrProvider.dll. OK, I can get this library from my local machine - but I am not sure which SQL version this will be used with. I can't include more than one of those dlls as all of those have the same name. 
    I know that the official MS line is to install SQL feature pack (http://msdn.microsoft.com/en-us/library/ff713979.aspx). But again - I do not know which version of SQL my application will be working with, and I need to make the installation process as simple
    as possible. 
    My question is - is there a way I can distribute a desktop application (which makes a use of SMO) without any prerequisites and for all versions of SQL server? If there is no such a thing then using SMO is pretty much pointless as it cannot be distribute
    - even if then it's not version agnostic... Thanks for any help! 

    I agree with Olaf, when you want to ensure that you can interact with any version of SQL Server.
    The problem you will run into if you are not controlling the version of SQL Server is in the version of SMO. If you use SMO version 10.5 and need to deploy using SMO to SQL 2012, it will not work. SMO will always be backward compatible but not forward compatible.
    So you would have to have a max version of SQL Server your setup would deploy to in order to control errors and failures. So if you distribute SQL 2012 SMO then the max version would be SQL 2012 for the deploy.
    So using a tool that is version agnostic is the way to go, and you can also use in .NET the System.Data.SqlClient to execute statements against the SQL Server as well. This will be version agnostic too.
    Ben Miller - SQL Server MVP, SQL MCM 2008 - @DBADuck http://www.dbaduck.com

  • Using Apple Remote Desktop with Audio Applications

    Hello, I am configuring a setup consisting of a Mac Pro with Mac OS 10.4.9 running Logic Audio and a Mac G5 Quad with Mac Os 10.4.8 running Protools HD.
    I am considering using a Gefen Systems KVM switcher, or Apple Remote Desktop.
    Has anyone had any experience using Apple Remote Desktop to run Protools?
    Scott

    if all you need is to be able to control another computer, then ARD would be overkill. Look into the freeware VNC. That will give you control capabilities and not cost you anything. You can find VNC applications for Mac here. Most people seem to find Chicken of the VNC works well for them.

  • Use of Shared Variables for data transfer from a RT traget to a desktop application

    Hi,
    I want to adopt the shared variables to share data in an existing distributed application comparable with the T3 Benchmark configuration in this document:
    [1] http://zone.ni.com/devzone/conceptd.nsf/webmain/5B4C3CC1B2AD10BA862570F2007569EF
    The current implementation uses a well tuned solution with RT FIFOs and TCP/IP communication with a desktop-PC which monitors and stores the data.
    The desktop application runs with a much slower execution rate than the TCL. So the TCP/IP packets are used to buffer the data with a package size dependent on the data send rate.
    To use the shared variables instead of this RT FIFO + TCP/IP implementation I need to read the shared vairable buffer at once each time the desktop application reads the shared variable.
    But according to this quotation from [1]:
    "With buffering, you can account for temporary fluctuations between read/write rates of a variable. Readers that occasionally read a variable slower than the writer can miss some updates."
    this seems to be impossible. Am I right?
    Are there any suggestions to circumvent this problem? Or are shared variables not made to share data between unsynchronized processes without data loss?
    Regards Till

    You can use the error-cluster to detect the end of your queue. The erroroutput of the shared variable will return a -2220 Warning, if it reads a value it has read already before. I attached a modified example and saved it for 8.2 I hope you can open it.
    Attachments:
    readbuffered82.zip ‏51 KB

Maybe you are looking for

  • Vendor Ageing Report Business Area and Profit Center wise

    Dear Experts, I have a requirement where user wants a Report for Vendor Ageing Business Area and Profit Center wise.I checked Standard T Codes but the same were Business Area wise but i could'nt find Profit Center wise Report.If their is any standard

  • PowerMac G4 MDD - HD video playback?

    I have been searching for a bedroom computer to plug into my TV recently, and the mirrored drive door PowerMac G4 caught my eye on eBay the other day. Would these machines in particular be capable of playing HD (720p or 1080p) video stored on the bui

  • Help! Problems with Display

    My ipod photo was working great. Now, though, when I play music, I see NOTHING but the album artwork and the time of day displayed on the screen. Pressing the middle button to toggle doesn't work. How do I get back to showing the song name, artist na

  • Creative Zen MX 8gb?

    CFirst of all sorry for posting this in this section but i didn't know where i should post it. Well i resently updated my Zen MX 8gb but when i plug it into my laptob(i have windows 7) the memory that my zen was having was 50 mb. I don't know how to

  • Draw a line at a threshold of high colour contrast

    Hello, I'm wanting to write a script where photoshop can analyse a photo and draw a line where there is a high contrast of adjacent pixels. So i'd need a pixel differentiating script (like magnetic wand) which preceeded a draw line script i guess. Ex