How to call Web Start app from Web Start app?

Is there a way to call another Java Web Start Application from a running
Java Web Start Application, possibly from a different JNLP file?
Could this be done in a way that there won't be another virtual machine
launched; i. e. that the started Application will run in the same virtual
machine as the calling one?
Cheers,
Tobias

Im not sure about running in the same Jvm however there are two ways I know of to start another jnlp app. I am using this to essentially restart my application however, you dont have to do that and can start another web application by either using BasicService.showDocument with the jnlp file ( should start a webs tart app) or usign runtime exec with javaws and the jnlp as the argument.
    String jnlpUrlString = "commpartnersapp.jnlp?COMPANY="+COMPANY_ID;
    try {
      try {
        // Lookup the javax.jnlp.BasicService object
        //get the codebase
        //This will work on both Unix and Windows
        BasicService basicService = (BasicService) ServiceManager.lookup(
            "javax.jnlp.BasicService");
        URL codeBaseURL = basicService.getCodeBase();
        log.config("basicService.getCodeBase()=" + codeBaseURL.toString());
        basicService.showDocument(new URL(codeBaseURL, jnlpUrlString));
      catch (UnavailableServiceException ue) {
        //here for testing purposes since we are not started from jnlp in IDE
        log.log(Level.SEVERE,
                "ClientFrame:jMenuItemResetUserId_actionPerformed", ue);
        //when we are in the development environment
        String codeBaseString = "http://compub.cms/web/webportal/soft/";
        //Note this will work on windows only, javaws always in path
        //see http://java.sun.com/developer/community/chat/JavaLive/2005/jl0301.html
        //works on windows
        String execString = "javaws " + codeBaseString + jnlpUrlString;
        log.config("execString = " + execString);
        Process application = Runtime.getRuntime().exec(execString);
      catch (MalformedURLException ex) {
        log.log(Level.SEVERE,
                "ClientFrame:jMenuItemResetUserId_actionPerformed", ex);
    catch (IOException ex1) { //runtime exec throws IOException
      log.log(Level.SEVERE, "ClientFrame:jMenuItemResetUserId_actionPerformed", ex1);
    //pass a false param to not store profile at end of shutdown
    this.shutdown(0, false);  //calls System.exit(0);R
S

Similar Messages

  • I want download  other apps from web links .but i cant open ? Can u help me how i downelod in my i  its very important for me these apps related from my business . So kindly sugest me

    Dear sir
    am using i6+. Iam facing some problems regarding apps download . I just start using iPhone.
    my problem is when i go for download some apps from web page I can't download only some zip shows on 2nd web page i mean whin i click on download link for som app atumaticaly open another broswing page and zip and app name shows but I can't install that app in my iphone .
    all thes apps very important for my business.
    kindly  sugest me how can i insttal these aaps in my iPhone.these apps not avlable in google play store and itune app store .
    wat can i do ?

    The ONLY apps that can be installed will be found in the iTunes app store.
    You cannot load any other apps at all.

  • Calling a Report Program from Web Dynpro

    Hi all,
              I have a requirement, where i have to call a report program from web dynpro?. Wether its possible to call a report program in web dynpro?. Is we can call it, how this functionality has to be achived?

    Hello,
    Yes it is possible to call report using SUBMIT statement from one of the method defined in COMPONENTCONTROLLER's method tab.
    Once you define the method with SUBMIT statement then call that method with proper event.
    Rest configuration will remain same for ABAP webdynpro.
    Hope this helps.
    Thanks,
    Augustin.

  • Call an ABAP Program from Web Application designer

    Hi Gurus,
    I have an requirement in which I need to fetch an CSV file from the server and place the file into an internal table in R/3.I got the function module and wrote the program for this,but now I need to call this ABAP program from Web Application designer.
    To make it more explicit ,I need to call an ABAP Program /function module from the WAD.I am new to WAD Please help.
    Ankit

    Hi Ankit,
    take a look:
    /thread/725385 [original link is broken]
    WAD and ABAP
    How to call a ABAP or ABAP Class from the WEB
    /people/kai.wachter/blog/2008/03/11/how-to-write-own-items-in-bi-70-java-runtime
    Regards
    Andreas

  • How to stop an app from auto starting when signing on?

    how to stop an app from auto starting when signing on?

    Several point :
    1st : do you select "auto relaunch" application when you close ML last time? don't do that next time
    2nd : in system preferences/Users and Groups look at applications that are selected for automatic opening. You can remove application. Tab called "Open At Login"
    3rd : have a look at /Library/LaunchDeamons/
    4th : buy Lingon
    Hope it can help

  • How to download data in excel from web report in sap ?

    how to download data in excel from web report made  in sap abap?
    through tcode smw0.

    for exemple using
    MS_EXCEL_OLE_STANDARD_DAT

  • How to Call a jasper report from Oracle Forms 6i.

    Hi
    Can anybody tel me how to Call a jasper report from ORacle Forms 6i.
    Thanks & Regards
    Bango

    Forms 6i client/server? Use the HOST command to call the report. Since a Jasper report is just a call to a url, it will be something like:
    v_url := '<your url to the report>';
    host ('cmd /c start '||v_url);If it's web Forms 6i it even easier. Just use web.show_document(<url>).

  • How to call a  portal service from a servlet

    Hello all.
    I have a functioning portal service that I would like to call from a servlet.
    When I try to do so, I get a ClassCastException when I do this (on line two):
    IPortalRuntimeResources runtimeResources = PortalRuntime.getRuntimeResources();
    IDocumentPersistence docPer = (IDocumentPersistence) runtimeResources.getService(IDocumentPersistence.KEY);
    However if I do the following I can get a generic IService and use reflection to invoke the method (in the IDocumentPersistence interface) that I want to invoke:
    IPortalRuntimeResources runtimeResources = PortalRuntime.getRuntimeResources();
    com.sapportals.portal.prt.service.IService aService = (com.sapportals.portal.prt.service.IService) runtimeResources.getService(IDocumentPersistence.KEY);
    There must be a better way to use portal services (hopefully like scenario one above) in servlets. In web dynpro you can use portal services and cast them to the correct type. What am I missing?

    Hi Kim,
    how did you integrate the references to your Portal Service Interface into your web application?
    You should do this using the references in your application-j2ee-engine.xml, did you do this? It might be a problem with the classloader otherwise.
    The way you are calling portal services does work normally, however it is not the recommended way as it is documented in the SAP documentation.
    Please check the SAP documentation on how to access a portal service from a j2ee app:
    http://help.sap.com/saphelp_nw70/helpdata/EN/42/9ddd0cbb211d72e10000000a1553f6/frameset.htm
    Best regards,
    Stefan Brauneis

  • How to call a jar file from oracle forms (6i)

    Hi,
    I'm working with oracle 6i. I want to know that how to call a .jar file from forms menu. when I use HOST('<path>\test.jar') it is working in 'Client Server' any way. but the problem is I use application server in order to run my form. so my form is in the server and I run the form via clients web browser. in that case above solution will not work. if any body knows how to overcome this problem please reply.
    thanks.
    duminda

    I created a bean area and set the class name as implementation class. within that java bean class I called to a bat file which consists of the execution command of the jar file ( because i don't know how to call .jar file from my bean class directly).
    then i tried to run it in application server. its still not running.
    can you tell me what i have to do within my bean class? or can you suggest any solution?
    thank you.

  • How to call a shell script from a java code

    Hello can any one suggest me how to call a shell script from a java program that takes three parameters.
    i have a shell script (msp_restore_gui) when i run this script in the command line in a RHEL5 ,SUSE10 and Debian machine it works fine .I even tested to call it from a java program and it also worked fine but when i used the same in a J2ee application where the user when clicks the restore button in a webserver this inturn sends the request to a java file named BackupManager.java where i call the shell script.But here it fails.Waiting for your suggestions.If you want i can put the code also here

    yes the script is in /usr/local/mss/tools/backup and the script (msp_restore_gui) is as follows
    #!/bin/sh
    TIMESTAMP=`date +%d_%b_%y-%H-%M`
    touch /var/backups/mss/mss_restore_"$TIMESTAMP".log
    LOGFILE="/var/backups/mss/mss_restore_"$TIMESTAMP".log"
    ### Explode tgz file
    cd /
    # Checks to be done:
    # root login
    # assume he passes the parameter as msp_backup_<timestamp>
    # check for the existence of the .tz and fileList.txt
    # Checking for the root login and if not logged on as root
    # permission will be denied to execute this script
    logmsg(){
    echo "`date`: $*" >> $LOGFILE 2>&1
    echo "$*"
    #usage of this script
    while [ $#  -ne 0 ]
    do
    case $1 in
    -n)
    shift
    ARCHIVE_NAME=`find / \( -name "$1.tz" -o -name "$1.tgz" \) 2>/dev/null`
    FILE_NAME=`find / -name $1_filesList.txt 2>/dev/null`
    if [ x$ARCHIVE_NAME = x -a y$FILE_NAME = y ]
    then
    logmsg "ERROR: Files not found, Restore cannot proceed"
    usage
    else
    tar tvzf $ARCHIVE_NAME > /dev/null 2>&1
    if [ $? -ne 0 ]
    then
    echo "ERROR: The tar file $ARCHIVE_NAME is not proper. Restore cannot proceed"
    exit 1
    else
              echo "Backedup files are present, proceeding with restore......" >> $LOGFILE 2>&1
    fi
    fi
    usage
    SKIP_CLEANUP=1
    STATUS=1
    exit
    esac
    shift
    done
    rm -rf ./newfile
    curr_ver_file="/usr/local/mss/etc/version"
    /usr/local/mss/tools/backup/check_version $curr_ver_file $FILE_NAME
    ret_code=$?
    echo "Exit value of check_version is $ret_code"
    if [ "$ret_code" != 0 ]
    then
    logmsg "MSP Version not matching. Exiting from restore now...."
    errormsg=`cat /usr/local/mss/temp/ver_err_mesg`
    logmsg $errormsg
    rm -f /usr/local/mss/temp/ver_err_mesg
    exit 1
    else
    echo "Version check is successful"
    fi
    #### ShutDown MSS########
    /etc/init.d/mss stop
    sleep 2
    ### Shutdown semm
    /etc/init.d/semm stop
    sleep 2
    rm -rf `grep -v "MSP Version:" $FILE_NAME`
    logmsg "MSP restore in progress......"
    tar mxvfz $ARCHIVE_NAME >> $LOGFILE
    sleep 5
    ### Call mysql restore script
    /usr/local/mss/bin/mysql_alldb_restore.sh >> $LOGFILE 2>&1
    if [ $? -ne 0 ]; then
    logmsg "Database restore Failed. Cannot proceed further"
    exit 1 ;
    else
    logmsg "Database restore Succeeded."
    fi
    ### Remove DB Dump Files
    rm -f /var/lib/mysql-dumps/*
    ### Trigger cleanup of airprism database tables
    #touch /usr/local/mss/airprism/server/config/reinitdb
    ### Trigger re-import of software packages
    touch /usr/local/mss/swdepot/reimport
    ### Remove log files under the "apps" directory
    find /usr/local/mss/apps -name '*.log*' | xargs rm -f
    find /usr/local/mss/logs -follow -name '*[._]log*' | xargs rm -f
    if [ $? -ne 0 ]; then
    logmsg "MSP restore Failed. Cannot proceed further"
    exit 1 ;
    else
    logmsg "MSP restore Succeeded."
    fi
    # reinstall_patch is touched so that patches are re-installed after restoring of MSP.
    touch /usr/local/mss/patch/bin/reinstall_patch
    ##### Start MSS
    logmsg "restarting MSP server "
    /etc/init.d/mss start
    sleep 5
    ### Start semm
    /etc/init.d/semm start
    sleep 5
    logmsg "MSP server is now restarted"
    my jsp page backup.jsp is as follows
    <%@taglib uri="portlet.tld" prefix="uif" %>
    <%@taglib uri="msp-console.tld" prefix="msp" %>
    <uif:defineObjects/>
    <%@page import="javax.portlet.*" %>
    <%@ page import="java.util.Date" %>
    <%@ page import="java.util.Vector" %>
    <%@ page import="java.text.DateFormat" %>
    <%@ page import="com.symbol.mss.console.admin.backup.BackupManager" %>
    <%@ page import="com.symbol.mss.console.admin.system.SystemInfoPortlet" %>
    <%
         String STYLE_NAME = request.getParameter("style");
         if (STYLE_NAME == null) STYLE_NAME = STYLE_DEFAULT;
         final String ua = request.getHeader("User-Agent");
         BackupManager helper = null;
         PortletSession portletSession = renderRequest.getPortletSession();
         helper = (BackupManager)portletSession.getAttribute("helper");
         if (helper == null) {
              //System.err.println("Created new BackupManager");
              helper = new BackupManager();
              portletSession.setAttribute("helper", helper);
         final BackupManager backupManager = helper;
         String action = "";
         final String backupName = renderRequest.getParameter("backupName");
         String completePath = backupManager.getBackupDir() + backupName + backupManager.getBackupFileExt();
         if (backupName != null) {
              action = "backup";
         if(backupManager.backup(backupName)) {
              SystemInfoPortlet.beginRestartMSP();
              } else {
                   action = "backuperror";          
         final String cmd = renderRequest.getParameter("submitButton");
    final String selectedBackup = renderRequest.getParameter("selectedBackup");
    int tarFileStatus =0;
    String backupTarFile ="";
    String backupFileList ="";
         if ("Restore".equals(cmd)) {
    if (selectedBackup != null) {
         tarFileStatus = backupManager.verifyTarFile(selectedBackup);
         //backupTarFile = backupManager.getRestoreFile(Integer.parseInt(selectedBackup));
         //backupFileList = backupTarFile.substring(0, backupTarFile.lastIndexOf(backupManager.getBackupFileExt()))+"_filesList.txt";
                   if (tarFileStatus == 0){
         action = "restore";
         backupManager.restore(selectedBackup);
                        SystemInfoPortlet.beginRestartMSP();
              } else {
                   action = "error";
    } else if ("Remove".equals(cmd)) {
    backupManager.remove(Integer.parseInt(selectedBackup));
         DateFormat dateFormat = DateFormat.getDateInstance(DateFormat.SHORT);
         PortletURL restoreURL = renderResponse.createActionURL();
    %>
    <%@ include file="/jsp/core/constants.jspf" %>
    <% if (action.length() > 0) {
         if ("backup".equals(action))
    %>
         <p>The MSP Appliance has been shut down in order to create the <%=backupName %> backup file,
              and will automatically restart as soon as the file has been created.
              To continue your work, please log out of the MSP Console, wait for the appliance
              to restart, and then log back in. The amount of time you'll have to wait for the
              MSP Appliance to come back online depends on the amount of information you have
              stored in the MSP Database.</p>
         <p>The full pathname for the backup file is: <%=completePath %></p>     
    <%     }
         else if ("restore".equals(action))
    %>
         <p>The MSP Appliance has been shut down in order to restore from the <%=backupTarFile%> backup file,
              and will automatically restart as soon as the restore is complete.
              To continue your work, please log out of the MSP Console, wait for the appliance
              to restart, and then log back in. The amount of time you'll have to wait for the
              MSP Appliance to come back online depends on the amount of information you have
              stored in the MSP Database.</p>     
    <%     } else if ("backuperror".equals(action)) { %>
              <p><img src="images/dialogue/error_16.gif" class="icon" alt="Notify" /> Errors occurred while taking back up of MSP. Please see the backup service log file for more details.
              </P>
    <%     } else if ("error".equals(action)) {
              if (tarFileStatus == 4) { %>
                   <p><img src="images/dialogue/error_16.gif" class="icon" alt="Notify" /> The backup file <%=backupTarFile%> contains errors. This backup can't be restored. Please restore a valid back up.
                   </P>
              <%} else if (tarFileStatus == 3) { %>
                   <p><img src="images/dialogue/error_16.gif" class="icon" alt="Notify" /> The backup file list <%=backupFileList %> is missing. This file is required to restoring backup. Please get the backup file list and proceed with restoring backup.</p>
              <%} else if (tarFileStatus == 2) { %>
                   <p> <img src="images/dialogue/error_16.gif" class="icon" alt="Notify" /> The backup file <%=backupTarFile%> contains errors and the backup file list <%=backupFileList%> is missing. This backup can't be restored. </p>
              <%} %>
    <%     }
    } else { %>
    <p><strong>Note</strong>: Both backup and restore will shut down MSP temporarily. MSP will be unable to collect data from devices, send notifications, or provide MSP Console access during this time. When the backup or restore operation is complete, MSP will come back online automatically.</p>
    <h3>Backup</h3>
    <form action="<%= restoreURL.toString() %>" method="post">
    <p>Please provide a name for your backup. MSP will provide the date automatically in the list of backups.</p>
    <p><label for="<uif:namespace />backupName">Name</label> <input type="text" name="<uif:namespace />backupName" id="<uif:namespace />backupName" size="20" maxlength="256" /> <input type="submit" name="<uif:namespace />submitButton" value="Back up now" onclick="return <uif:namespace/>validateName()"/></p>
    </form>
    <h3>Restore</h3>
    <p>This will restore all databases (device assets, collected device data, software packages, policies, etc.) to their state as of the time the backup was made. Changes since then <em>except for backups</em> will be destroyed.</p>
    <%
    Vector restoreList = helper.getRestoreEntries();
    Vector restoreDates = helper.getRestoreDates();
    Vector restoreVersions = helper.getRestoreVersions();
    Vector filesStatus = helper.getBackupFilesStatus();
    %>
    <% if (restoreList.size() == 0) { %>
    <p>There are no backups currently available.</p>
    <% } else { %>
    <form action="<%= restoreURL.toString() %>" method="post">
    <table class="input-radios" id="<uif:namespace />existingBackups">
    <thead>
    <tr>
    <th></th>
    <th>Name</th>
    <th>Date</th>
    <th>MSP Version</th>
    <th>Remarks </th>
    </tr>
    </thead>
    <tfoot>
    <tr>
    <td colspan="4" class="actionsOnSelected">
    <input type="submit" name="<uif:namespace />submitButton" value="Restore" onclick="return confirm('This action requires MSP and all related services to be shut down. Console will be unavailable if the request is submitted. The server will restart automatically once restore has been completed.');" />
    <input type="submit" name="<uif:namespace />submitButton" value="Remove" onclick="return confirm('This action will remove the backup archive. You will no longer be able to restore this backup. Continue?');" />
    </td>
    </tr>
    </tfoot>
    <tbody><%-- First one (most recent) is checked by default. Every other row has class="portlet-section-alternate". Note that each ID must be unique and must match the value of the "for" attribute on the corresponding "label" element. --%>
    <%
    for (int i = 0; i < restoreList.size(); i++) {
    %>
    <tr <%= (i % 2 == 1) ? " class=\"portlet-section-alternate\"" : "" %>>
    <td><input type="radio" name="<uif:namespace />selectedBackup" value="<%= i %>" id="<uif:namespace />selectedBackup-<%= i %>" <%= (i == 0) ? "checked=\"checked\"" : "" %> /></td>
    <td><label for="<uif:namespace />selectedBackup-<%= i %>"><%= restoreList.elementAt(i) %></label></td>
    <td><%= dateFormat.format((Date)restoreDates.elementAt(i)) %></td>
    <td><%= restoreVersions.elementAt(i) %></td>
    <td><%= filesStatus.elementAt(i) %></td>
    </tr>
    <%
    %>
    </tbody>
    </table>
    </form>
    <% } %>
    <% } %>
    <script type="text/javascript">
    <!--//--><![CDATA[//><!--
    function <uif:namespace/>validateName() {
    var name =document.getElementById("<uif:namespace />backupName");
    var msg= "<msp:i18n key="BackupMsg"/>";
    var str=name.value;
    var re = /^[A-Za-z0-9_]+$/;
    if (!str.match(re)) {
         alert(msg);
         name.focus();
         return false;
         } else {
    return confirm('This action requires MSP and all related services to be shutdown. Console will be unavailable if the request is submitted. The server will restart automatically once backup has been completed.');
    //--><!]]>
    </script>
    and my BackupManager.java is as follows where the code in bold and italic is called the restore()
    //============================================================================
    // Symbol Technologies P R O P R I E T A R Y S O U R C E C O D E
    // C O N F I D E N T I A L
    // Copyright (c) 2003 Symbol Technologies. All Rights Reserved.
    // All information contained herein is the property of Symbol Technologies,
    // or its Licensors, and are protected copyrights and trade secrets, and may
    // be covered by U.S. patents. Any reproduction or dissemination of any
    // portion of this document, of the software, or other works derived from it
    // is strictly forbidden unless prior written permission is obtained from
    // Symbol Technologies.
    //============================================================================
    package com.symbol.mss.sdf.services.backup;
    import java.io.*;
    import java.sql.Time;
    import java.text.DateFormat;
    import java.util.logging.FileHandler;
    import java.util.logging.Formatter;
    import java.util.logging.LogRecord;
    import java.lang.Process;
    import java.util.*;
    import org.apache.avalon.framework.configuration.Configurable;
    import org.apache.avalon.framework.configuration.Configuration;
    import org.apache.avalon.framework.configuration.ConfigurationException;
    import org.apache.avalon.framework.logger.LogEnabled;
    import org.apache.avalon.framework.logger.Logger;
    import com.symbol.mss.sdf.admin.AdministratorService;
    import com.symbol.mss.sdf.backup.*;
    import com.symbol.mss.sdf.data.*;
    * @author nramaiah
    * Service to perform scheduled backups of the system state.
    public class BackupManager implements BackupService, DataHandler,
    LogEnabled, Configurable {
    // MSS Home Path
    private static String mssHome = System.getProperty("phoenix.home", File.separator + "usr" +
    File.separator + "local" +
    File.separator + "mss" +
    File.separator);
    // Backup related definitions
    private static final String BACKUP_LIST_FILE_NAME = "conf" + File.separator + "files_to_backup.txt";
    private static final String BACKED_UP_LIST_FILE_NAME_SUFFIX = "_filesList.txt";
    private static final String BACKUP_LOCATION = File.separator + "var" + File.separator + "lib" +
    File.separator + "mss-backups" + File.separator;
    private static final String BACKUP_PARTITION = File.separator + "var" + File.separator + "lib";
    private static final String VERIFY_BACKUP = File.separator + "usr" + File.separator + "local" +
                                                           File.separator + "mss" + File.separator+"tools"+
                                                           File.separator+"backup"+File.separator+"verifyBackup.sh";
    // DB backup/restore related definitions
    private static final String DB_DUMP_LOCATION = File.separator + "var" + File.separator +
    "lib" + File.separator +
    "mysql-dumps" + File.separator;
    private static final String DB_BACKUP_SCRIPT = "bin" + File.separator + "mysql_alldb_backup.sh";
    private static final String DB_RESTORE_SCRIPT = "bin" + File.separator + "mysql_alldb_restore.sh";
    // Private variables
    private AdministratorService m_admin = null;
    private Logger m_logger = null;
    private String backupLocation = null;
    private String backupListFileName = null;
    private String backupPartition = null;
    private int backupPartitionLimit = 90;
    private String dbDumpLocation = null;
    private String dbBackupScript = null;
    private String dbRestoreScript = null;
    private List servicesBackupList = null;
    private String tarFileExtension =".tgz";
    private String errFileExtension =".err";
    private int exitValue=0;
    * Default Constructor
    public BackupManager() {
    servicesBackupList = new ArrayList();
    * Set the administrator service implementation. Link established by Broker service.
    * @param admin reference to an implementation of AdministratorService
    public void setAdministrator(AdministratorService admin) {
    m_admin = admin;
    * Set the job publisher service implementation. Link established by Broker service.
    * @param jobPublisher reference to an implementation of JobPublisherService
    public void setJobPublisher(DataChannel jobPublisher) {
    jobPublisher.subscribe(this);
    * Gets the backup manager object.
    * @return backup manager object
    public BackupService getBackupService() {
    return this;
    * Service lifecycle method.
    * @param logger logger object to be used by the service
    public void enableLogging(Logger logger) {
    m_logger = logger;
    * Service lifecycle method.
    * @param configuration service configuration object
    public void configure(Configuration configuration) throws ConfigurationException {
    // Verify MSS Home path
    if (!mssHome.endsWith(File.separator))
    mssHome += File.separator;
    // Get the location where the backup file needs to be placed
    backupLocation = configuration.getChild("BackupLocation").getValue(BACKUP_LOCATION);
    // Verify backup directory path
    if (!backupLocation.startsWith(File.separator))
    backupLocation = mssHome + backupLocation;
    if (!backupLocation.endsWith(File.separator))
    backupLocation += File.separator;
    // Get the file listing the files/directories to be backed up
    backupListFileName = configuration.getChild("FilesList").getValue(BACKUP_LIST_FILE_NAME);
    // Verify backup list file name path
    if (!backupListFileName.startsWith(File.separator))
    backupListFileName = mssHome + backupListFileName;
    // Get the partition where the backups are kept
    backupPartition = configuration.getChild("BackupPartition").getValue(BACKUP_PARTITION);
    // Verify backup partition path
    if (!backupPartition.startsWith(File.separator))
    backupPartition = File.separator + backupPartition;
    if (backupPartition.endsWith(File.separator))
    backupPartition = backupPartition.substring(0, (backupPartition.length()-1));
    // Get the limit on the amount of free space on the backup partition
    backupPartitionLimit = configuration.getChild("BackupPartitionLimit").getValueAsInteger(backupPartitionLimit);
    // Get the location where the DB dump files will be placed
    dbDumpLocation = configuration.getChild("DBDumpLocation").getValue(DB_DUMP_LOCATION);
    // Verify DB dump directory path
    if (!dbDumpLocation.startsWith(File.separator))
    dbDumpLocation = mssHome + dbDumpLocation;
    if (!dbDumpLocation.endsWith(File.separator))
    dbDumpLocation += File.separator;
    // Get the name of DB dump backup script
    dbBackupScript = configuration.getChild("DBBackupScript").getValue(DB_BACKUP_SCRIPT);
    // Verify backup script path
    if (!dbBackupScript.startsWith(File.separator))
    dbBackupScript = mssHome + dbBackupScript;
    // Get the name of DB dump restore script
    dbRestoreScript = configuration.getChild("DBRestoreScript").getValue(DB_RESTORE_SCRIPT);
    // Verify restore script path
    if (!dbRestoreScript.startsWith(File.separator))
    dbRestoreScript = mssHome + dbRestoreScript;
    * Individual services can supply a list of files/directories to be backed up.
    * These are files apart from the files specified in conf/files_to_backup.txt and
    * will be backed up as well.
    * @param files list of files/directories
    public void filesToBackup(List files) {
    synchronized(this) {
    if (files != null) {
    if (files.size() > 0) {
    // Add the list contents to the current backup list
    for (int i=0; i<files.size(); i++) {
    String tStr = (String)files.get(i);
    // Check for absolute or relative path
    if (tStr.startsWith(File.separator))
    servicesBackupList.add(tStr);
    else
    servicesBackupList.add(mssHome + tStr);
    else
    m_logger.info("Empty list of filenames. Nothing added.");
    else
    m_logger.info("Null list of filenames. Nothing added.");
    * Individual services can supply a list of files/directories to be backed up.
    * Specified files will be added to the file defining the list of files to be backed up.
    * @param files list of files/directories
    private void persistFilesToBackup(List files) {
    synchronized(this) {
    if (files != null) {
    if (files.size() > 0) {
    // Add the list of files provided to the end of file
    try {
    File file = new File(backupListFileName);
    if ((file == null) || (!file.exists()))
    file.createNewFile();
    // Seek to the end of the file
    RandomAccessFile rFile = new RandomAccessFile(file, "rw");
    if (rFile != null) {
    rFile.seek(rFile.length());
    // Write the list contents to the file
    for (int i=0; i<files.size(); i++) {
    String tStr = (String)files.get(i);
    // Check for absolute or relative path
    if (tStr.startsWith(File.separator))
    rFile.writeBytes(tStr + "\n");
    else
    rFile.writeBytes(mssHome + tStr + "\n");
    else
    m_logger.error("Error opening file " + backupListFileName);
    rFile.close();
    catch (Exception ex) {
    ex.printStackTrace();
    m_logger.error("Error adding entries to file " + backupListFileName, ex);
    else
    m_logger.info("Empty list of filenames. Nothing added.");
    else
    m_logger.info("Null list of filenames. Nothing added.");
    * Command to be run during the backup process. Individual services can
    * provide shell commands that will be executed before backing up the files.
    * @param command shell command to be executed
    private void runCommand(String command) {
    * Creates a shell script at the specified location that will backup the
    * files listed in the List passed in.
    * @param scriptFileName location where the script needs to be created
    * @param backupFileName name for the tar file being created
    * @param backupList list of files to be backed up
    private void createBackupScript(String scriptFileName, String backupFileName, ArrayList backupList) throws Exception {
    // Create a new StringBuffer to build the contents to be written to the script file
    StringBuffer buffer = new StringBuffer();
    // Add the initial comment in the start script
    buffer.append("#!/bin/sh\n" + "set -x\n\n");
    // Check if the partition has enough space
    buffer.append("### Check if the partition has enough space\n" +
    // "diskUsed=`df -k | grep \"" + backupPartition + "\" | awk '{print $5}' | cut -d\"%\" -f1`\n" +
                   " diskUsed=`df -k \"" + backupPartition + "\" | awk '{print $5}' | cut -d\"%\" -f1 | grep -v Use`\n" +     
    "echo \"Partition " + backupPartition + " is $diskUsed% used.\"\n" +
    "if [ \"$diskUsed\" -lt \"" + backupPartitionLimit + "\" ]\nthen\n" +
    " echo \"Starting backup...\"\n\n");
    // Shutdown semmd
    buffer.append(" ### Shutdown semm\n" + " /etc/init.d/semm stop\n" +
    " sleep 2\n\n");
    // MSP Limited release and earlier builds stop mysql DB and backup the
    // /var/lib/mysql directory as it is. Starting MSP 1.0 GA release, mysql
    // dump script will be integrated which will create sql scripts to
    // restore the database.
    // Check if mysql dump creation script exists
    File mysqlDumpScript = new File(dbBackupScript);
    if (mysqlDumpScript.exists()) {
    // MSP 1.0 GA and later releases
    // Run the script that will generate sql scripts that would re-create the DB as it is
    buffer.append(" ### Call mysql dump script\n" +
    " " + dbBackupScript + "\n\n");
    else {
    // MSP Limited release
    // Add command to shutdown mysql
    buffer.append(" ### Shutdown mysql\n" + " /etc/init.d/mysql stop\n\n");
    // Change to root directory and create the tgz file
    buffer.append(" ### Create tgz file\n" + " cd /\n");
    // Build up the tar file name from the current date and time
    String fileName = null;
    if ((backupFileName != null) && (backupFileName.length() > 0))
    fileName = backupFileName;
    else {
    // File name not provided by user, build one using the timestamp
    Calendar cal = Calendar.getInstance();
    Date date = cal.getTime();
    fileName = "MSS-"
    + DateFormat.getDateInstance().format(date).replaceAll(" ", "").replaceAll(",", "")+ "-"
    + (new Time(cal.getTimeInMillis())).toString().replaceAll(":", "").substring(0,4);
    String tarFileName = fileName + ".tgz";
    // Get the current MSP Version
    String mspVersion = getMSPVersion();
    // Gather all the files to be backed up. Add them to the tar command and
    // also dump them into the file maintaining the list of files being backed up
    String listStr = "";
    for (int i=0; i<backupList.size(); i++)
    listStr += (String)backupList.get(i) + "\n";
    // Dump the current MSP version and the list of files being backed up into a manifest file
    String listFileName = fileName + BACKED_UP_LIST_FILE_NAME_SUFFIX;
    RandomAccessFile file = new RandomAccessFile(backupLocation + listFileName, "rw");
    m_logger.info("List of files/directories being backed up:\n" + listStr);
    file.writeBytes("### MSP Version: " + mspVersion + " ###\n");
    file.writeBytes(listStr);
    file.close();
    // Add the tar command to the script
    buffer.append(" echo \"Creating " + backupLocation + tarFileName + "...\"\n" +
    " tar cvhfz " + backupLocation + tarFileName + " `grep -v \"MSP Version:\" " +
    backupLocation + listFileName + "`\n\n");
    // Check if free space on the backup partition has reduced below the limit
    // If enough space left, backup is retained, "mss" is made the owner of the files,
    // "backup" is made the group the files belong to,
    // permissions changed to be "0660" and
    // backup action declared a success
    // Else, backup files are deleted and declared a failure
    buffer.append(" ### Check if the partition has enough space left\n" +
    //" diskLeft=`df -k | grep \"" + backupPartition + "\" | awk '{print $5}' | cut -d\"%\" -f1`\n" +
    " diskLeft=`df -k \"" + backupPartition + "\" | awk '{print $5}' | cut -d\"%\" -f1 | grep -v Use`\n" +
    " echo \"Partition " + backupPartition + " is $diskLeft% used.\"\n" +
    " if [ \"$diskLeft\" -gt \"" + backupPartitionLimit + "\" ]\n" +
    " then\n" +
    " ### Failure\n" +
    " echo \"Partition " + backupPartition + " does not have enough space.\"\n" +
    " echo \"Backup " + backupLocation + tarFileName + " will be removed.\"\n" +
    " rm -f " + backupLocation + fileName + "*\n" +
    " echo \"Backup Failed.\"\n" +
    " else\n" +
                        " tar tvzf " + backupLocation + tarFileName + " > /dev/null 2>&1\n" +
    " if [ ! -s " + backupLocation + tarFileName + " -o $? -ne 0 ] \n" +
                        " then\n" +
                        " echo \"MSP Backup operation is not successful. The tar file " + backupLocation + tarFileName + " contains errors.\"\n" +
                        " echo \"Please take the backup again\"\n" +
                        "     touch "+backupLocation+fileName+".err\n" +
    " else \n" +
    " ### Success\n" +
    " ### Change the owner, group and permissions for the backup files\n" +
    " chown mss " + backupLocation + fileName + "*\n" +
    " chgrp backup " + backupLocation + fileName + "*\n" +
    " chmod 0660 " + backupLocation + fileName + "*\n" +
    " echo \"Backup Completed.\"\n" +
    " fi\n" +
    " fi\n\n");
    // MSP Limited release and earlier builds re-start mysql. Starting
    // MSP 1.0 GA release, mysql is not stopped and so re-start is not
    // needed. sql scripts created by the dump script get packed into
    // the tar file and so are deleted.
    // Check if mysql dump creation script exists
    if (mysqlDumpScript.exists()) {
    // MSP 1.0 GA and later releases
    // Remove DB dump files
    buffer.append(" ### Remove DB Dump Files\n" + " rm -f " + dbDumpLocation + "*\n\n");
    else {
    // MSP Limited release
    // Start mysql
    buffer.append(" ### Start mysql\n" + " /etc/init

  • Mozilla won't display web cam feed from web site

    Mozilla won't display web cam feed from web site: http://www.fs.usda.gov/wps/portal/fsinternet/!ut/p/c4/04_SB8K8xLLM9MSSzPy8xBz9CP0os3gDfxMDT8MwRydLA1cj72DTUE8TAwjQL8h2VAQAMtzFUw!!/?ss=110803&navtype=BROWSEBYSUBJECT&cid=fsm9_029107&navid=091000000000000&pnavid=null&position=Not%2520Yet%2520Determined.Html&ttype=detailfull&pname=Chattahoochee-Oconee%2520National%2520Forest-%2520Home
    I have the latest Java software and can load the above feed in IE but not Mozilla. I can also load a similar Java feed from
    http://www.brmemc.net/brasstown/ in both IE and Mozilla.

    (Glad to see you're still lurking around here, Wyrenut.  Your posts have helped me tremendously.  And this comes form somebody who has run and internal developer's support group for quite a few years.)
    I also started having this problem after getting my TX hooked up through my home network.  I had to set up a wireless access point with only WPA security to get around having to change the WPA2 security on all my other equipment.  I applied the ESU upgrade, but that didn't seem to help with WPA2 Personal.  Previously, I could get at least half of the pages to come up through the open hotspot in the lobby of our building at work, but I haven't tried that since I applied the ESU upgrade this morning.
     I can get to the internet through the access point using a laptop, and I can see the IP address of the Palm coming through the access point on the router's admin page, and the DNS addresses of the PC and the Palm are the same.  So I think I'm through, but every page I try gets the 'Page not available' message, even if I enter the IP address of the page rather than the URL.
    Is there any other method of debugging available to see if the page is really coming back and locking up Blazer, or whether it's really not coming back at all?  Or any other suggestions? 
    Personally, I sort of liked the old Internet Explorer that counted off how many K were coming through as the page was being loaded.  At least you could tell something was happening.
    Thanks,

  • How to call a maintenance view  from a program

    Hello Abapers,
    Can anybody explain with some examples. How to call a mainetenance view from a program.
    Thanks
    Ranjith.

    Use FM 'VIEW_MAINTENANCE_CALL'.
    REPORT  zmaintaintest.
    VARIABLES / CONSTANTS                          
    CONSTANTS: 
                    c_action(1) TYPE c VALUE 'U',                                 "Update
              c_viewname TYPE tabname value 'ZEMP_EXAMPLE', "View Name
              c_field(6) TYPE c VALUE 'EMPNO'.                            "Field Name
    INTERNAL TABLES
    DATA: itab_rangetab TYPE STANDARD TABLE OF vimsellist,
              v_empno TYPE zempno,
              wa_rangetab TYPE vimsellist.
    SELECTION SCREEN
    PARAMETERS:     p_empno TYPE   zempno   OBLIGATORY.  "Emplyee ID
    AT SELECTION-SCREEN                                                 
    AT SELECTION-SCREEN.
    Chcking the existence of the user in EMPLOYEE table
      PERFORM validate_employee.
    START_OF_SELECTION                                                  
    START-OF-SELECTION.
    This will restrict the user view so that user can only view/change
    Table data corresponding to his/her Employee ID
      PERFORM define_limited_data_area.
    Displaying table maintenance view for a particular employee ID
      PERFORM call_view_maintenance.
    *&      Form validate_employee
    Validate plant entered in the selection screen
    FORM validate_employee.
      SELECT SINGLE empno     u201CEmployee ID
        FROM zemp_example     u201CEmployee Table
        INTO v_empno
        WHERE empno = p_empno.
      IF sy-subrc <> 0.
        MESSAGE 'Not an Valid User' TYPE 'I'.
      ENDIF.
    ENDFORM.                    "validate_employee
    *&      Form DEFINE_LIMITED_DATA_AREA
    To restrict the user view so that user can see/change table data
    corresponding to his employee ID. Here one internal table is
    getting populated with field name as u201CEMPNOu201D (Key field of the table)
    And value as given by user in Selection Screen and this is passed as
    Parameter in function module 'VIEW_MAINTENANCE_CALL'
    FORM define_limited_data_area.
      CLEAR wa_rangetab.
      wa_rangetab-viewfield  = c_field.
      wa_rangetab-operator  = 'EQ'.
      wa_rangetab-value       = p_empno.
      APPEND wa_rangetab TO itab_rangetab.
    ENDFORM.                    "define_limited_data_area
    *&      Form CALL_VIEW_MAINTENANCE.
    Displaying table maintenance view for a particular employee ID
    FORM call_view_maintenance.
      CALL FUNCTION 'VIEW_MAINTENANCE_CALL'      
        EXPORTING
          action           = c_action
          view_name   = c_viewname
        TABLES
          dba_sellist     = itab_rangetab.
    ENDFORM.                    "call_view_maintenance
    Regards,
    Joy.

  • Re: How do I keep an application from being started morethan once?

    Here are some quick ideas. None of them should be too hard to implement,
    although each has some drawbacks.
    1. Have a login server track who is logged on, and if there is already a
    logon for a given user or a given machine, then deny the application
    startup. The nice thing about this is that a user will not be able to have
    multiple logins even by going to another machine. Then again, this may not
    be so nice, and you also get a possible single point of failure on the
    login server for which you will have to prepare.
    2. Drop to the operating system, and get a list of processes for the client
    machine. If the name of one of them matches the name of application that
    is being run, then deny startup. This avoids a network hit, but requires
    some OS specific code. Also, a clever user could change the name of an
    executable to get around this. Note that a user could have another login
    on another machine.
    3. Write to a file on the local machine. You can hide the file in some
    suitable place, and can also scramble some information so that a user
    cannot get around having this file present by reading from the file at
    startup and then writing to it. Based on the state of your application,
    the file will have some scrambled information indicating if an instance of
    an application can be started. If you retain the write lock (i.e. do not
    close) the file for the duration of the application, you increase your
    security at the risk of a confused user if the application gets terminated
    without releasing the lock. Depending on the OS where the client will run,
    this could be an issue. If you like this option, perform some experiments
    first on all configurations of an example client machine to determine the
    behavior. Again, this only works to prevent an extra login on a single
    machine, not system wide.
    If you are not concerned about your users hacking around too much and don't
    care about a login on another machine, I would opt for some version of
    number 3. Otherwise, I would venture number 1.
    Regards
    CSB
    At 07:47 AM 2/18/98 -0500, Martin G Nystrom wrote:
    A user can launch an application, then launch it again. How do we make it so
    that the user can only run one instance of the application?
    Martin Nystrom
    Eli Lilly and Company
    ([email protected])
    Curtis Bragdon, Senior Consultant, Forte Software
    [email protected]
    Voice Mail: (510) 986-3807
    Paging: (888) 687-6723
    "I've seen dozens of triggering towns." - Richard Hugo

    Yet another quick and dirty solution is to use local ExternalConnections.
    This is a single instance per machine solution.
    Example is attached.
    (See attached file: TestOne.pex)
    [email protected] on 02/18/98 10:01:07 PM
    Please respond to [email protected]
    To: [email protected]
    cc: [email protected]
    Subject: Re: How do I keep an application from being started more than
    once?
    Martin,
    there are two ways to read your question
    (a) no more than one instance of an application per machine
    (b) no more than one instance of an application per "user"
    now if a user has only one machine, and your system has "userids" and you
    only want
    one active "session" per "user" then the distinction is irrelevant.
    However, many systems
    let people share logins, so a token based thing enforcing one login will be
    problematic.
    The downside of #1 approach suggested by Curtis happens when a machine gets
    hosed without "logging" the user off the security system, then they can't
    get in until their ticket expires or a sysadmin gets involved. Should be
    manageable, however. But this enforces one application
    instance per user, unless you check both for the presence of an active
    token for that user as well as the presence of a token tied to that
    particular node name. Otherwise there is nothing to prevent the same user
    from launching the app again and logging in as a different user. This is
    definitely the best approach of the bunch, and can be adapted for either
    (a) or (b).
    Suggestion # 2 won't work unless the application is built as a compiled
    client,
    since the process name will be 'ftexec' and not the "name" of the
    application. And it doesn't
    prevent a user from launching the app from a different machine (or people
    sharing logins). So again it depends on what you are trying to achieve.
    #3 also only prevents multiple instances per machine, not necessarily by
    user. Of course
    most people don't have multiple machines. The point is that you may be
    trying to
    prevent your users from sharing logins. In which case the file thing won't
    do it.
    Some other ideas:
    1. You could, however, enforce one application per machine using the
    installed partition agent's ExecutingPartition instrument name. As long as
    the user doesn't run the app in a different environment, you can have the
    app check at startup time if there is another
    ActivePartition running under the same InstalledPartition name.
    (ActivePartitions are child agents
    of InstalledPartitions).
    2. use the ObjectLocationManager and bind a simple object into the naming
    system using a naming scheme such as
    /MyApplication/MyNode or
    /MyApplication/MyUserId
    the presence of either one would indicate that another instance of that
    application is running on either that machine or that user. Of course
    these have to be cleaned out, and subject to similar downside as
    alternative #1. So you'd essentially be using the forte naming system as a
    distributed lock manager (ouch).
    3. Have the application remove the shortcut to launch it upon startup, and
    recreate it when it is finished, or move it to a hidden place. There it
    is - the worst idea I've ever come up with. Don't
    do this!
    Regards,
    John
    From: Curtis Bragdon <[email protected]>
    Date: Wed, 18 Feb 1998 16:36:58 -0500
    Subject: Re: How do I keep an application from being started more than
    once?
    Here are some quick ideas. None of them should be too hard to implement,
    although each has some drawbacks.
    1. Have a login server track who is logged on, and if there is already a
    logon for a given user or a given machine, then deny the application
    startup. The nice thing about this is that a user will not be able to have
    multiple logins even by going to another machine. Then again, this may not
    be so nice, and you also get a possible single point of failure on the
    login server for which you will have to prepare.
    2. Drop to the operating system, and get a list of processes for the client
    machine. If the name of one of them matches the name of application that
    is being run, then deny startup. This avoids a network hit, but requires
    some OS specific code. Also, a clever user could change the name of an
    executable to get around this. Note that a user could have another login
    on another machine.
    3. Write to a file on the local machine. You can hide the file in some
    suitable place, and can also scramble some information so that a user
    cannot get around having this file present by reading from the file at
    startup and then writing to it. Based on the state of your application,
    the file will have some scrambled information indicating if an instance of
    an application can be started. If you retain the write lock (i.e. do not
    close) the file for the duration of the application, you increase your
    security at the risk of a confused user if the application gets terminated
    without releasing the lock. Depending on the OS where the client will run,
    this could be an issue. If you like this option, perform some experiments
    first on all configurations of an example client machine to determine the
    behavior. Again, this only works to prevent an extra login on a single
    machine, not system wide.
    If you are not concerned about your users hacking around too much and don't
    care about a login on another machine, I would opt for some version of
    number 3. Otherwise, I would venture number 1.
    Regards
    CSB
    At 07:47 AM 2/18/98 -0500, Martin G Nystrom wrote:
    A user can launch an application, then launch it again. How do we make itso
    that the user can only run one instance of the application?
    Martin Nystrom
    Eli Lilly and Company
    ([email protected])
    Curtis Bragdon, Senior Consultant, Forte Software
    [email protected]
    Voice Mail: (510) 986-3807
    Paging: (888) 687-6723
    "I've seen dozens of triggering towns." - Richard Hugo
    John Jamison
    Vice President of Technology
    Sage IT Partners, Inc.
    415 392 7243 x 306
    [email protected]

  • I have ipad 1st generation. How can I remove featured videos from you tube app?

    I have ipad 1st generation. How can I remove featured videos from you tube app?

    Start by providing some relevant information if you need troubleshooting help. We have no idea how or what you are doing whatever it is that you are doing.

  • HT4437 How do you stream live tv from an abc app from my iPad 4 retina to my tv using Apple TV?

    How do you stream live tv from an abc app from my iPad 4 retina to my tv using Apple TV?

    you use airplay mirror
    if that does not work then it's because the app block the feature
    how you turn on airplay mirror
    http://support.apple.com/kb/ht5209

  • How do I download an app from the Mac App Store but not install it yet?

    How do I download an app from the Mac App Store but not install it yet?
    Can I simply download it and not install?
    What if the App gets updated before I download it?
    Why? Well, I am very busy and wish to install at my leisure even though I have purchased the App (required at a specific day in the month in order to appear on my business accounts).
    Thanks.

    There is a difference in what Kappy stated and what you stated. A major paid upgrade (v2.x to v3.0), yes, costs money, as it would in any other delivery stream. Updates (v3.0 to v3.1) to a a major version are free.
    Most apps sold through the Mac App Store (MAS) are the type that use the simple drag & drop installation. Those are downloaded directly to the designated apps folder and installation is done. Large pro-type apps download an installer to your Apps folder. Those you can install at your leisure. The MAS does not have a lot of apps using this type of installation.
    Be sure to always backup your MAS purchases, because there is no guarantee that the app will always be available for download in the future and it is your responsibility to archive copies.

Maybe you are looking for

  • Kernel Panic when watching videos (and other random times)?

    Hi all, I've been having a lot of trouble with kernel panics and I'm hoping someone can point me in the right direction for fixing this. I'm aware of the Airport issue mentioned on these forums (and have tried the kext fix for that without any luck).

  • Xsan 2 MDC server restart hangs

    Xsan 2 MDC server restart/shutdown hangs and I am forced to do a manual shutdown everytime. Here is the log when trying to do a restart or shutdown 10/16/08 2:58:43 PM loginwindow[58] ERROR | -[ApplicationManager(AppleEventHandling) _tryQuitAllForReq

  • Can't move/select diagonal guides when zoomed in 600%

    Hi there, I'm working on a few objects I have to divide using diagonal guides. However, when I try to select one of them above 600% zoom, I'm not able to activate them using the selection tool or the direct selection tool. I can select them using the

  • Input List of values in Query panel

    Hi , Problem statement :: Develop a page which should have Query panel and table . Query panel should have 2 fields and on the basis of these input values underlined table should display the values. These 2 fields should be inputListOfValues( Input f

  • How to check if internal table exists in dynamical called subroutine ?

    Hi, in a dynamically called subroutine i'm using a internal table, but in some calls this table is not exist. How can i check in the code whether the internal table exist or not ? regards, Hans