GUI_DOWNLOAD inside a BSP METHOD

Hi all!
I have a BSP application and, in the application class, I have a method named TXT_FACTURA.
Inside of it, I need to save a txt file to local machine, so I tried to use the FM:
GUI_DOWNLOAD
or
WS_DOWNLOAD
but when the BSP arrives to execute this FM, a HTTP 500 error raise me... anybody knows why???
I tested this FM with the same data in a separated report, and all is ok!
Thanks!

You cant use GUI_DOWNLOAD or WS_DOWNLOAD in BSP.
Look at the below link to know how to upload & download..
/people/thomas.jung3/blog/2004/08/09/bsp-download-to-excel-in-unicode-format
/people/thomas.jung3/blog/2004/09/02/creating-a-bsp-extension-for-downloading-a-table
/people/mark.finnern/blog/2003/09/23/bsp-programming-handling-of-non-html-documents
<i>*Reward each useful answer</i>
Raja T

Similar Messages

  • 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

  • Reg : BDC issue while updating infotype 40 inside BADI class method

    Hi Friends,
         Actually in my badi class, there is a method where i need to save the infotype fields including comment fields.. So with BDC recording i recorded screen fields and passing the pernr internal table values to recorded pernr values.. by doing this im getting error and so BDC is not upadting the data.. moreover if i pass directly pernr number within single quotes, BDC is working fine and data is getting updated..
    bdc_field        'RP50G-PERNR'   pernr.  --> Error Message while calling transaction through BDC
    bdc_field        'RP50G-PERNR'   '00001234'  ---> updating successfully..
    1. Tell me whether the issue is with BADI or wat ? means we cant able to use BDC inside badi ?
    2. I also tried changing my internal table value of pernr to type 'C' of length 8.. eventhough its showing error..
    Please tell me what i need to do .... ?

    Hi  Dilek Ersoz Adak ,
      I also tried with that, but getting same error..  Below is my error im getting while updating BDC through call transaction,
    1     PA30     SAPMP50A     1000     E     K     PBAS_SERVICE     001     HRADMIN     EPPRELE 00000121     HRAdministrator          CTU     RP50G-PERNR
              Person is treated already by the HR Administrator

  • How can we call windows application inside the bsp ...

    hi,
    i just want to call the exe file or execute or open outlook express inside a page...
    or.. openeing a notepad..
    thanks
    jaideep

    Check this thread..
    Call a Systemcommand from BSP
    how to call DLL in BSP
    <i>*Reward each useful answer</i>
    Raja T

  • Calling Oracle Report InSide Web Service Method

    Is there way to call oracle reports inside one of my web service method.
    If yes kindly let me know how we can do this and some documents related to this.
    Thanks
    Robert

    Oracle reports does have a Web API when reports are run from the application server. As a result one way to do what you are asking is to write a Web service that use java.net.URL to invoke the Reports Service Web interface:
    http://otn.oracle.com/products/reports/htdocs/getstart/docs/A92102_01/pbr_run.htm#1005598
    As I understand it, this interface itself is actually being exposed as a Web service in a future release of Oracle9iAS Reports ... I don't know if this is a Oracle9iAS Reports 9.0.4 feature or beyond that. You might try asking on the Reports forum:
    Reports
    Mike.

  • Equivalent to [i]this[/i] and [i]getClass()[/i] inside a static method

    All business objects of my application (Customer, Car, etc.) extend a root class (RootObject) which performs retrieving operations. Such operations are delegated to a static Loader that calls the respective method according to the type of the business object (loadAllCustomers for Customers, loadAllCars for Cars, etc). The problem is that I am unable to know which class is calling RootObject.loadAll() (a Customer or a Car) because both this and getClass() cannot be used inside static methods.
    So, my question is : how can I determine which class is extending RootObject from inside its static loadAll() method ? It is either a Customer or a Car, but I cannot figure out how to get such information.
    public class Customer extends RootObject { /*...*/ }
    public class Car extends RootObject { /*...*/ }
    public class RootObject {
      protected static Loader loader = new Loader();
      public static RootObject[] loadAll() {
        return loader.loadAll(getClass());  // does not compile
    public class Loader {
      public RootObject[] loadAll(Class classe) {
        if (classe == Customer.class) return loadAllCustomers();
        if (classe == Car.class) return loadAllCars();
        return null;
    public static void main(String args[]) {
      Car cars[] = (Car[]) Car.loadAll();
      System.out.println("number of cars = " + cars.length);
    }Thank you.

    Thank you guys.
    We are trying to simulate an object-oriented database
    on top of a relational one (or a file, or whatever).Sounds like you really want ORM, like Hibernate or TopLink.
    Then, to retrieve a given car, we could be able to do
    Car car = new Car();
    car.setId("C1");
    car.load();Instead, to retrieve a list of cars, I think it is
    more intuitive to use a class method instead of an
    instance one because we'll return a list, not a
    single object :
    Car cars[] = (Car[]) Car.loadAll();instead of
    Car car = new Car();
    Car cars[] = (Car[]) car.loadAll();  // a little odd,
    isn't it ?Then, it is a design choice to make loadAll()
    a static method.Sounds to me like you're trying to create objects that know how to persist themselves. That's one way to do it.
    Another would be to separate the persistence code into a separate, interface-based class called a Data Access Object (DAO) or Repository that would handle this for you:
    public interface CarRepository
        List<Car> find();
        Car find(Long id);
        void save(Car c);
        void update(Car c);
        delete(Car c);
    }Now you can have different implementations for this interface, depending on how to wanted to tackle persistence. If it happens to be relational, all the SQL code is hidden from clients in the interface implementation.
    %

  • Gui_Download inside an User-Exit

    Hi;
    I'm using user-exit "RFFOX901" to generate bank transfer file.
    If i use RFFOM100 program from SE38 i can debug an generate transfer file with Gui_Download Function from that user-exit.
    But, if i run F110 y doesn´t allow to debug or create transfer file with Gui_Download, but it creates the header line in the structure E_DTAM100H and display the generated file with the header..
    We don´t want to use the structures for SWIFT transfer file but we want to create our own format and download the new file from this user-exit.
    Thanks on advance.
    David Fúnez
    Tegucigalpa, Honduras

    When you run F110 you are running your program in batch so GUI_DOWNLOAD wont work.
    If you are on the same n/w as of the server you can use OPEN DATASET to download files to your local machines.
    Thanks
    Bhanu

  • Is it possible to write a doPost() method inside a doGet() method??

    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.io.*;
    import java.util.*;
    public class check extends HttpServlet
         protected void doGet ( HttpServletRequest rq, HttpServletResponse rp ) throws ServletException, IOException
              protected void doPost ( HttpServletRequest rq, HttpServletResponse rp ) throws ServletException, IOException
    }I tried the above code and failed. So, if someone could answer me, I'd be really grateful!
    Thanx in advance.

    I tried the above code and failed. So, if someone could answer me, I'd be really grateful!
    Thanx in advance.This code is simply illegal Java code. It has nothing to do with "doPost()" or "doGet()". Go back to school/books and carefully learn Java.
    If you want to write logic for GET requests, implement doGet(). If you want to write logic for POST requests, implement doPost(). Otherwise just leave it away. If you want GET and POST requests behave both the same (I have never had such an odd requirement, but that's another story .. you're the developer here), then just let them call both the same method. Add private void doSomething(req, res) and let the doGet() and doPost() call it. Simple, isn't it?

  • Syntax error while using the parameter inside the badi method.

    Hello all ,
    I'm writing a code in the badi implementation . The badi is /SAPSLL/CTRL_MM0C_R3 . this badi contains a metthod API_CONTROL_MODIFY.This badi triggers while using MIGO transaction .
    It is having the following parameter .
    IT_MSEG     Importing     Type     SLLR3_MSEG_T .
    SLLR3_MSEG_T is declared as follows.
    TYPES: sllr3_mkpf_t LIKE mkpf OCCURS 0,
                sllr3_mseg_t LIKE mseg OCCURS 0.
    here i have to get the werks value that is populated into IT_MSEG whie doing MIGO .
    I have declared a local variable and assigned werks value from the IT_MSEG to the local variable as follows
    DATA:l_werks type werks.
    l_werks = IT_MSEG-WERKS.     
    But I'm getting the following error.
    "IT_MSEG" is a table without a header line and therefore has no
    component called "WERKS".
    How should i avoid this error. Please give me sample code on how to avoid this error.
    thanks in advance
    pavan

    Hi,
    Move the row from IT_MSEG into a work area and use it. Declare the workarea of required type.
    DATA:l_werks type werks.
    read table it_mseg into wa_mseg index 1.
    l_werks = wa_MSEG-WERKS.
    Regards
    Vinod

  • How to acess a value of variable(calling prg) inside the methods of a class

    Hi SapAll.
    i wrote a program where i need to acess a value of a variable inside the class method.
    for eg:
    CALL METHOD gcl_utl_app_log->display_log
        EXPORTING
          it_edidc = lt_edidc
          it_msg   = lt_msg.
    while debugging under the method 'DISPLAY_LOG' when i want to acess a value of a variable (calling program) i cont get that value but i can acess the value of the variable just before the CALL METHOD statement.
    so can any body help me in finding the solution for this.
    regards.
    Varma

    Hi jhings.
    i have delcared the variable in the main program like below
    main program
    PERFORM populate_z1edrmdseqnr01.
    FORM populate_z1edrmdseqnr01 .
    other code
    CALL FUNCTION 'NUMBER_GET_NEXT'
        EXPORTING
          nr_range_nr             = gv_number_nr
          object                  = lv_obj
        IMPORTING
          number                  = gv_nextno
    move gv_nextno to gv_seqno.
      EXPORT gv_seqno  to memory ID 'MEM1'.
    PERFORM FORM application_log.
    FORM application_log.
      CALL METHOD gcl_utl_app_log->display_log
        EXPORTING
          it_edidc = lt_edidc
          it_msg   = lt_msg.
    ENDFORM
    METHOD display_log.
    IMPORT gv_seqno from MEMORY ID 'MEM1'.
    *********when i save and check the above code iam getting the error as 'FiledGV_SEQNO is unknown,it is neither in one of specified tables not defined by 'DATA ' statement.**********
    regards.
    Varma

  • MB_MIGO_BADI - Line item data inside CHECK_ITEMS method

    Hi All,
    I have implement MB_MIGO_BADI and i want to put a check inside the method CHECK_ITEMS where the importing parameter is line ID.
    How can I get the data for the line based on the line ID inside the check_items methods, so that I can make the custom checks inside the method and populate the error message.
    Please let me know how can we access the line item data inside the method CHECK_ITEMS.
    Thanks and Regards,
    Vijay

    Hi,
    My requirement is to use BADI MB_MIGO_ITEM_BADI and restrict the creation of GR of items which have delivery date > PO Delivery date.
    exact requirement is:-
    Invoke Badi MB_MIGO_ITEM_BADI
    Only for GR
    Check EKKO-BSART =PJ where EKKO-BELNR = MSEG-EBELN
    Check if the Po Line item has single or multiple delivery
    a) If single
    Check if MKPF-CPUDT-3 > EKPO-EEIND
    Yes u2013 Create GR
    No --- Give error message
    b) Multiple Delivery
    Check if EKET WEMNG =0
    Select EKET-EINDT where EKET-WEMNG < EKET MENGE
    Check EKET-EINDT < MKPF-CPUDT-3
    Yes u2013 Create GR
    No --- Give error message
    Error Message : u201CGR Cannot be posted as Delivery date is in future u201C
    Thanks
    Vivek

  • How to call a Screens modules inside class methods in ALV of OOABAP.

    I have a urgent reruirement to call a screen's PBO and PAI module inside a class method. I really dont want to create a function module and call the the screen inside that. Please revert if anyone have a solution as it is really urgent!!
    Moderator message - "Urgency" is not catered to in the forums.
    Message was edited by: Suhas Saha

    Hi Shehzad,
    SAPHELP on Advantages of ABAP Objects - Using ABAP - SAP Library says -
    There are only two purposes for which procedural ABAP is essential:
    · Encapsulation of classic screens in function modules.
    · When you want to make functions available to other systems, but are not able to make class methods available externally using XI server proxies. In this case, you have to use function modules.
    Regards,
    DPM
    http://help.sap.com/saphelp_nw70ehp1/helpdata/en/56/14934259a5c66ae10000000a155106/content.htm

  • When we create JDialog inside Thread's run() method it is creating problem

    I have application that has feature that mainframe will be locked after three minutes and the time when it is locked it will show other locked dialog.
    Now my problem is given below:
    I have created one Dialog inside Threads run() method and this thread will execute when mainframe is locked.So what is happening is when mainframe is locked internally Thread is doing its job (its job is to display one dialog) and it is displaying dialog but mainframe is locked and still it is showing that dialog.This should not happen in our application when mainframe is locked nothing should come outside.
    simple code sample is given below:
    SwingUtilities.invokeLater(new Runnable()
    JDailog dlg = new JDialog();
    dlg.pack();
    dlg.show();
    Now when my applications mainframe is locked and thread is doing its job when mainframe is locked and it will show one dialog when its run() method will execute and it showing dialog even though mainframe is locked.This is major issue for me.please help me.
    sample code may contain compile errror but this only to give understanding what i am doing actually i cant show my original code.
    But show me some work around for this problem.Why dialog is coming outside when mainframe is locked?
    Please help me.I cant use delay inside run() method because of performance.
    Is there any way to control this behaviour?

    public class BackGroundThread extends javax.swing.JFrame implements BackgroundTaskInf {
        boolean isMainWindowActive = false;
        /** Creates new form BackGroundThread */
        public BackGroundThread() {
            initComponents();
            new DBBackgroudProcess(this).start();
        /** This method is called from within the constructor to
         * initialize the form.
         * WARNING: Do NOT modify this code. The content of this method is
         * always regenerated by the Form Editor.
        // <editor-fold defaultstate="collapsed" desc=" Generated Code ">                         
        private void initComponents() {
            jDialog1 = new javax.swing.JDialog();
            jLabel1 = new javax.swing.JLabel();
            jLabel2 = new javax.swing.JLabel();
            jButton1 = new javax.swing.JButton();
            jLabel1.setText("JOB DONE");
            javax.swing.GroupLayout jDialog1Layout = new javax.swing.GroupLayout(jDialog1.getContentPane());
            jDialog1.getContentPane().setLayout(jDialog1Layout);
            jDialog1Layout.setHorizontalGroup(
                jDialog1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jDialog1Layout.createSequentialGroup()
                    .addGap(95, 95, 95)
                    .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 65, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addContainerGap(240, Short.MAX_VALUE))
            jDialog1Layout.setVerticalGroup(
                jDialog1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jDialog1Layout.createSequentialGroup()
                    .addGap(22, 22, 22)
                    .addComponent(jLabel1)
                    .addContainerGap(22, Short.MAX_VALUE))
            setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
            jLabel2.setText("Background work in progess");
            jButton1.setText("unlock");
            jButton1.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jButton1ActionPerformed(evt);
            javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
            getContentPane().setLayout(layout);
            layout.setHorizontalGroup(
                layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(layout.createSequentialGroup()
                    .addGap(56, 56, 56)
                    .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 218, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addContainerGap(126, Short.MAX_VALUE))
                .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                    .addContainerGap(263, Short.MAX_VALUE)
                    .addComponent(jButton1)
                    .addGap(74, 74, 74))
            layout.setVerticalGroup(
                layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(layout.createSequentialGroup()
                    .addGap(40, 40, 40)
                    .addComponent(jLabel2)
                    .addGap(37, 37, 37)
                    .addComponent(jButton1)
                    .addContainerGap(43, Short.MAX_VALUE))
            pack();
        }// </editor-fold>                       
        private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {                                        
            isMainWindowActive = true;
            backgroundTaskFinished();
         * @param args the command line arguments
        public static void main(String args[]) {
            java.awt.EventQueue.invokeLater(new Runnable() {
                public void run() {
                    new BackGroundThread().setVisible(true);
        public void backgroundTaskFinished(){
            if(isMainWindowActive) {
                jDialog1.setSize(200,200);
                jDialog1.setVisible(true);
                jLabel2.setText("Task is finished");
        // Variables declaration - do not modify                    
        private javax.swing.JButton jButton1;
        private javax.swing.JDialog jDialog1;
        private javax.swing.JLabel jLabel1;
        private javax.swing.JLabel jLabel2;
        // End of variables declaration                  
    class DBBackgroudProcess extends Thread {
        BackgroundTaskInf infObj;
        public DBBackgroudProcess(BackgroundTaskInf infObj){
            this.infObj = infObj;
        public void run(){
            try{
                // here you can do your backgroudn task
                System.out.println("In BackGroud task");
                Thread.sleep(1000);
                System.out.println("task completed");
                infObj.backgroundTaskFinished();
            }catch(Exception e){
                e.printStackTrace();
    interface BackgroundTaskInf{
        public void backgroundTaskFinished();
    }

  • Display popup inside applyResult method of ovs?

    Hi,
    I have implemented an object value selector for a field.
    Now what I want to do is to display a popup window when   the user selects a row inside ovs popup (ie. inside the applyResult method).
    The popup window (with ok and cancel buttons) is being displayed, but when I try to destroy it inside the event handler for a popup ok or cancel buttons, the exception gets thrown. The exception says something about No item found on the list??
    I guess it has something to do with trying to display it inside applyresult method?
    The details:
    Popup is being displayed inside applyResult method of a customController (MaterialIndexCust)
         IWDWindowInfo windowInfo = wdComponentAPI.getComponentInfo().findInWindows("ConfirmExpandSpecWindow");
         IWDWindow window = wdComponentAPI.getWindowManager().createModalWindow(windowInfo);
         window.setWindowPosition(WDWindowPos.CENTER);
         window.setTitle("Question");
         wdContext.currentPopupElement().setWindowInstance(window);
         window.show();
    Here's the code from the event handler which is from the same custom controller :
            IWDWindow window = wdContext.currentPopupElement().getWindowInstance();
            window.destroyInstance();
    The actual event had to be defined in another controller.
    I've tried these things with IWDConfirmationDialog as well  as my custom dialog.
    Any help is appreciated.
    Regards,
    Ladislav

    Here's the exception:
    java.util.NoSuchElementException
         at java.util.LinkedList.remove(LinkedList.java:579)
         at java.util.LinkedList.removeFirst(LinkedList.java:131)
         at com.sap.tc.webdynpro.clientserver.window.ApplicationWindow.popModalWindow(ApplicationWindow.java:162)
         at com.sap.tc.webdynpro.clientserver.window.WebDynproWindow.doClose(WebDynproWindow.java:400)
         at com.sap.tc.webdynpro.clientserver.window.Window.doClose(Window.java:195)
         at com.sap.tc.webdynpro.clientserver.window.ApplicationWindow.handle(ApplicationWindow.java:288)
         at com.sap.tc.webdynpro.clientserver.window.ApplicationWindow.handleWindowEvents(ApplicationWindow.java:260)
         at com.sap.tc.webdynpro.clientserver.cal.AbstractClient.executeTasks(AbstractClient.java:149)
         at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.doProcessing(ApplicationSession.java:299)
         at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessingStandalone(ClientSession.java:707)
         at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessing(ClientSession.java:661)
         at com.sap.tc.webdynpro.clientserver.session.ClientSession.doProcessing(ClientSession.java:229)
         at com.sap.tc.webdynpro.clientserver.session.RequestManager.doProcessing(RequestManager.java:152)
         at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doContent(DispatcherServlet.java:62)
         at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doPost(DispatcherServlet.java:53)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:390)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:264)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:347)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:325)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:887)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:241)
         at com.sap.engine.services.httpserver.server.Client.handle(Client.java:92)
         at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:148)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
         at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)

  • Stuck Inside Native Method

    I have developed some Java code to call a third party DLL using JNI. Most of the time everything works as expected, but once in a while (generally after several days of processing) my program hangs. The root cause appears to be related to an intermittent issue with the driver that I am calling, something that I have no control over. When I perform a thread dump I can see that the thread is "stuck" inside the native method that I am calling. I am able to detect the hangup using a timer, and even obtain the "stuck" thread, but I cannot kick it back into life...or kill it in any way. Does anyone have any ideas?
    My code that is calling the native method is as follows:
    public void process() {
        System.out.println("Hello world from Java");
        Timer timer = new Timer();
        timer.schedule(new MyTimerTask(), 1000);
        myNativeMethod();
        System.out.println("Goodbye world from Java");
    }And the code for my timer task is as follows:
    public class MyTimerTask extends TimerTask {
        @Override
        public void run() {
            System.out.println("Timeout");
            ThreadGroup tg = Thread.currentThread().getThreadGroup();
            Thread[] list = new Thread[tg.activeCount()];
            tg.enumerate(list);
            for (Thread t : list) {
                System.out.println(t);
                System.out.println("---------------------------------------");
                StackTraceElement[] st = t.getStackTrace();
                for (StackTraceElement ste : st) {
                    System.out.println(ste);
                    if (ste.getMethodName().equals("myNativeMethod") && ste.isNativeMethod()) {
                        System.out.println("stuck thread " + t.getName() + " detected!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
                        t.interrupt();
                        break;
    }

    StuartyBoarder wrote:
    a) As it's a server I must use a separate process to communicate with a DDL because that's the only way to communicate with a DLL inside the serverNo
    b) As it's a server I must use a separate process to communicate with a DLL if I want to be able to kill a stuck process
    Absolutely.
    I am assuming that you mean b), which is not really an option A process is a process. Doesn't matter what it runs.
    An advantage that hasn't been mentioned in terms of a separate process is that if the dll has a system exception it will cause the process to exit. And there is no way to stop that. If that process is your JBoss server then it will exit. Which probably isn't what you want.
    As a separate process if if exits all you need to is detect that (via correct usage of Process) and then just start it up again.

Maybe you are looking for