Activation and Scripting

Hi,
I host the JVM in a native application.
I'm trying to use JRuby scripting in that application. Sample code to do that using either the Bean Scripting Framework or the Script Engine Manager works just fine so long as I do that from within the thread that created the VM.
Neither method works, however, when I try the same code in a different thread. I suspect that the issue has something to do with the fact that that thread is a native thread which calls the JNI method AttachCurrentThread().
I don't know if this matters either, but the method from which I call the scripting functions exists in a class with many native functions which are bound to their C++ implementations via RegisterNatives().
Any tip or pointer would be appreciated. Thanks.
Regards,
Will

JNI (with a callback) would usually lead to one of the following
1. It blows because you didn't attach the threadI know that's happening because I trace execution to that point in the native debugger. The call to AttachCurrentThread() completes successfully.
2. It blows because your JNI code is wrong.I can't see how. I'm calling a method that takes no arguments and returns nothing. That's cake. I know control gets there because I step into the Java code in Eclipse.
3. It calls the java method.It does indeed.
Once you reach step 3 you are running in the VM. Exactly. The single major difference that I can see between the case that works for me and the one that doesn't is the call to AttachCurrentThread(). That's why I suspect that JNI is somehow involved.
In your case it could be a library problem ... but in neither case
would it really be a JNI problem. At least not one that you can fix.The last part is what scares me and why I've had to table this for now.
You can try setting a flag and then spin up a thread based on that
flag which creates the library. That would really distance it from the JNI. Unfortunately I can't do this for real. As a test, I've tried creating a Java thread in Java code and executing those same two lines. They work fine. No surprise there. But the whole point of using JNI is that there is a lot which needs to be done natively.
Regards,
Will

Similar Messages

  • To find the Biztalk Active and Dehydrated instances using powershell script

    Hi,
    Has anyone has the power shell script to finf the number of active and dehydrated instances in Biztalk?

    Hi Sujith,
    Following Powershell script would get you the count of Active and Dehydrated instances:
    $a=Get-WmiObject -Class "MSBTS_ServiceInstance" -Namespace 'root\MicrosoftBizTalkServer' | Where-Object { $_.Item -match "$Name" -and $_.Item -ne "" -and ($_.ServiceStatus -eq "1" -or $_.ServiceStatus -eq "2" -or $_.ServiceStatus -eq "8" ) } | measure
    $a.Count
    Here ServiceStatus values for
    "Active" instance is 2 and “Dehydrated”instances is
    8 (and 1 for "Ready to Run" which might help you since you're interested in active instance count)
    If this answers your question please mark it accordingly. If this post is helpful, please vote as helpful by clicking the upward arrow mark next to my reply.

  • Database uptime monitoring by either snmp or active monitor script anyone?

    Hi,
    Has anyone previously setup any type of active monitoring script through whats up gold or an snmp informant type of monitoring script to advise when a database is down or specific process is down?
    An example would be like ORACLE_PKG1, and the process is named ora_smon_hrprd88.
    This is what the HP-UX “ps” shows:
    tpadb01:/# ps -ef | grep -i ora_smon
    oracle 13207 1 0 Jan 1 ? 0:29 ora_smon_epprd88
    oracle 13281 1 0 Jan 1 ? 1:31 ora_smon_hrprd88
    oracle 13635 1 0 Jan 1 ? 1:03 ora_smon_fsprd84
    oracle 3620 1 0 Jan 2 ? 0:18 ora_smon_mtprd04
    oracle 14586 1 0 Jan 1 ? 0:23 ora_smon_mtprd05
    oracle 15223 1 0 Jan 1 ? 0:26 ora_smon_inprd88
    oracle 15879 1 0 Jan 1 ? 0:25 ora_smon_epsal88
    oracle 16769 1 0 Jan 1 ? 0:52 ora_smon_hrsal88
    root 17976 22609 0 10:46:39 ttyp2 0:00 grep -i ora_smon
    tpadb01:/#
    Not sure if the extra info helps, but you never know. We can set it up to send us database up alerts, but the problem I have is when the listener service is down I can't get my script to finish no matter how I change the values of my script around. I can provide my script if that would help as well. If someone has already done this and is willing to share great!
    Harvey

    I would suggest you install OEM Grid Control to monitor your databases. For basic monitoring function it's free. OEM GC works great, it's a little overweight though. It's also use SNMP.
    Or you can choose any third party tool like
    Monitoring Oracle Enterprise with Cricket
    http://www.mikehan.com/cricket/oracle.html
    or some commercial one like Quest Software.

  • Form Z_FIDUN_A language EN is not active and has no errors

    Hi Everyone,
    I have copied one Smartform from 4.6C to ECC 6.0. and i have activated that Smartform in ECC 6.0. when i tried to print it is giving me the error "Form Z_FIDUN_A language EN is not active and has no errors". I have activated it in EN only.
    Please help me.

    Hi Leela,
    Try running the FM generated for the SmartForm and resolve any errors that might occur.
    Or Else
    the issue must be the customising where the Business Events are trying to call SAP Scripts and not Smartforms.
    Let me know If you require more help on this.
    Edited by: Raj on Oct 29, 2010 1:37 PM

  • Smart forms and script

    hi,,
           will u tell what is the difference between smart forms and scripts.

    hI
    Sapscripts are client dependend and smartforms are client independet.
    SAPscript are CLient Dependent, SmartForms are Client Independent. The reason why SmartForms are client independent is because when you activate a SMartForm, SAP actually generates a Function Module (which as you know is client independent). The Print Program (or as SAP likes to refer to them these days - Application Program) calls your generated FM.
    In the "smartforms" transaction, when you are viewing a smartform, you can go to the Environment->Function Module Name menu path to see the FM name.
    Look at the "Application Program" for the Invoice SmartForm (RLB_INVOICE):
    determine smartform function module for invoice
        CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
             EXPORTING  formname           = lf_formname
                    variant            = ' '
                    direct_call        = ' '
             IMPORTING  fm_name            = lf_fm_name
             EXCEPTIONS no_form            = 1
                        no_function_module = 2
                        OTHERS             = 3.
    call smartform invoice
          CALL FUNCTION lf_fm_name
               EXPORTING
                          archive_index        = toa_dara
                          archive_parameters   = arc_params
                          control_parameters   = ls_control_param
                    mail_appl_obj        =
                          mail_recipient       = ls_recipient
                          mail_sender          = ls_sender
                          output_options       = ls_composer_param
                          user_settings        = space
                          is_bil_invoice       = ls_bil_invoice
                          is_nast              = nast
                          is_repeat            = repeat
         importing  document_output_info =
                    job_output_info      =
                    job_output_options   =
               EXCEPTIONS formatting_error     = 1
                          internal_error       = 2
                          send_error           = 3
                          user_canceled        = 4
                          OTHERS               = 5.
    <b>Difference with SMARTFORMS vs. SapScript (SE71)</b>
    The Following are the differences :-
    a) Multiple page formats are possible in smartforms which is not the case in SAPScripts
    b) It is possible to have a smartform without a main window .
    c) Labels cannot be created in smartforms.
    d) Routines can be written in smartforms tool.
    e) Smartforms generates a function module when activated.
    Contributed by : SAP ABAP/4 Programming, Basis Administration, Configuration Hints and Tips
    f) Unlike sapscripts (RSTXSCRP), you cannot upload/download Smartform to your local harddisk. 
    It was said that it was provided in CRM 3.0 version, but not available in R/3.  You can download smartforms into Local PC in a XML format.  In the same way you can upload this XML format into Smartform.  From the smartform editor itself you can call download option, if you are working in CRM 3.0 environment. 
    In R3 also, you can download into XML format. However, it's not sure about uploading. Refer to the program 'SF_XSF_DEMO'.
    In 4.7 Enterprise, other have seen this utlity which is completey missing in 4.6c. There is functionality to downlaod a complete form or only a particular node. (Utilities -> Download form). It will create a XML file and save it in the hard disk. 
    For others, if you want to download/upload the Smartforms source, you will need the help from the Basis people.  What you can do is to create a Transport and then FTP down to your local harddisk.   When you need the Smartform source in another system, you have FTP up the Smartforms file back to the SAP server.  Finally, the Basis team, will tp it into your system.
    g) The protect and endprotect command in sapscript doesn't work with smartforms. For example on a invoice: First data of position no 80. is printed on page one, other data of position no 80 is printed on page 2. And there's nothing you can do about it.  Actually, there is something you can do about it.  By using a folder node and checking the 'protect' checkbox, everything in that folder will be page protected. 
    i) The main difference is that SAP script is client-dependant, while smartform is independent. Also there are some advanced and intreractive features available in smartforms.
    You can use an External subroutine-call in sapscript editor like:
      /: perform <form_name> in program <program_name>
      /: using <var1>
      /: using <var2>
      /: changing <return1>
      /: changing <return2>
      /:endperform

  • Active Content Script

    Hello,
    I am building a website with flash buttons, and im using DW 8
    and flash pro 8.The buttons have been exported as flash7. When i
    first imported the flash buttons into the site, i was prompted to
    include the active content script for the flash, which i did -
    however, when viewing the site in IE, im still having to click on
    the buttons before they are active and animate - Ive only just used
    this script and im really not a coder. Is there a way to reapply
    the script to my site? How can i get this working ? ? ?
    link to web site
    http://www.hermitagenursery.co.uk
    I hope someone can help ! Thank you very much

    Did you upload the Scripts file that DW made for you? You
    should see a
    folder "Scripts"
    Jo
    "simey70" <[email protected]> wrote in
    message
    news:fgi5bm$je8$[email protected]..
    > Hello,
    >
    > I am building a website with flash buttons, and im using
    DW 8 and flash
    > pro
    > 8.The buttons have been exported as flash7. When i first
    imported the
    > flash
    > buttons into the site, i was prompted to include the
    active content script
    > for
    > the flash, which i did - however, when viewing the site
    in IE, im still
    > having
    > to click on the buttons before they are active and
    animate - Ive only just
    > used
    > this script and im really not a coder. Is there a way to
    reapply the
    > script to
    > my site? How can i get this working ? ? ?
    >
    > link to web site
    http://www.hermitagenursery.co.uk
    >
    > I hope someone can help ! Thank you very much
    >

  • Total number of active and inactive users

    Hi All,
    i have to count
    The total number of users.
    Total number of active and inactive users.
    Total number of users after 90 days of inactivity:
    I have gone through the below thread, but it is showing the user info. but not count.
    http://download.oracle.com/docs/cd/E10530_01/doc/epm.931/html_esb_techref/maxl/ddl/statements/dispuser.htm
    Please let me know how to write MaxL command or some other way to count the users.
    Thanks,
    Prathap

    I doubt whether you are going to get the count using maxl, if the command you are using is producing information you can use then you might have to spool to a file and then parse the file and get the count values e.g. excel, scripting.
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • What is the difference between smart forms and scripts.?

    what is the difference between smart forms and scripts.?

    Differences between Smartforms and SAPscript
    a) Multiple page formats are possible in smartforms which is not the case in SAPScripts
    b) It is possible to have a smartform without a main window .
    c) Routines can be written in smartforms tool.
    d) Smartforms generates a function module when activated.
    e) Smartforms can create web enable forms like XML
    f) smartforms itself contine subroutine pools need not to main separetly like in case of scripts
    Request you to refer the following links
    www.sap-img.com/smartforms/smartform-sapscripts.htm
    www.erpgenie.com/abap/smartforms_sapscript.htm
    Sapscript vs Smartforms
    Difference with SMARTFORMS vs. SapScript(SE71)
    The Following are the differences :-
    a) Multiple page formats are possible in smartforms which is not the case in SAPScripts
    b) It is possible to have a smartform without a main window .
    c) Labels cannot be created in smartforms.
    d) Routines can be written in smartforms tool.
    e) Smartforms generates a function module when activated
    Scripts are client dependent whereas smartforms aren't.
    Upto 99 main windows are possible in scripts and only one in smarforms.
    To create multiple main windows in scripts, you just have to give the window type as MAIN whnever you create a window.
    Scripts still exists but smartforms are in use from 4.6c version, now the lastest version of these two is adobe forms
    SAP Smart Forms is introduced in SAP Basis Release 4.6C as the tool for creating and maintaining forms.SAP Smart Forms allow you to execute simple modifications to the form and in the form logic by using simple graphical tools; in 90% of all cases, this won't include any programming effort. Thus, a power user without any programming knowledge can
    configure forms with data from an SAP System for the relevant business processes.
    Advantages of SAP Smart Forms
    SAP Smart Forms have the following advantages:
    1. The adaptation of forms is supported to a large extent by graphic tools for layout and logic, so that no programming knowledge is necessary (at least 90% of all adjustments). Therefore, power user forms can also make configurations for your business processes with data from an SAP system. Consultants are only required in special cases.
    2. Displaying table structures (dynamic framing of texts)
    3. Output of background graphics, for form design in particular the use of templates which were scanned.
    4. Colored output of texts
    5. User-friendly and integrated Form Painter for the graphical design of forms
    6. Graphical Table Painter for drawing tables
    7. Reusing Font and paragraph formats in forms (Smart Styles)
    8. Data interface in XML format (XML for Smart Forms, in short XSF)
    9. Form translation is supported by standard translation tools
    10. Flexible reuse of text modules
    11. HTML output of forms (Basis release 6.10)
    12. Interactive Web forms with input fields, pushbuttons, radio buttons, etc. (Basis-Release 6.10)
    Reward Points if useful.

  • Form zform4 language EN is not active and has no errors

    after executing a program calling script , it gives the following error  after  clicking print preview  : Form zform4 language EN is not active and has no errors .
    pl find solution.

    Moderator message - Welcome to SCN.
    Have you tried activating the form (in SE71)?
    Rob

  • What is diff b/w active and inactive DCs

    hi
    please let me know what is diff between Active and Inactive DC's.
    If possible send some FAQs on JDI
    Thanks
    -mmukesh

    Hi Mukesh,
    When you are developing somthing through JDI (NWDI), you will have inactive dc and active dc.
    If you want to do some changes in code then you can do these changes through inactive dcs. Whatever changes you do in inactive DCs and until you check-in that activity. other developers cannot have those changes.
    but, when you check-in your activity those changes will be visible to other developers who are working on the same DC but this updated code will not be reflected in active DC.
    But when you activate that activity, those changes will be reflected in active dc and this active dc will be deployed on Development server.
    In summary, inactive DCs contain intermidiate code which is not ready to deploy on Development server yet. This updated code is available in Active DC.
    Hope now you are clear with Inactive and Active DCs.
    Regards,
    Bhavik

  • What is the diffrence between business Activity and task?

    Hi plz explain business activity and  task
    Madhavi

    Hi Venkat Mallela,
    Sorry to say this, but you must stop rewarding your own threads. A user registered today (10/25//2007) and posted many threads and always rewarded you as thread completed. I dodn't think it is a coincidence.
    If every SDN member starts playing this dirty trick, then there is no meaning to use SDN. SDN is for the people who share their good project experiences by helping other members by answering the issue.
    As I mentioned before, I should take up this issue with SAP officials if this happens again.
    Not only you, some other members were also recently started practicing the same trick, which is not a good thing.
    Hope you understood the voice of other forum members like me.
    Thanks,
    Paul Kondaveeti

  • My phone won't let me make a call, I have it activated and also used the 45 dollar plan and it still tells me to enter a phone number...What can I do to get it to work?

    If someone can please help me I am a new user to this phone and Verizon.  I got to so that I could call my son and mom long distance, but it won't let me make the call.  It is activated and has the 45 dollar plan on it.  I really want it to work and not be a waste of money. 

    I'm sorry you're having troubles making calls, cnasam. From the phone, please try dialing *228 [send], option 1 to program. When completed, restart phone. If this doesn't work, please reach out to PrePay directly at 888-294-6804 and select options 4,6,4 for prompt service.   Thank you, VanessaS_VZW Follow us on Twitter @VZWSupport If my response answered your question please click the "Correct Answer" button under my response. This ensures others can benefit from our conversation. Thanks in advance for your help with this!!

  • ITunes RADIO is not working.  "iTunes could not connect to the iTunes Store. Make sure your internet connection is active and try again." Try as I may, as many as ten attempts, trying to connect after restart, after shutdown, nothing works. Just so -  iTu

    iTunes RADIO is not working.
    “iTunes could not connect to the iTunes Store. Make sure your internet connection is active and try again.” Try as I may, as many as ten attempts, trying to connect after restart, after shutdown, nothing works. Just so …
    iTunes STORE not “connectable” with my otherwise perfectly-working internet connection, viable, up and running for all other uses.
    Simply put, firstly, I can't connect to the internet when I click on Radio.  People are quite suspicious that this is Apple incompetence or your company's famous arrogance for this commonly-suffered problem that you won't or “can’t” fix.
    Read the many web comments and you won’t be pleased with yourselves: the suspicion is that if you ruin internet radio on iTunes, Apple will somehow make more money on music downloads, etc. Bull.
    Also, thirdly, my old playlist of 20 or so internet radio stations in the Ambient category STILL PLAYS !
    Then fourth, I installed the latest available version of QuickTime Player 7.app Version 7.6.6 but it didn’t solve the problem either. I had QuickTime Player.app Version 10.2, but substituted what Apple website said was the latest, LOWER NUMBERED QuickTime Player version of 7.6.6
    Fifth, I can't connect to iTunes store no matter what I do or what user group's advice I try. So I can’t buy or download anything from iTunes. Bad for business.
    Sixth, I updated to the latest version of iTunes but this weird problem remains. All suggested Apple fixes or user group fixes are useless. Where is Apple’s famous technical competency, vaunted customer support?, and user-friendly product reputation? Get it back, please.
    Solve this problem of yours ASAP for us, your numerous disgruntled, dissatisfied customers of iTunes. You can do better, should, and really –in all fairness- must.
    ===============================================================
    NOTE:  no password for iTunes exists in my Keychain. Is this a problem?
    Apple ACCOUNT ID, and iTunes ID password, works but not to access iTunes with my healthy internet connection.
    Apple store id It works via direct internet connetion but not through iTunes.  Very strange.
    ===============================================================
    FYI, Hardware Overview:
      Model Name:                       MacBook Pro
      Model Identifier:                 MacBookPro8,2
      Processor Name:               Intel Core i7
      Processor Speed:               2 GHz
      Number of Processors:    1
      Total Number of Cores:    4
      L2 Cache (per Core):         256 KB
      L3 Cache:                            6 MB
      Memory:                              16 GB
      Boot ROM Version:            MBP81.0047.B27
      SMC Version (system):      1.69f4
      Serial Number (system):   C0*******F8V
      Sudden Motion Sensor:
      State:   Disabled
    Intel 6 Series Chipset:
      Vendor: Intel
      Product:            6 Series Chipset
      Link Speed:       6 Gigabit
      Negotiated Link Speed:           6 Gigabit
      Description:      AHCI Version 1.30 Supported
    M4-CT512M4SSD2:
      Capacity:           512.11 GB (512,110,190,592 bytes)
      Model: M4-CT512M4SSD2                         
      Revision:           040H   
      Serial Number: 0000000012330912E75A
      Native Command Queuing:    Yes
      Queue Depth:   32
      Removable Media:        No
      Detachable Drive:        No
      BSD Name:         disk0
      Medium Type:      Solid State
      TRIM Support:     Yes
      Partition Map Type:     GPT (GUID Partition Table)
      S.M.A.R.T. status:         Verified
      Volumes:
    disk0s1:
      Capacity:           209.7 MB (209,715,200 bytes)
      BSD Name:         disk0s1
      Content:            EFI
    disk0s2:
      Capacity:           511.25 GB (511,250,432,000 bytes)
      BSD Name:         disk0s2
      Content:            Apple_CoreStorage
    Recovery HD:
      Capacity:           650 MB (650,002,432 bytes)
      BSD Name:         disk0s3
      Content:            Apple_Boot
      Volume UUID:   600737FB-7A29-3BAE-859E-CBFE2E90C39A
    <Edited by Host>

    This my sound too simple, but I just kept clikning on the arrow next to the selected music and it finally "Kicked" in.
    I live in Europe ,So Be persistent and don't give up !  Aug. 2013

  • TS4268 hi my imessage isnt working so I turned off imessage and now its been saying "waiting for activation" and has been for a long while now? can you please help me!!! Also saying that my apple ID password is inccorrect when its not!

    Hi,
    My imessage isnt working so I turned off imessage and now its been saying "waiting for activation" and has been for a long while now? Also saying that my apple ID password is inccorrect when its not! Can anyone help me?
    Thanks

    While we all have MacBooks in this forum most of us don’t have Lion. There's a Lion Support Community where everybody has Lion.You should also post this question there.  https://discussions.apple.com/community/mac_os/mac_os_x_v10.7_lion

  • How to get Apple ID and password that is different to iTunes store account which I have already activated and completed contracts, tax information and bank information I want to create a Paid Books Account use apple ID

    I was given this address from the Apple customer support team.
    I have an active existing iTunes store account and use the same Apple ID for signing into my iTunes Connect Account that distributes Apps.
    I have created some books using the iBook author and in order to distribute content on the iBookstore I have been told electronically that I need a new Apple ID and password that is different to iTunes store account which I have already activated and completed contracts, tax information and bank information valid until 2013?
    I want to create a Paid Books Account using the same email address, tax information and bank information. This has been most frustrating, as I cannot get passed the sign in section and there is no contact person I can speak to. I was of the understanding the iTunes connect account and the Developer programs which I paid good money for is all what I needed to be paid for selling iBooks on the iBookstore???
    I only have one email address and wish to also use it for the Paid Books Account. I have books ready to be exported and published.
    I am also having trouble locating and downloading iTunes Producer. I understand I need to have the Paid Books Account active to access the iTunes Producer program. Please help.
    See additional information below:
    What device did you use to connect to the store?  Mac computer
    Which operating system is installed?  Mac OS X v10.7.x
    What version of iTunes is installed on your computer?  iTunes 10.6
    Choose the iTunes Store or App Store for your country:  Other
    Please select your country:  Australia

    Hi Lrwill,
    If the apps that are on your son's iPad were purchased under his Dad's Apple ID, then signing your Apple ID onto the iPad will not help you with updating those apps.
    Also, if the iPad was sync'd with his Dad's iTunes library, then hooking it up to your computer/iTunes library, will require you to reset the iPad, and everything that was loaded under the other Library and Apple ID will be wiped out.
    Can you provide a little more info about what was set up under which Apple ID and what iTunes library the iPad was sync'd with?
    Cheers,
    GB

Maybe you are looking for

  • Why does ical print out starting tuesday?

    Why does ical print out staring the week on tuesday? Maybe the week starts one day later for the Yosemite dev team, but certainly not in my neck of the woods. The actual print out also looks nothing like the new matt and  'flat' graphic style of Yose

  • Windows 2008 R2 DCs machine account password expiring

    We've a mixed Windows 2008/2003 environment across 30 connected sites. There is a mixture of 2008/2003 DCs. We've had an issue whereby when some of the Windows 2008 R2 DC have been rebooted, they lose there trust relationship with the domain ie we ha

  • Call WebDynpro Abap application with trasaction

    Hello Experts, can I call my WebDynpro Abap application with a trasaction ? Regards sas

  • Master data load: texts are not loaded

    Hi friends, Trying to load BW Hierarchy(0COSTCENTER) to BPC dimension(P_CC). Loadedd master data & text data using package "Import master data from BI infoobject"(/CPMB/IMPORT_IOBJ_MASTER), but EVdescription (texts) are not uploaded ino BPC dimension

  • 3rd gen atv drop wifi Internet connection?

    Why does my new 3rd gen atv drop wifi Internet connection? 2nd gen in bedroom works fine