SAPbobsCOM and C# multithreading

I'm writing a web application which updates objects in SAP BO. It works perfect except it's taking forever to setup the connection to SAP and update the objects. So I thought to create a background thread to handle the update to SAP while the active thread can continue processing the current request. But it appears not to be as easy as this. I'm no expert on writing multi threaded code but the few multi threaded methods I wrote work just fine.
This is what I try to do: on the website a user can change his phone number. The web app saves this 'change' in a database. Just after it is saved in the database a new thread is started. This background thread checks the database and pickes up all pending changes and tries to push them to SAP. The code works when don't try to run it in a background thread. When I run it in a background thread I can step through the code with the debugger until the line company.Connect(). This normaly takes a while before I can step to the following line in code, but instead it quits debugging. It looks like the thread is killed when a response is send back from SAP.
Does anyone managed to get a similar solution working and can push me in the right direction?
I know I can write for example a windows service which does just what the background thread is doing, but this means you have to install a windows service on the webserver. Thats what I trying to avoid for multiple reasons.

I found the solution. Instead of creating a background thread to connect to SAP, I create a new application domain. The code connecting to SAP runs in this appdomain. I start this appdomain in a separate thread.
I haven't fully tested this yet, so any suggestions to optimize the code are greatly appriciated.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Web;
using System.IO;
using System.Reflection;
namespace SapSync {
    public class SapTasker {
        /// <summary>
        /// Sends all updates in the queue to SAP in a separate thread.
        /// </summary>
        public static void RunUpdate() {
            Thread thread = new Thread(RunUpdateInNewAppDomain);
            thread.Priority = ThreadPriority.BelowNormal;
            thread.Start();
        private static void RunUpdateInNewAppDomain() {
            AppDomainSetup ads = new AppDomainSetup();
            ads.ApplicationBase = System.Environment.CurrentDirectory;
            ads.DisallowBindingRedirects = false;
            ads.DisallowCodeDownload = true;
            ads.ConfigurationFile = AppDomain.CurrentDomain.SetupInformation.ConfigurationFile;
            AppDomain appd = AppDomain.CreateDomain("sapUpdate", null, ads);
            // Create an instance of MarshalbyRefType in the second AppDomain.
            // A proxy to the object is returned.
            MarshalByRefType mbrt = (MarshalByRefType)appd.CreateInstanceAndUnwrap(Assembly.GetExecutingAssembly().FullName, typeof(MarshalByRefType).FullName);
            // Call a method on the object via the proxy, passing the
            // default AppDomain's friendly name in as a parameter.
            mbrt.UpdateSap();
            AppDomain.Unload(appd);
    // Because this class is derived from MarshalByRefObject, a proxy
    // to a MarshalByRefType object can be returned across an AppDomain
    // boundary.
    public class MarshalByRefType : MarshalByRefObject {
        //  Call this method via a proxy.
        public void UpdateSap() {
            SapUpdateHandler suh = new SapUpdateHandler();
            suh.UpdateSap();

Similar Messages

  • Is it supported to use Microsoft JDBC driver use in Java 7 (and 8) multithreaded applications?

    Hello everone
    is it supported to use Microsoft JDBC driver (the latest version) with Java 7 multithreaded application?
    I am planning to use standard Java 7 threads library and use separate JDBC objects per each thread, i.e. Java threads will not share any JDBC objects among them, only the thread-safe Java collections/data structures will be shared between threads (such as
    ConcurrentHashMap etc). The JDBC connections, resultsets, statements, etc will be created and dedicated per each individual thread.
    If it is supported - do you expect this design to scale-up well or am I better off using multiple but single-threaded Java/JBDC programs to access SQL Server 2012/2014 from Microsoft JDBC driver?
    Thanks
    Yuri Budilov
    Yuri Budilov Melbourne Australia

    >is it supported to use Microsoft JDBC driver (the latest version) with Java 7 multithreaded application?
    Yes, so long as:
    > Java threads will not share any JDBC objects among them,
    >do you expect this design to scale-up well or am I better off using multiple but single-threaded Java/JBDC programs >to access SQL Server 2012/2014 from Microsoft JDBC driver?
    Using threads should scale better than using processes (at least on Windows), as there is quite a bit of overhead with a process.  Each process has it's own JRE, it's own GC heap, its own threads...
    The bigger question, though, is how this scales on the SQL Server.  Your throughput may be limited by resources on your database server, and the thread's workloads may not be able to run concurrently because of locking. 
    David
    David http://blogs.msdn.com/b/dbrowne/

  • Java multithreading support in Oracle JVM

    Dear all,
    I have some questions and observations regarding multithreading support in Oracle JVM. I have some java code that is stored in the database and is multithreaded (in separate threads I run a plsql procedure that does a lot of precessing). If I run the code with my standalone JVM it works like a charm, everything gets executed in separate threads. But if I store the code in the database and run it (with the custom JVM Oracle implemented for the server) it does not do any threading, all I have is a single thread that runs everything sequentially.
    The logic is this: using JDBC I create a connection, get a parameter (number of threads) and then launch the threads (each thread creates its own connection and runs the plsql procedure). No resource is shared (I have no synchronized code, I do not yield).
    My question is: does Oracle JVM supports multithreading or not? If yes, how to achieve it? Maybe there is something handled in JDBC? (although my code useses JDBC is not multithreaded) If this is not possible with java, do you now how to run something (oracle function, procedure) concurrently with PLSQL? (I tried with DBMS_JOBS but it does not work on all my databases and our DBAs discourage the use of them). Performing multithreading my launching different sqlPlus processes is not an option (as we have no security standard regarding the authentication -> connection is made by specifying in clear text the user and password).
    I wanted to use java because is more simple, secure (the connection is already established as the classes are stored in the database) and easy to maintain (until now we use different scripts which run on Unix and Windows and this leads to double work).
    The Oracle versions I use are 10g and 11g.
    Thank you all very much for your time
    Just the best,
    Don

    don wrote:
    My question is: does Oracle JVM supports multithreading or not? If yes, how to achieve it? Maybe there is something handled in JDBC? (although my code useses JDBC is not multithreaded) If this is not possible with java, do you now how to run something (oracle function, procedure) concurrently with PLSQL? (I tried with DBMS_JOBS but it does not work on all my databases and our DBAs discourage the use of them). Performing multithreading my launching different sqlPlus processes is not an option (as we have no security standard regarding the authentication -> connection is made by specifying in clear text the user and password).
    (Obviously the other post answers your question.)
    If I am reading that correctly then you have a management issue - not a technological one.
    You have a task to complete, presumably doing it efficiently is something that the company wants.
    And you have two alternatives both of which the DBAs are not allowing you to use.
    So at that point it is up to management to insist that the DBAs provide specific technological reasons (not hand waving) why those solutions are not suitable. And they should also be required to provide the outline of an alternative that is suitable.
    Besides that you might consider why your solution cannot be implemented entirely in a single threaded PL/SQL routine. The fact that is harder is not a reason when the point of the excercise is to create something that is more efficient.

  • Could not load file or assembly 'Interop.SAPbobsCOM, Version=8.8.0.0

    Hi,
    We recently upgraded our SAP B1 to 8.8, our add-on still remains 2007A and so far it works fine. But when i tried to replace the assembly(UI & DI) in my project from 2007A to 8.8 and run it, then I got this error. During my replacing the assembly SAPbobsCOM and SAPbouiCOM in visual studio 2008, I didn't notice any problem. Below are what I did for the upgrading:
    1. I launched my SAP and connect to our new SAP B1 server and was asked to do the upgrading.
    2. Once my SAP B1 client upgrade finished then I can login into new version of SAP B1 8.8
    3. Then  I open my Add-On project and remove the assembly (old ver 2007, UI & DI) then re-add the reference using 8.8
    When I run the add-on in debugging mode with my current SAP B1 8.8 client, then I got an errors saying "Could not load file or assembly 'Interop.SAPbobsCOM, Version=8.8.0.0"
    Any idea?
    Many thanks!
    Lan

    Hi Gordon,
    I am not running the new add-on inside SAP B1, I am running it inside visual studio under debugging mode. Do you think i still need to clean the temp folder? Can you tell me which temp folder or what specific file need to be removed?
    Thanks,
    Lan

  • Multithreading possible if drives connected to PCI controller?

    Hello there,
    I have an older (still very funcitonal) G4 (sawtooth) with 2 drives. The system and apps drive is connected to the on-board ATA66 controller. The documents drive is connected to a Sonnet Tempo ATA100 PCI controller. I have the drives in independent channels to allow OS X to multithread between the two.
    Both drives are ATA100 and the Sonnet card has 2 independent (I believe) connectors. To get a little better drive throughput I would like to connect both to the Sonnet PCI card. Can I attach my drives to each connector and achieve multithreading? I'm inclined to believe no as the ATA connectors of the PCI card eventually merge in a single connection between the PCI card and the motherboard. I'm not sure if this card is bootable (Sonnet no longer info on it).
    Any thoughts? Thanks very much for any feedback you may provide,
    Jacobo

    Hi
    In practice I expect the single connection between the PCI card and logic board probably has little or no impact.
    A typical ATA hard drive may have a sustained transfer rate of 60 MBytes/sec.
    Each ATA/100 channel has a theoretical transfer rate of 100 MBytes/sec.
    A 32-bit PCI card (in a Sawtooth with a 33MHz PCI bus) will have a theoretical transfer rate of ~133 MBytes/sec.
    Consequently the PCI card isn't normally a bottleneck, as it has enough bandwidth for a pair of ATA drives.
    Also the bandwidth of the entire PCI bus is shared between all the PCI cards installed and all the devices connected to the South Bridge, including the optical drive, zip drive (if present), on-board ATA drives and AirPort card etc.
    Consequently no matter where you connect the drives, ultimately the bandwidth is still being shared.
    Multithreading usually refers to processors. Even then, although a number of different threads may have been started, only one thread is being executed at any one instance in time (unless you have dual processors).

  • No separate compilation & linking of multithreaded translation units?

    Solaris 10 Multithreaded Programming Guide, Chapter 8 (http://docs.sun.com/app/docs/doc/816-5137/compile-94611?a=view) states:
    "The Sun Studio C compiler (cc) provides the -mt option to compile and link multithreaded code. The -mt option assures that libraries are linked in appropriate order, and is intended to be used to compile and link in a single step.
    If you compile with -mt and link in a separate step, you might get unexpected results. If you compile one translation unit with -mt, you must compile all units of the program with -mt."
    The Guide does not provide a way to compile and link in separate steps.
    The Guide continues to show how to do Compiling and Linking in the POSIX Threads Environment:
    cc -mt [ flag ... ] file... -lpthread [ library... ]
    What does this really mean? Does this mean that there is no way to compile a translation unit without linking, and then compile and link all the units to generate an executable? If I want to do the following:
    % cc -mt -c file1.c
    % cc -mt -c file2.c
    % cc -mt main.c file1.o file2.o -lpthreadI would get unexpected results?
    Should I do this instead?:
    % cc -mt -c file1.c -lpthread
    % cc -mt -c file2.c -lpthread
    % cc -mt main.c file1.o file2.o -lpthreadIs this what Sun means by "compile and link in a single step"?
    Or must I do this?:
    % cc -mt main.c file1.c file2.c -lpthreadOn the other hand, note that the Guide also says "If you compile one translation unit with -mt, you must compile all units of the program with -mt." It seems to imply that one can compile a unit without linking. Otherwise it would have said "If you compile and link one translation unit with -mt and -lpthread, you must compile and link all units of the program with -mt and -lpthread." I am confused.
    The Sun Studio 12: C User's Guide Appendix B (http://docs.sun.com/app/docs/doc/819-5265/bjapp?a=view) says:
    "B.2.46 -mt
    Compile and link for multithreaded code.
    This option passes -D_REENTRANT to the preprocessor and passes -lthread in the correct order to ld.
    The -mt option is required if the application or libraries are multithreaded. ...
    Modules that are compiled with -mt must also be linked with -mt. ...
    If you compile one translation unit with -mt, compile all units of the program with -mt."
    It does not say anything about -mt's compiling and linking in one single step. The words "compiled with -mt must also be linked with -mt" seems to suggest that one can compile and link separately.
    The Solaris 9 Multithreaded Programming Guide, Chapter 7 (http://docs.sun.com/app/docs/doc/806-6867/6jfpgdcob?a=view) suggests a different way (not -mt) to compile and link a multithreaded program - using a -D_POSIX_C_SOURCE option. There is no "single step" requirement. Can one still use this approach to compile and link translation units in separate steps?:
    % cc -c file1.c -D_POSIX_C_SOURCE=200112L
    % cc -c file2.c -D_POSIX_C_SOURCE=200112L
    % cc main.c file1.o file2.o -D_POSIX_C_SOURCE=200112L -lpthreadAnd as an aside, I notice that there is a difference between the Solaris 9 Guide and the Solaris 10 Guide on the position of the -lpthread flag in the cc command line. The former, in the "Linking With libthread or libpthread" section, says: "To use libpthread, specify -lpthread before -lc on the ld command line, or last on the cc command line." So I guess if there is a -lm for example, then -lm precedes -lpthread on the cc command line. The latter, as shown in the first paragraph above, suggests that -lpthread precede -lm: cc -mt [ flag ... ] file... -lpthread [ library... ]
    I am not sure whether Sun really means that the position of -lpthread should be different between Solaris 9 and 10.

    clamage45 wrote:
    The C Users Guide and Solaris MT Guide are separately maintained. The part you quote might have been true once long ago, and the material never reviewed.
    The C Users Guide is reviewed for every release, and we try to keep it correct and up to date.So, you have some "insider information" because apparently you work for Sun. But this Multithreaded Programming Guide also appears to be revised for every release of the Solaris OS - at least between Sol 9 and Sol 10. As I compared them in my original post, they propose different approaches to compiling a multithreaded program. That is, the Multithreaded Programming Guide was updated for Solaris 10 in this regard. Therefore, it does not appear to me that the Multithreaded Programming Guide is not accurate because it might have never been reviewed and got outdated.

  • Multithreading issue with Client/Server chat program

    In a nutshell, I just recently starting attempting to use Sockets and decided I wanted to give a go at a chat program. I have some experience with threads but I know little about how to find and fix multithreading issues. I think this is my problem right now since I am deadlocking while connecting and disconnecting client-side ... and updates about connection status of a client are not always displaying correctly server-side.
    [ Code Snippet|http://snipplr.com/view/15206/clientserver-chat-program/]
    Thanks for the help

    NOTE: all catch clauses have been omitted for clarity. They all just perform System.err.println() with the msg embedded
    Very valid point. I cut out the GUIs and just tried having the Server/Client communicate. I am still having concurrency issues. This is my first attempt at synchronized methods and locking objects so go easy on me if I did something(s) noob =D
    public class MySocket
        public static final String QUIT = "~~QUIT~~";
        private ObjectOutputStream out;
        private ObjectInputStream in;
        private Socket conn;
        public MySocket(String ip)
            obsList = new ArrayList<IClientObs>();
            try
                conn = new Socket(ip, 5000);
                if (conn.isConnected())
                    out = new ObjectOutputStream(conn.getOutputStream());
                    in = new ObjectInputStream(conn.getInputStream());
        public synchronized String nextMsg()
            String msg = "";
            try
                synchronized(in)
                    msg = (String)in.readObject();
                    notify(msg);
            return(msg);
        public synchronized boolean sendMsg(String msg)
            boolean sentMsg = false;
            try
                synchronized(out)
                    if (out != null)
                        out.writeObject(msg);
                        out.flush();
                        sentMsg = true;
            return(sentMsg);
        public synchronized void closeConn()
            try
                synchronized(this)
                    sendMsg(QUIT);
                    conn.close();
                    out.close();
                    in.close();
        public synchronized Socket getConn()
            return(conn);
        public synchronized ObjectOutputStream getOutStream()
            return(out);
        public synchronized ObjectInputStream getInStream()
            return(in);
       //Observer Pattern implemented below   
    public class Server extends Thread
        public static final int MAX_CLIENTS = 2;
        public static final String QUIT = "~~QUIT~~";
        private ServerSocket server;
        private ArrayList<ConnClient> conns;
        private int connCount;
         * Constructor for objects of class Server
        public Server()
            conns = new ArrayList<ConnClient>();
            obsList = new ArrayList<IServerObs>();
            connCount = 0;
        public void startNow()
            this.start();
        public void run()
            runServer();
        public synchronized void runServer()
            try
                setup();
                while (true)
                    waitForConn();
                    processComms();
        private synchronized void setup() throws IOException
            server = new ServerSocket(5000);
            notify("Server initialized.\n");
        private synchronized void waitForConn() throws IOException
            if (connCount < MAX_CLIENTS)
                notify("Waiting for connection...\n");
                Socket conn = server.accept();
                if (conn.isConnected())
                    conns.add(new ConnClient(conn));
                    notify("Client connected @ '" + conns.get(connCount).getIP() + "'.\n");
                    connCount++;
            else
                notify("Connection request rejected; max connections have been reached.\n");
        private synchronized void processComms() throws IOException, ClassNotFoundException
            //Receive any msgs sent by clients and forward msg to all clients
            for(ConnClient rcvClient : conns)
                String msg = rcvClient.nextMsg();
                //if client quit, then close connection and remove it from list
                if (msg.equals(QUIT))
                    notify("Client disconnected @ '" + rcvClient.getIP() + "'.\n");
                    rcvClient.closeConn();
                    conns.remove(rcvClient);
                    connCount--;
                else
                    for(ConnClient sndClient : conns)
                        sndClient.sendMsg(msg);
        public synchronized void shutdown()
            try
                server.close();
                for(ConnClient client :conns)
                    client.closeConn();
       //Observer Pattern implemented below
    }I also found another issue that I haven't thought up a way to deal with yet. When the user starts the program the follow line is executed "conn = server.accept();" which halts execution
    on that thread until a connection is established. What if the user wants to stop the server before a connection is made? The thread keeps running, waiting for a connection. How do I kill this thread?
    On this last issue (I figured by adding the follow code to my action listener inside of my server gui I could stop the thread safely but it's no good so far)
    public void actionPerformed(ActionEvent e)
            Object src = e.getSource();
            if (src == strBtn)
                if (server == null)
                    strBtn.setEnabled(false);
                    stpBtn.setEnabled(true);
                    server = new Server();
                    server.addObserver(this);
                    server.start();
                else
                    console.append("Console: Server is alread initiated.\n");
            else if (src == stpBtn)
                synchronized(server)
                strBtn.setEnabled(true);
                stpBtn.setEnabled(false);
                server.shutdown();
                server = null;
                console.append("Console: Server has been stopped.\n");
        }Edited by: mcox05 on May 21, 2009 10:05 AM
    Edited by: mcox05 on May 21, 2009 10:17 AM
    Edited by: mcox05 on May 21, 2009 10:58 AM
    Edited by: mcox05 on May 21, 2009 11:01 AM
    Edited by: mcox05 on May 21, 2009 11:03 AM
    Edited by: mcox05 on May 21, 2009 11:03 AM

  • How can I pass arguments to a TestStand sequence with LabWindows 6 ?

    Hi
    I have created sequences in a TestStand file.
    I want to program a sequence with Labwindows 6 which would call all these existing sequences (containing parameters).
    I don't have any problems to create the steps "SequenceCall" but i don't know how to pass arguments to the sequences with the TS API.
    I have used the look-up strings "TS.SData.SFPath", "TS.SData.SeqName", "TS.SData.ThreadOpt" to program the sequence file / sequence and the multithread option. But now how to program the arguments passing ? I think there is something with the lookup string "ST.SData.ActualArgs"...
    Thank u very much for any help

    I'm not sure if you want to pass values from TestStand to LabWindows or if you want to pass values in TestStand from a sequence call step to a called sequence.
    To get TestStand variables from LabWIndows, use the following function:
    tsErrChk (TS_PropertyGetValNumber(testData->seqContextCVI, &errorInfo, "Locals.StartPoint", 0, &dStartPt));
    iStartPt = (int)dStartPt;
    The TS_PropertyGetValNumber gets the TestStand variable Locals.StartPoint and puts it into the LabWindows variable called dStartPoint. Numbers to and from Test Stand are always a double type. The next line converts it to an integer.
    To put a LabWindows value to TestStand, use TS_PropertyPutValNumber.
    To pass values from a sequence call step to a called sequence, create variables in the Parameters t
    ab on your main sequence. Create same variables on the Parameters tab of the called sequence. In main, specify module to be called in calling step. There is a paramters section on the Edit Sequence Call dialog box which appears. Check the Use Prototype of the Selected Sequence box. You can then list all the parameter variables in the parameters section.
    Hope this is what you want.
    - tbob
    Inventor of the WORM Global

  • Using multi threading to access 2 RS232 ports

    Hi,
    I'm a beginner in multi threading, so this question may be a very basic one....
    I'm Using TS3.5 + CVI 8.01 to communicate withs 2 RS232 ports.  I thought to use mult threading so I can process 2 steps in parallel rather than in series. 
    This is what I do:
    1) I defined 2 subsequences, each of them call the same CVI function.  I use the sub sequence parameters to transfer the com number.
    2) My CVI application includes one dll for this specific project and another one, a general dll to handle RS232 functions.  The RS232 dll uses one global buffer than collects all the traffic on the com. 
    QUESTIONS:
    1) What happens when 2 seperate threads run the same function in the RS232 dll?  (in terms of memory etc...).  Does each one use a different buffer (in terms of memory allocation), or, both of them writes to the same buffer?   Obviously, if they writes to the same buffer, then, my function will not operate properly.
    2) What happens in TestStand after the 2 steps in new threads have finished their execution?  does the next step run back in the same threads the sequence run before?
    Thanks
    Rafi

    Rafi,
    Glad to hear you were able to make some ground on your application. As for all of your questions, I'll try to answer as many as I can.
    First, when you are talking about your global buffer, is it created in TestStand or in the DLL itself? When you use DLLs, global variables or global structures are shared between all threads that call your DLL. On the other hand, if your buffer is declared inside of the DLL it is global for the DLL but not shared and would be a separate buffer for each call.
    With your run-time error in TS, it would definitely be helpful to have more information about the error. From what you explained (executing fine on the first call, but failing on future executions), it sounds like the resource is not being released after the first execution.
    As far as a specific example for TestStand Multithreading, you'll want to look at the TestStand Development Library and, specifically, Multithreading in TestStand. If you look and browse through the Application Notes and Tutorials section, as well as the Technical Presentations section, you will learn a great deal about multithreading and what options you have in TestStand. For a specific example, you may want to look at This Example. You could also look in the <TestStand>\Examples (where <TestStand> is the directory where TS is installed) at the MultiUUT example for an example of multithreading in TS. These examples may not be exactly what you need, but they should give you a jump start.
    As far as making your DLL multithread safe, it is definitely not necessary; however, there are some significant advantages described in this article: Designing Thread-Safe DLLs. It is an MSDN article that focuses on Visual Basic, but it has some helpful information that can apply to C as well.
    Hopefully this can help you move further. I have attached a list of links at the end of this post with other helpful links for you as well. Keep us posted with your progress.
    Matt Mueller
    NI
    Links:
    General Information on Multithreading for C Programmers
    Building Multithreading Applications with LabWindows/CVI
    Multithreading in LabWindows/CVI
    Easy Multithreading Programming in LabWindows/CVI
    Multithreading for Rookies

  • Beginneer to J2EE, which book do you recommend me?

    Hi mates!
    I have a lot of experience in C++ and Java SE, but I never used J2EE.
    I would like to create an app that uses web interfaces, data bases (persistence) and a multithreaded server. I guess that is possible with J2EE, but no idea about Hibernate/Spring/JSF/Beans/WebFlow....
    What book do you recommend me to learn about that kind of things?
    Thank you very much for your help, I appreciate it a lot.

    I'd recommend to start with the free book [Core servlets 2nd edition|http://pdf.coreservlets.com] to learn about servlets & JSPs. In the mean time I'd find a good tutorial about JDBC and learn how to do database actions with Java.
    When you know that, the next step in my opinion would be to get the book [Enterprise Javabeans 3.0|http://www.amazon.com/Enterprise-JavaBeans-3-0-Richard-Monson-Haefel/dp/059600978X] , as it is still the best EJB book I know of.
    Finally if you want to go for the full package, I'd read [Pro EJB 3: Java Persistence API|http://www.amazon.com/Pro-EJB-Java-Persistence-API/dp/1590596455] or even its newer second edition, [Pro JPA 2|http://www.amazon.com/Pro-JPA-Mastering-Persistence-Technology/dp/1430219564] to stay up to date with the times. I haven't read the second edition yet, but the first one was an excellent book about the Java Persistence API.
    What remains would be a book about JavaServer Faces, if you want to use that as the view technology. I cannot really recommend a book about that.

  • Sourcecode for anyone who's interested

    Hi there,
    I started a project on sourceforge. DevEnhancer
    https://sourceforge.net/projects/sapb1-ui-di-fw
    It's a framework or a toolbox for Business One developers.
    About 2500 lines of code.
    I decided to put it on sourceforge, because the project is
    very nice hosted there.
    You'll find there two files. The first one is the C# file with the code
    and the second one is a chm file with the extracted class and method
    definitions. I haven't included so much examples, but I think most of the code
    is self explaining.
    Only thing to do is to include it in your Visual Studio Project and add two
    references to SAPbobsCOM and SAPbouiCOM.
    If anyone is interested in joining the project ask me.
    If you think, it's useful, write me suggestions or bugreports.
    If you want to use it, no problem, it's under GPL, open source
    Any comments are welcome.
    <b>[email protected]</b>
    <b>[email protected]</b>
    Hope, you have fun.
    Regards,
    Holger
    PS: This is a prealpha release, so don't think, it is bugfree

    My 23" display is one of the first to ship last July (2004). It has the uneven colors (when viewing a blue screen) and the pink hue. So far in its life it has had two pixels go stuck blue (I check it when i got it and it had zero stuck pixels) and one firewire port die.
    Lately I've had problems with "burn-in" such that on gray color backgrounds or windows (like the default color it seems to pick when switching wallpaper) show residual images (faded ghost images) of previously displayed things. The top bar where the menu is seems really burned in (I can see it on the blue login screen).
    I've been holding out too for a confirmed fix. I have an extended warranty till 2007 so I'm in no rush.
    I had someone postl this on my thread at macrumors about their display being repaired:
    Here is the message that has just been posted:
    I purchased a reconditioned 23" Aluminum from Apple last month, and after the first one died within 5 days, I received a second one with serious pink hue problems and MAJOR ghosting. After an hour on the phone with apple, they said all they can do was fix it. I wanted out of the 23" because of all the problems I've heard. Anyway, they sent a box, I packed it, and when it returned, it was finally excellent. They replaced Part # 646-0264 APPLE, Q49, LCD, LM230W02(ST)(02)and #630-6942 APPLE, Q49 MLB REV C whatever that is. Hope this helps.

  • Message Receive question in Point to Point

    How can I make sure that my queue receives second message only after finishing the process for the first message?

    Hi,
    It is posible that a system receives two messages and with multithread process the 1st message finish after the 2nd message.
    I use correlation ID and a selector in oder to receive. When the system process a message I put the message id by the send mesage in the correlation id for the repond message.
    In the client I use a selector with the MessageId and the correpond id.
    Thanks

  • How to separate the GUI interface from program execution in Labwindows?

    Hallo,
    I am trying to combine TCL interpreter with Labwindows in order to executes tcl scripts with user implemented C functions that interact with devices in Labwindows. The idea is from another hand to have the ability to control my program from GUI and in the same time to be able to execute command scripts that will take a more control on the device interface.
    I can invoke the tcl interpreter for a single command or not so complicated script. When I execute a simple loop from the script my user interface stop to respond to any messages until interpreter exits the loop.
    The question is how to separate both the GUI and the program that executes in background in my case the tcl interpreter?
    Thanks,
    Nikolai

    Probably the best solution would be to do the TCP loop in another thread. For help with multithreading programming, see the CVI Multithreading Overview (cvi\bin\MultithreadingOverview.pdf) and the multithreading example programs (cvi\samples\utility\Threading).
    Best Regards,
    Chris Matthews
    National Instruments

  • Changing a Single Threaded app into Multi Threaded app

    Hi Java Experts
    I made a web crawler that goes out to a particular web site and starts from there to crawl throughout the internet -- it's working fine . it only has 1 thread -- which is the main class which implements runnable.
    I'm interested in making this solution multithreaded in hopes that I can get greater performance. -- since I believe the limiting factor is probably the speed at which URLs are returned etc --
    MY QUESTION: how would you guys turn such a crawler into a multithreaded application.
    my main class -- that does all the real work (with the help of some other classes works like this )
    getTheNextURL(String urlString)
    //step 1: check if it's a valid url
    //step 2: check if it's a url we are interested in
    //step 3: go to the url and gather all the links on that page put them in an array list
    //step 4: loop through the array list
    //call getTheNextURL(urlname) inside of the step loop
    Does anyone see any way to make this multithreaded ? for increased urls looked at I was hoping i could possible multiply the url search speed by a factor of the threads.
    Thanks in Advance for any suggestions that can be offered.
    stev
    i'm also aware of the problem with my recursive calls as read in the oriely java perfomance tuning book i'm looking to resolve thatas well with the most optimum algorithm

    thanks for the suggestion sounds simple enough.
    Since you made a great suggestion , what do you think about the recursion problem in my design.
    Here's the problem
    let's say the first web page it finds is a html page with the following links
    link a
    link b
    link c
    link d
    It places these links in an ArrayList.
    It loops through the ArrayList with an iterator and follows all the urls. starting with link a. On link a , the following link are found as seen below and placed in an ArrayList again.
    link 1
    link 2
    link 3
    link 4
    then it will call the method again , which puts all the links found in an ArrayList and loops through it to follow the first.
    This repeats over and over until it goes to the maximum depth specified , then it returns to the next iteration and looks through that. That's how it works in detail.
    Every recursive call is an addition to the operating stack of the vm, so it's concievable that i may have 1000s of recursive calls stored on the stack each holding 1000s of ArrayList objects that it will consider.
    I'm trying to figureout a better solution for this recursion to reduce the calls on the stack and implement multithreading at the same time.
    Any ideas?
    ps .
    ---- i would also like to be able to manually cancel threads that get caught in some infinite loop trick web pages out there.

  • Font installation in JRockit with RHEL

    I cannot find any information on how to install additional fonts that jrockit will see. For example, msttcorefonts gets installed in /usr/share/lib/fonts and both the Sun JVM (1.4.2) and the IBM JDK (1.4.2) see them and use them but jrockit (5.0 SP1) seems to just use the fonts it sees in its own directories.
    This is on a RHEL4 system where -Djava.awt.headless=true is passed to the JVM under the assumption that no X11 server will be running even though it is installed.
    I did a google search looking for this but couldn't find anything that seemed appropriate.
    Thanks a lot,
    -Atin

    I will definitely try it again when I get SP2 for Linux RHEL4. I was actually using the SciMark test, but I modified it to run each calculation as a separate thread since I am on an SMP machine and then ran via JMeter for a long time to see how it behaved and it is true that after a few iterations, jrockit did become faster than at the start as it chose a better garbage collection method, optimized the code etc. But eventually the performance difference between HotSpot and JRockit wasn't significant enough for me to jump up and down want to change everything over to JRockIt - but again, I am just using SP1.
    My application is basically drawing charts using financial data and so I have to generate charts via the data, create PNGs and compress them and send them out quickly for 1000s of charts continuously and so the more that I can process as a time the better. I'm currently finding that Sun's JVM is behaving a little better under production loads (using a filter so that site is still running Sun's JVM while I run JRockit on servers that aren't visible to the clients). I did manage to crash one Sun JVM too - but this might be a server problem since this machine has been giving me trouble anyway.
    I'll wait for SP2 to come out before I do anything more on this. Maybe Sun's JVM is also having trouble with RHEL4 that includes the 2.6 kernel ...
    I do put a lot of load on the JVMs, and until the NPTL happened, Java on Linux was nowhere near the performance we needed but now it is closer, though still not where we would like it to be (and where it is under Windows). But we really want to make the move to Linux and I am spearheading this and so I really want one of these JVMs to show me the kind of performance I need so I can make a case to switch to Linux and Java with Sun or BEA 5.0 JVMs ...
    Gimme fast XML parsing, PNG compression and serious multithreading support on SMP machines and I'm there :)

Maybe you are looking for

  • Questions w.r.t KDE

    Greetings, I've been an XFCE user since the days of xfce3. Always loved lightweight stuff (I guess like a lot of ppl here). Never really liked KDE much after the days of kde2 (Corel, anybody remember?). Then there is KDEMOD. I said I'd give it anothe

  • Error while installing Oracle Apps R12 , on windows server 2003 R2

    Hi Experts While installing Oracle Apps R12 , on windows server 2003 R2, I am getting the following error. System Utilities command: cmd.exe /c E:\oracle 12i dump\startCD\Disk1\rapidwiz\bin\adchkutl.cmd F:\cygwin\bin F:\VC\bin 'E:\oracle' is not reco

  • Memory leak in AudioServicesCreateSystemSoundID with sound files

    hi ! Instruments indicates a 64Ko memory leak in "AudioServicesCreateSystemSoundID" when I use a sound that I have created with GBand / iTunes. When I use the sound file "tap.aif" from the "sysSound" sample, there is no memory leak. What's wrong with

  • SAP note : XI vs PI

    Is there a SAP note which lists the diferences in mapping functions: SAP XI vs PI ? I see some functions are implemented differently ,just wanted to have a list / SAP OSS note . Thanks

  • Multiple fies(2)---- to--- webservice scenario

    Hi all, i have one requirement like,2 sender files and one receiver. we can acheive this requirement using the BPM. Other than this is there any other solution.. could you provide me the solution, Thanks & Regards, AVR