Request for cookbook on Mobile SERVICE Application

Hi,
I've been trying to get some technical docs for Mobile SERVICE, but I couldn't. I'm new to Mobile Service CRM, and have just started to support CRM mobile client SERVICE application. I have downloaded some related documents from SAP, but if you have some useful documents  would helpful to me, could you please send them to me?
Email: [email protected]
Thanks a lot,
Regards
Krishna

Hi Krishna,
I dont have a cookbook, but have you referred to the SAP Online help.
help.sap.com
You can find some useful info there.
Also, what specific area of Service do you require help with? We may be able to help out.
Regards,
Gervase

Similar Messages

  • How to find ContentDb Name for any of the service application (e.g. User profile , Managed metadata , etc) programmatically in a farm ?

    Hi,
    I have a application where i need to display Name for all the service application. Specifically i need to get the size of user profile service application and Managed metadata service application name.
    Please guide me. :)
    Thanks and Regards:
    Sanjay

    You can use 
    http://blogs.technet.com/b/tothesharepoint/archive/2011/12/19/find-active-databases-used-by-sharepoint-server-2010.aspx
    Get-SPDatabase | Sort-Object disksizerequired -desc | Format-Table Name”
    http://webcache.googleusercontent.com/search?q=cache:kMHQXNGmjcwJ:sharepointstruggle.blogspot.com/2011/08/programmatically-enumerating-databases.html+&cd=1&hl=en&ct=clnk&gl=in
    using(SPSitesite
    = newSPSite(url))
    using(SPWebweb
    = site.OpenWeb())
    SPFarmf
    = site.WebApplication.Farm;
    foreach(SPDatabaseServices
    inf.Services.OfType<SPDatabaseService>())
    Console.WriteLine(string.Format("Found
    Database service {0} of type {1}",
    s.Name, s.GetType().Name));
    foreach(SPDatabaseServiceInstancespdsi
    ins.Instances)
    Console.WriteLine(string.Format("|-Found
    Database Service Instance {0} ({1})",
    spdsi.DisplayName, spdsi.Name));
    foreach(SPDatabasespdb
    inspdsi.Databases)
    Console.WriteLine(
    string.Format("  |-DB: {0}\r\n    |-TYPE: {1}\r\n   
    |-HOST: {2} ",
    spdb.Name.Length
    > 70? spdb.Name.Substring(0,
    65)
    + "...": spdb.Name,
    spdb.GetType().Name, spdb.Server.Name)
    http://social.msdn.microsoft.com/Forums/en-US/61e4e56e-e373-4167-ba97-e0f411feefe9/how-can-we-programmatically-find-the-names-of-sharepoint-databases

  • Request for New Features in Adobe Application Manager

    Creative Cloud has been around for a year now and Adobe Application Manager has been the tool to update and download new apps. AAM works fine but, it's so minimal, ever since then I've been waiting for Adobe to release a more useful version.
    Here are some essential features that would make Adobe Application Manager more useful...
    - Make the AAM window resizeable. If a window contains a long list of items why would it be locked at a short height? Just let the user expand the window as large as they like to view all items.
    - Show the version numbers next to the application titles. User should be able to see the version of the available update as well as the version currently installed on user's computer.
    - Show the available app's download size in MB. And, while downloading show the MB progress/totals not just a percentage.
    - Allow user to pause downloads.
    - Show a short description of the application under each title. Or, at least make a link to the application's webpage.
    - Add an Uninstall option for user's existing apps.
    I currently have Version 7.0.0.324 of Adobe Application Manager. Please let me know if there is some other more advanced version of AAM or if I'm overlooking some existing features.
    Thanks.  Den.

    Hi dendowling
    Thanks for showing your interest in Adobe Products ...I appreciate your findings in AAM...
    You can Raise Feature Request on below link : https://www.adobe.com/cfusion/mmform/index.cfm?name=wishform

  • How can I fix an annoying repeating request for "login" keychain by multiple applications like Safari and AddressBookSourceSink.

    This issue arose after upgrading to snow leopard and ultimately to Mavericks.  I took my Mac into a Genius Bar to have them look at this issue.  We attempted to change the Keychain Password which failed to change the local items password.  As a fix we changed the administrator password then changed the keychain.  This appeared to be the fix however my Mac was never connected to the Internet while at the Genius Bar.  Upon returning home and reconnecting to the Wifi the popups began again. 

    Back up all data.
    Launch the Keychain Access application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Keychain Access in the icon grid.
    Select the login keychain from the list on the left side of the Keychain Access window. If your default keychain has a different name, select that.
    If the lock icon in the top left corner of the window shows that the keychain is locked, click to unlock it. You'll be prompted for the keychain password, which is the same as your login password, unless you've changed it.
    Right-click or control-click the login entry in the list. From the menu that pops up, select Change Settings for Keychain "login". In the sheet that opens, uncheck both boxes, if not already unchecked.
    From the menu bar, select
    Keychain Access ▹ Preferences ▹ First Aid
    If the box marked Keep login keychain unlocked is not checked, check it.
    Select
    Keychain Access ▹ Keychain First Aid
    from the menu bar and repair the keychain. Quit Keychain Access.

  • Request for cookbook to setup ERP B2B shop

    Hi Gurus,
        I am new to the E-commerce B2B application.  My Basis installed SAP E-commerce B2B application.  Now I have to configure the application to my client requirements.  Does any one has configuration document for B2B shop for ERP, we are not using the CRM.  Could you please provide me the document or steps to follow to setup B2B and B2C shop.  Thank you very much in advance.
    With Regards,
    Sudheer

    Go to [SAP Best Practices|https://websmp206.sap-ag.de/bestpractices] and click the Cross-Industry Practices -> E-Commerce link in the left navbar and follow the instructions on where to find the Best Practices for E-Commerce for ERP
    Also, you should search for Dev and Extention Guide, but I'm not sure they have one for ERP (we use CRM, so I've not looked for it)

  • Request for cookbook for internet sales and CRM middleware

    Hi
    can anybody send cookbook for internet sales and CRM middleware. Your response will be rewarded.
    please send to : [email protected]
    thanks and regards
    bhaskar

    Hi Bhaskar,
    I have sent you the required docs for Middlware and Internet Sales.
    <b>Reward points if it helps.</b>
    How to give points: Mark your thread as a question while creating it. In the answers you get, you can assign the points by clicking on the stars to the left.

  • Problem with Request for Permissions (mobile app)

    In my application I want to publish the results of the games on facebook. I used this tutorial: http://www.adobe.com/devnet/facebook/articles/flex_fbgraph_pt1.html
    Here is a fragment of my source code:
    <fx:Script>
            <![CDATA[
                import com.facebook.graph.FacebookMobile;
                import mx.events.Request;
                import valueObjects.GlobalVariables;
                protected var extendedPermissions:Array = ["publish_stream","user_website","user_status","user_about_me"];
               protected function initApp():void
                    FacebookMobile.init("app ID",loginHandler);
                protected function loginHandler(success:Object,fail:Object):void
                    if(success){   
                        currentState="loggedin";
                        nameLbl.text=success.user.name;
                        userImg.source=FacebookMobile.getImageUrl(success.uid,"small");
                        birthdayLbl.text=success.user.birthday;
                        FacebookMobile.api("/me/statuses",getStatusHandler);
                    else{   
                        this.login();
                protected function login():void
                    FacebookMobile.login(loginHandler, stage, []);
                protected function logout():void
                    FacebookMobile.logout();
                    currentState="loggedout";
                protected function getStatusHandler(result:Object, fail:Object):void
                    statusLbl.text=result[0].message;
                protected function submitPost():void
                    FacebookMobile.api("/me/feed",submitPostHandler,{message:GlobalVariables.d.toString()}, "POST");
                protected function submitPostHandler(result:Object,fail:Object):void
                    FacebookMobile.api("/me/statuses",getStatusHandler);
            ]]>
        </fx:Script>
    I have problem with permissions. After login I see a white screen instead of request for permission.  The desktop application does not have a problem with it. When I log for the first time to the desktop application and I will give the permissions applications, then in the mobile application everything works fine. But this is not a good solution. And so please help.

    The labelField of IconItemRenderer only supports single line text.  Try using the messageField instead:
    <s:List width="200" height="200">
        <s:dataProvider>
            <s:ArrayList>
                <s:DataItem desc="1 Hello World Hello World Hello World" />
                <s:DataItem desc="2 Hello World Hello World Hello World" />
                <s:DataItem desc="3 Hello World Hello World Hello World" />
            </s:ArrayList>
        </s:dataProvider>
        <s:itemRenderer>
            <fx:Component>
                <s:IconItemRenderer labelField="" messageField="desc">
                </s:IconItemRenderer>
            </fx:Component>
        </s:itemRenderer>
    </s:List>
    If you need more control you might need to subclass, this post might help: http://flexponential.com/2011/08/21/adding-multiline-text-support-to-labelitemrenderer/

  • Difference between Mobile sales and Mobile Service

    Hi All
    Can anybody help and explain me what are the major defferences between Mobile Sales and Mobile Service,What are the configuration settings required in Mobile Service,Because we have to start support project for Mobile Service.
    Regards
    Krishna

    Hi Krishna,
    The difference is Mobile Service is used by field technicians who provide a service to customers. Eg: an engineer who goes out to customer site to fix machinery. They can fill out the deatils on the Mobile Service application. Time spent, parts used etc..
    Sales is used by sales reps, who are selling a product.
    The configuration is the same for both. In fact its possible to have bothe sales and service installed on the same machine.
    Regards,
    Gervase

  • Cannot change GroupWise User Name in GW Mobility Service 2.0

    Hi,
    In GW Mobility Service 2.0 I can no longer change the "GroupWise User Name" value, which I need for the the address book selection. I need to change it, because we use AD authentication. This sets the username value to CNAME, which is different from our logon names (sAMAccountName). I can only change the "Mobility User Name""now. In 1.2.5.299, I was able to change it.
    As a result, I'm unable to add new users to the system. Anyone know how to fix this?
    Iwan

    Originally Posted by dzanre
    iwan wrote:
    > I don't add users via the web interface. I add them to an AD user group, at
    > which point they are automatically added to the system. Once they are added, I
    > change the name and sync them. I've added over 100 users like this in the
    > previous version. I don't know why it does not work anymore. It does allow me
    > to change the "Mobility User Name".
    This has actually long been an issue, and I had failures even with 1.2.5. I
    think you got lucky. This is a known problem with using LDAP groups for adding
    users.
    Also, you say that you were using AD groups, and this is definitely not
    supported. eDirectory is the only supported LDAP server for Mobility and that
    has always been the case.
    So, I'm afraid that if this was working before, it was totally by accident.
    Danita
    Novell Knowledge Partner
    GroupWise Mobility Service 2.0 Guide - Caledonia Guide to the GroupWise Mobility Service 2.0
    If you find this post helpful and are logged into the web interface,
    show your appreciation and click on the star below...
    Hi,
    I'm sorry to hear that. I've been using it with AD as an LDAP source for quite some time without any issues. I still use it for authentication to the web interface itself. It would still work if I could just modify the "GroupWise User Name", like I could in the previous version. It doesn't seem logical to allow changing the "Mobility User Name" and not the "GroupWise User Name".
    I am adding users through the web interface now and abandoned adding them via the LDAP group option (still use AD auth on the devices). I don't want to use eDir as I'm trying to move away from it. Every system within our company authenticates using AD. I only have eDir for GroupWise and with the next version of GW coming up and fully supporting AD, I can finally go to a single Directory.
    When I migrate to GW 2014, will I be able to select GroupWise for authentication in Mobility Service and have the POA use AD authentication? Effectively giving Mobility Service AD authentication through GW? If so, the only thing that would not work is adding users via a group (if eDir is not used anymore).
    Iwan

  • Creating web service application in JDeveloper 11.1.2

    Hi all,
    I had use the JDeveloper 11.1.2 . And i want create a new web service application using the JDeveloper 11.1.2. Please give some steps and document for creating the web service application .
    Also give some steps for accessing the web service application from j2ee 1.4 application using JDeveloper 11.1.2.
    thanks
    Prabu

    Hi all,
    i had installed the J2ee 1.4 application in oracle apps 11i (Linux server). I had executing the web service process in Linux server and its working fine.
    And i need to call the web service from externally. I.e Web service code is executed in Linux server. I need to call the web service from Jdeveloper .
    Please give steps and document screen shots for invoking the web service application from the External java application(i.e jdevloper).
    Please help,
    Thanks
    Prabu

  • Survey suite in Mobile service

    Hi,
      Please help if  survey suite is part of mobile service, also send me the links to this
    - Thanks

    Hello,
    As far I know , you should be able to use survey in your mobile service application.
    Is there any problem using surveys in mobile service application?
    Best Regards,
    Shanthala Kudva.

  • Backup ALL Service Applications thru Backup-SPFarm

    I am using the following command to backup ALL service applications:
    Backup-SPFarm -Directory <BackupFolder> -BackupMethod {Full | Differential} -Item "Farm\Shared Service Applications" [-Verbose]
    This is from an msdn article here ...
    http://msdn.microsoft.com/en-us/library/ee748601.aspx
    It is throwing an error for the "Farm\Shared Service Applications" saying that it is not found.  How do I figure out what I have to put in here to make this command work?
    Thanks. 

    Based on the example mentioned in the msdn article you have typed in the same thing farm\shared service application
    That is an example. You need to specify your service application name -> for example it may be "ManagedMetadataServiceApplication"
    Try that and see how you go.
    Alpesh Nakar's Blog
    Alpesh
    Just SharePoint Just SharePoint Updates
    SharePoint Saturday India Online
    Nov 20 2010 Contributing Author
    SharePoint 2010 Unleashed
    MCTS: SharePoint 2010 Configuration
    MCITP: SharePoint 2010 Administrator

  • How to Use Mobile Service in HTML/JavaScript Application

    The Windows Azure Mobile Service is a back end tool for mobile applications. It supports various platforms, such as Windows Store, Windows Phone 8, iOS and Android. The Windows Azure
    Mobile service can also support HTML/JavaScript. This article helps you to get a basic idea of how to use the Windows Azure Mobile Service in HTML/JavaScript applications.
    Let us start with a Quick startup project provided by Microsoft. A Quick startup is a simple demo project that can help us to understand how to use the Windows Azure Mobile Service with HTML/JavaScript. So let's start from the Quick startup project.
    Login into in the Windows Azure portal and use the following procedure.
    This article assumes you already have a Windows Azure account and the mobile service is enabled in your account.
    1. Create a new Windows Azure Mobile Service
    Click on the +New button from the left corner and select Compute -> Mobile Service and then click on the "Create" button.
    The Windows Azure portal popup creates a mobile service wizard when you click the Create button. Windows Azure asks you to enter the mobile service name as shown in the following image:
    Select the database options and region for your mobile service and click on the "Next" button.
    Once your mobile service is successfully created, the portal will show all your mobile services as shown in the following images.
    Ok! We have created a new mobile service successfully. Let's move to our subsequent steps.
    1. Quick startup Project 
    As we all know, the Windows Azure Mobile Service can support many platforms such as Windows Store, Windows Phone 8, iOS, Android and HTML/JavaScript. This article only tells us about the new HTML/JavaScript platform that is recently added to the Windows Azure
    Mobile Service.
    In the image above, we are in the quick startup page where the Windows Azure Mobile Service allows the user to choose their platform. I have selected the HTML/JavaScript Platform.
    In the image above, we found 3 quick steps that can allow us to run <g class="gr_ gr_74 gr-alert gr_gramm Grammar" data-gr-id="74" id="74">a HTML/JavaScript</g> sample project. 
    1. Create Table: In this step the user needs to create a table that can used by the sample project, once you hit the create TodoItem Table button. The Portal will create a TodoItem table in your mobile service. You
    can check this table by clicking on the data tab(menu).
    2. Download and run your app: In this step the user needs to download the Quick startup project that is provided by the Windows Azure portal. Click on the "Download" button and download the project. You will
    see the following files in the quick startup project.
    The Server folder contains some files to setup this project locally. The user should run the file from the server folder corresponding to their OS. I am using Windows OS so I ran the <g class="gr_ gr_80 gr-alert gr_spell ContextualSpelling ins-del multiReplace"
    data-gr-id="80" id="80">lanch</g>-<g class="gr_ gr_79 gr-alert gr_spell ContextualSpelling ins-del multiReplace" data-gr-id="79" id="79">windwos</g> file to setup this project locally in
    IISExpress.
    Press r and enter the key, you will see IISExpress started. Do not close this Windows and open your browser and request the http://localhost:8000/ page.
    Enter the Item name and click on the add button. Your Item will be added to the TodoItem table.
    3. Configure your host name: This step is a very important step for any HTML/JavaScript application that uses the Windows Azure Mobile Service. In this <g class="gr_ gr_83 gr-alert gr_gramm Punctuation only-ins
    replaceWithoutSep" data-gr-id="83" id="83">step</g> the user must register their website name in the Cross-origin resource sharing (CORS). By default, "localhost" is added by the Windows Azure Mobile Service
    so your quick startup project can run without making any CORS setting changes. The user can add their website domain name by clicking on the configure tab (menu).
    The user can add as many website domain names as needed.

    are you asking a question or did you just post a tutorial here? you might want to post it as a blog post or wiki entry instead.

  • Feedback request for a Single Instance Application Implementation

    Hello,
    I have been working on a class which I tried to make the most generic I could so that I could re-use it for various projects. It offers 2 main functionalities:
    -Preventing multiple instances of an application
    -Allowing a user to stop the application even if it doesn't read any user input
    Of course if someone wants to have multiple instances of the same application, it is still possible. The only requirement is that each instance be configured to run on a different port.
    I would like your feedback on how I've implemented this to make sure I haven't missed the chance to make my Class flexible and re-usable. I would also make sure that there aren't any situations where the different threads used for realizing this functionality will run into any conflicts.
    My code includes the following files:
    Serviceable.java : An interface which must be implemented by every application using these classes
    DuplicateServiceException.java : An exception thrown when an instance of the application is already running
    Service.java : The class responsible for offering the functionalities I already mentionned
    Main.java : An example of a class implementing Serviceable and offering two ways of closing the Application. 1- By closing the JFrame which is displayed. 2- By sending the stop command.
    In order to execute this example, you have to specify the following command line arguments:
    -DService.Command={start/stop} //Either start or stop command
    -DService.Port=<0-65535> //Port to be used for receiving the stop command and preventing multiple instances
    Serviceable.java
    * Serviceable cares about two parts of the life of a Service.  Its startup
    * and its shutdown sequences.  The startup occurs only after making sure
    * no other instance of the Service is running.  Shutdown has to be
    * synchronized between multiple threads since it is possible to shutdown
    * the service through a shutdown command sent by another process, or through
    * the normal flow of execution of the service.
    * @author Gabriel Aubut-Lussier
    public interface Serviceable {
          * Initiates the startup of the Service since we have made sure
          * that there isn't any other instance of the Service running.
         public void startup();
          * Initiates the shutdown of the Service since we've received
          * a shutdown request from one of the two supported means of
          * shutting down.
         public void shutdown();
    DuplicateServiceException.java
    public class DuplicateServiceException extends Exception {
          * serialVersionUID?  Bah. Eclipse generates one automatically so why not...
         private static final long serialVersionUID = 3929576386522489749L;
         public DuplicateServiceException() {
              super();
         public DuplicateServiceException(String msg) {
              super(msg);
    Service.java
    * The same way a graphical application is running as long as there
    * is something to display, a background service will run as long as
    * there is an active Thread.
    * A service can be terminated in different ways.  First of all, it
    * can be terminated through its normal flow of execution.  On the
    * other hand, it is possible to provoke the termination of a Service
    * externally.
    * To terminate the service through the normal flow, just call the
    * Service.shutdown() method.  Another way to terminate the service
    * is to start a new instance of the program with the Stop command.
    * This Service implementation will behave according to two system
    * properties.  The property Service.Command can be set
    * to "start" or "stop".  When set to "start", the Service will make
    * sure there isn't another instance of the service already running.
    * If it is the case, a DuplicateServiceException will be thrown.  In
    * the other case, the Service will start.  When the "stop" command
    * is invoked, the Service will attempt to stop a running instance of
    * the Service.  The other property is Service.Port and
    * it defines the Port number which will be used to support the
    * functionalities offered by the Service class.
    * It is recommended to set these properties as command line arguments
    * when launching the application.  Moreover, batch files or shell
    * scripts can be created for invoking the start and stop commands.
    * @author Gabriel Aubut-Lussier
    public class Service implements Runnable {
         public final static String START_COMMAND = "start";
         public final static String STOP_COMMAND = "stop";
         public final static String SERVICE_COMMAND = "Service.Command";
         public final static String SERVICE_PORT = "Service.Port";
         private String serviceCommand;
         private int servicePort;
         private Serviceable service;
         private ServerSocket serviceListener;
         private Thread serviceThread;
          * Creates a new service registering the hooks required to perform
          * clean termination sequences.
          * @param s
          * @throws DuplicateServiceException
         public Service(Serviceable s) throws DuplicateServiceException {
              service = s;
              serviceCommand = System.getProperty(SERVICE_COMMAND);
              String servicePortString = System.getProperty(SERVICE_PORT);
              if(servicePortString == null)
                   servicePort = -1;
              else
                   servicePort = Integer.parseInt(servicePortString);
          * Try running this new Service instance if there isn't one
          * already running.
          * @throws DuplicateServiceException if another service instance is already running.
         public void start() throws DuplicateServiceException {
              if(serviceCommand == null || servicePort < 0) {
                   throw new IllegalArgumentException("The command and port number must be specified.");
              if(serviceCommand.equals(START_COMMAND)) {
                   try {
                        serviceListener = new ServerSocket(servicePort);
                        serviceThread = new Thread(this);
                        serviceThread.start();
                        service.startup();
                   } catch(BindException e) {
                        throw new DuplicateServiceException("An instance of the service is already running.");
                   }catch(IOException e) {
                        e.printStackTrace();
              } else if(serviceCommand.equals(STOP_COMMAND)) {
                   shutdown();
          * Provoke a shutdown command.
         public void shutdown() {
              try {
                   Socket sock = new Socket("localhost", servicePort);
                   OutputStreamWriter out = new OutputStreamWriter(sock.getOutputStream());
                   out.write("shutdown");
                   out.flush();
                   out.close();
                   sock.close();
              } catch (UnknownHostException e) {
                   e.printStackTrace();
              } catch (IOException e) {
                   //This exception may occur when trying to stop a service which wasn't running.
                   //There is no need to do anything in this case.
          * While the Service is running, it listens on a port to make sure no
          * other instance of this Service is started and to listen to shutdown
          * commands.
         public void run() {
              boolean keepGoing = true;
              while(keepGoing) {
                   try {
                        Socket sock = serviceListener.accept();
                        InputStreamReader in = new InputStreamReader(sock.getInputStream());
                        char cBuf[] = new char[256];
                        int amount = in.read(cBuf);
                        in.close();
                        sock.close();
                        keepGoing = !((new String(cBuf, 0, amount)).equals("shutdown"));
                   } catch (IOException e) {
                        e.printStackTrace();
              try {
                   service.shutdown();
                   serviceListener.close();
              } catch(IOException e) {
                   e.printStackTrace();
         public String getServiceCommand() {
              return serviceCommand;
         public void setServiceCommand(String serviceCommand) {
              this.serviceCommand = serviceCommand;
         public int getServicePort() {
              return servicePort;
         public void setServicePort(int servicePort) {
              this.servicePort = servicePort;
    Main.java
    import java.awt.event.WindowAdapter;
    import java.awt.event.WindowEvent;
    import javax.swing.JFrame;
    public class Main implements Serviceable {
         private JFrame window;
         private Service service;
         public static void main(String[] args) {
              new Main();
         public Main() {
              try {
                   service = new Service(this);
                   service.start();
              } catch(DuplicateServiceException e) {
                   e.printStackTrace();
         public void startup() {
              window = new JFrame("SERVICE TEST! :D");
              window.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
              window.addWindowListener(new WindowAdapter() {
                   public void windowClosed(WindowEvent e) {
                        service.shutdown();
              window.setVisible(true);
         public void shutdown() {
              System.out.println("Application shutdown");
              window.dispose();
    }Thanks in advance for your feedback.
    -Gabriel Aubut-Lussier

    I have fixed the handshake.
    And even though it isn't implemented yet, I think I have my solution for the limitation of 1 instance per user. I plan on using a hidden file in the user's home directory in which I will write the port number where the running application is listening for events. I have not yet chosen how the port number will be chosen before being written to the file but I am thinking about using a random number between 1024 and 65535. Using this approach, it is possible to maintain all the features I've implemented in the Single Overall Instance solution I already have.
    Here is the code with the handshake fixed:
    Serviceable.java
    * Serviceable cares about two parts of the life of a Service.  Its startup
    * and its shutdown sequences.  The startup occurs only after making sure
    * no other instance of the Service is running.  Shutdown has to be
    * synchronized between multiple threads since it is possible to shutdown
    * the service through a shutdown command sent by another process, or through
    * the normal flow of execution of the service.  Moreover, when another instance
    * is prevented from being launched, the running instance is notified so that it
    * can react to such an event.
    * @author Gabriel Aubut-Lussier
    public interface Serviceable {
          * Initiates the startup of the Service since we have made sure
          * that there isn't any other instance of the Service running.
         public void startup();
          * Notifies the Service that the application has been invoked again in
          * case the running instance wants to react to such an event.  Most GUI
          * applications will just bring themselves to the front while background
          * services will maybe just want to re-scan their configuration files or
          * just ignore the event.
         public void invoke();
          * Initiates the shutdown of the Service since we've received
          * a shutdown request from one of the two supported means of
          * shutting down.
         public void shutdown();
    DuplicateInstanceException.java
    public class DuplicateServiceException extends Exception {
          * serialVersionUID?  Bah. Eclipse generates one automatically so why not...
         private static final long serialVersionUID = 3929576386522489749L;
         public DuplicateServiceException() {
              super();
         public DuplicateServiceException(String msg) {
              super(msg);
    Service.java
    import java.io.IOException;
    import java.io.InputStreamReader;
    import java.io.OutputStreamWriter;
    import java.net.BindException;
    import java.net.ServerSocket;
    import java.net.Socket;
    import java.net.UnknownHostException;
    * The same way a graphical application is running as long as there
    * is something to display, a background service will run as long as
    * there is an active Thread.
    * A service can be terminated in different ways.  First of all, it
    * can be terminated through its normal flow of execution.  On the
    * other hand, it is possible to provoke the termination of a Service
    * externally.
    * To terminate the service through the normal flow, just call the
    * Service.shutdown() method.  Another way to terminate the service
    * is to start a new instance of the program with the Stop command.
    * This Service implementation will behave according to two system
    * properties.  The property Service.Command can be set to "start"
    * or "stop".  When set to "start", the Service will make sure there
    * isn't another instance of the service already running.  If it is
    * the case, a DuplicateServiceException will be thrown.  In the
    * other case, the Service will start.  When the "stop" command is
    * invoked, the Service will attempt to stop a running instance of
    * the Service.  The other property is Service.Port and it defines
    * the Port number which will be used to support the functionalities
    * offered by the Service class.
    * It is recommended to set these properties as command line arguments
    * when launching the application.  Moreover, batch files or shell
    * scripts can be created for invoking the start and stop commands.
    * @author Gabriel Aubut-Lussier
    public class Service implements Runnable {
         public final static String START_COMMAND = "start";
         public final static String STOP_COMMAND = "stop";
         public final static String SERVICE_COMMAND = "Service.Command";
         public final static String SERVICE_PORT = "Service.Port";
         private final static String GREETING = "Greetings";
         private final static String QUERY = "?";
         private final static String ACCEPT = "yes";
         private final static String DECLINE = "no";
         private final static String SHUTDOWN = "shutdown ";
         private final static int SO_TIMEOUT = 100;
          * This is the application-specific String
         private String serviceClass;
          * This is the command which we will execute when start() is invoked
          * The value is either "start" or "stop"
          * This value can be configured using the System property: Service.Command
         private String serviceCommand;
          * This is the port which is used to watch for duplicate instances
          * This value can be configured using the System property: Service.Port
         private int servicePort;
         private Serviceable service;
         private ServerSocket serviceListener;
         private Thread serviceThread;
          * Creates a new service registering the hooks required to perform
          * clean termination sequences.
          * @param s A Serviceable class
          * @throws DuplicateServiceException If there is a duplicate instance running
         public Service(Serviceable s) throws DuplicateServiceException {
              service = s;
              serviceClass = s.getClass().toString();
              serviceCommand = System.getProperty(SERVICE_COMMAND);
              String servicePortString = System.getProperty(SERVICE_PORT);
              if(servicePortString == null)
                   servicePort = -1;
              else
                   servicePort = Integer.parseInt(servicePortString);
          * Try running this new Service instance if there isn't one
          * already running.
          * @throws DuplicateServiceException if another service instance is already running.
          * @throws BindException if another application is using the configured port.
         public void start() throws DuplicateServiceException, BindException {
              if(serviceCommand == null || servicePort < 0 || servicePort > 65535) {
                   throw new IllegalArgumentException("The command and port number must be specified.");
              if(serviceCommand.equals(START_COMMAND)) {
                   try {
                        serviceListener = new ServerSocket(servicePort);
                        serviceThread = new Thread(this);
                        serviceThread.start();
                        service.startup();
                   } catch(BindException e) {
                        queryOtherInstance();
                        throw e;
                   } catch(IOException e) {
                        e.printStackTrace();
              } else if(serviceCommand.equals(STOP_COMMAND)) {
                   shutdown();
          * Send the shutdown command to the running instance of the application.
         public boolean shutdown() {
              boolean shutdownSuccessful = false;
              try {
                   Socket sock = new Socket("localhost", servicePort);
                   sock.setSoTimeout(SO_TIMEOUT);
                   //If the greeting doesn't match, it's not a duplicate instance
                   //and we can't shut it down
                   InputStreamReader in = new InputStreamReader(sock.getInputStream());
                   OutputStreamWriter out;
                   if(receivedGreeting(in)) {
                        //Sending the shutdown command
                        out = new OutputStreamWriter(sock.getOutputStream());
                        out.write(SHUTDOWN + serviceClass);
                        out.flush();
                        //Read the confirmation
                        char cBuf[] = new char[1024];
                        int amount = in.read(cBuf);
                        String confirmation = new String(cBuf, 0, amount);
                        if(confirmation.equals(ACCEPT)) {
                             shutdownSuccessful = true;
                        out.close();
                   //Closing the connection
                   in.close();
                   sock.close();
              } catch (UnknownHostException e) {
                   //This exception shouldn't happen unless the loopback address doesn't exist?
              } catch (IOException e) {
                   //This exception may occur when trying to stop a service which wasn't running.
                   //There is no need to do anything in this case.
              return shutdownSuccessful;
          * Reads the greeting from the running instance we are interacting with.
          * @param in An InputStreamReader built on the Socket's InputStream
          * @return True if we received the expected greeting, false otherwise
          * @throws IOException if a problem occurs while receiving the greeting
         private boolean receivedGreeting(InputStreamReader in) throws IOException {
              //Reading the expected greeting from the server
              char cBuf[] = new char[1024];
              int amount = in.read(cBuf);
              String greeting = new String(cBuf, 0, amount);
              return greeting.equals(GREETING);
          * While the Service is running, it listens on a port to make sure no
          * other instance of this Service is started and to listen to shutdown
          * commands.
         public void run() {
              boolean keepGoing = true;
              while(keepGoing) {
                   Socket sock;
                   InputStreamReader in;
                   try {
                        sock = serviceListener.accept();
                        sock.setSoTimeout(SO_TIMEOUT);
                        //Sending a greeting
                        OutputStreamWriter out = new OutputStreamWriter(sock.getOutputStream());
                        out.write(GREETING);
                        out.flush();
                        //Reading the incoming message
                        in = new InputStreamReader(sock.getInputStream());
                        char cBuf[] = new char[1024];
                        int amount = in.read(cBuf);
                        String message = new String(cBuf, 0, amount);
                        //Writing an answer
                        boolean invoked = message.equals(serviceClass + QUERY);
                        if(invoked) {
                             out.write(ACCEPT);
                        } else {
                             out.write(DECLINE);
                             keepGoing = !message.equals(SHUTDOWN + serviceClass);
                        out.flush();
                        //Closing the connection
                        out.close();
                        in.close();
                        sock.close();
                        //Notify the running application is there has been an invocation
                        if(invoked) {
                             service.invoke();
                   } catch (IOException e) {
                        //Seems like an IO operation failed.  Let's just forget about
                        //this connection attempt and wait for another
              //Shutdown the Service
              service.shutdown();
              try {
                   serviceListener.close();
              } catch(IOException e) {
                   //Couldn't close the serverSocket upon shutdown?
                   //weird... but anyhow...
          * Connects to the configured port to check out wether it is a duplicate
          * instance of the application or if it is another application using the
          * same port number.  If it is another application, nothing will happen.
          * @throws DuplicateServiceException if it is a duplicate instance
         private void queryOtherInstance() throws DuplicateServiceException {
              try {
                   Socket sock = new Socket("localhost", servicePort);
                   sock.setSoTimeout(SO_TIMEOUT);
                   //Read greeting
                   InputStreamReader in = new InputStreamReader(sock.getInputStream());
                   String answer = null;
                   if(receivedGreeting(in)) {
                        //Writing the application-specific query
                        OutputStreamWriter out = new OutputStreamWriter(sock.getOutputStream());
                        out.write(service.getClass().toString() + "?");
                        out.flush();
                        //Reading the answer
                        char[] cBuf = new char[3];
                        int amount = in.read(cBuf);
                        answer = new String(cBuf, 0, amount);
                        out.close();
                   //Closing the connection
                   in.close();
                   sock.close();
                   //If the answer is "yes" then it is a duplicate
                   if(answer != null && answer.equals("yes")) {
                        throw new DuplicateServiceException("An instance of the service is already running.");
              } catch (UnknownHostException e) {
                   //This exception shouldn't happen unless the loopback address doesn't exist?
              } catch (IOException e) {
                   //If we fail to query the application appropriately we consider
                   //it isn't a duplicate entry so we do nothing.
         public String getServiceCommand() {
              return serviceCommand;
         public void setServiceCommand(String serviceCommand) {
              this.serviceCommand = serviceCommand;
         public int getServicePort() {
              return servicePort;
         public void setServicePort(int servicePort) {
              this.servicePort = servicePort;
    Main.java
    import java.awt.event.WindowAdapter;
    import java.awt.event.WindowEvent;
    import java.net.BindException;
    import javax.swing.JFrame;
    public class Main implements Serviceable {
         private JFrame window;
         private Service service;
         public static void main(String[] args) {
              new Main();
         public Main() {
              try {
                   service = new Service(this);
                   service.start();
              } catch(DuplicateServiceException e) {
                   e.printStackTrace();
              } catch(BindException e) {
                   e.printStackTrace();
         public void startup() {
              window = new JFrame("SERVICE TEST! :D");
              window.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
              window.addWindowListener(new WindowAdapter() {
                   public void windowClosed(WindowEvent e) {
                        service.shutdown();
              window.setVisible(true);
         public void shutdown() {
              System.out.println("Application shutdown");
              window.dispose();
         public void invoke() {
              System.out.println("Another instance tried to startup");
              window.toFront();
    }

  • Is one application pool preferred for all sharepoint service applications(

    is one application pool preferred for all SharePoint service applications ? 
    I have a three-tier architected SP 2013 small farm (NLT, 2 wfe, 1 app server, 1 db server). All services will be use (Secure Store,Service Application, Managed Metadata Service Application, Search Service Application,User Profile Service Application,App
    Management Service Application,Workflow Manager,Excel Service Application,BI Reporting Service Application,Power Pivot Service,Performance Point,Visio Services,BCS Service application)
    I am unclear on the following:
    which servers should host which service ? and why ?
    Is one application pool account preferred for all SP service Applications ? if not which service applications should be logically group ? and why ?

    Creating additional application pools requires more RAM memory.  About 100-150 MB per app pool.  But it also keeps things happening in one app pool from affecting another.  So normally you create additional app pools when you want to maintain
    higher service levels on one component versus another.  For example.  Let's assume that your service levels designate that you could survive a 3 hour outage of Search but that Managed metadata must be constantly available with minimal downtime.  Then
    you would put Search and MMS in separate App Pools.  Otherwise there is no real advantage to splitting them up.
    Services that are accessed directly by user request, like Search Query, Managed metadata, user profile should go on the Web Front ends.  Services that process heavier intermittent loads are normally placed on a dedicated application server to keep them
    from affecting overall performance, for example Excel Services.  But its more of an art form rather than a science and depends a lot on your performance needs, your hardware, and your usage.
    Paul Stork SharePoint Server MVP
    Principal Architect: Blue Chip Consulting Group
    Blog: http://dontpapanic.com/blog
    Twitter: Follow @pstork
    Please remember to mark your question as "answered" if this solves your problem.

Maybe you are looking for

  • Q10 buggy stuff with text entry making me sad

    I impulsively replaced my 9700 with a Q10 instead of the S4 i wanted, and now i regret it.  I am hoping these are just user errors as I want to love the Q10 and it's lovely keyboard. Two major issues: 1. Autofill -- how the heck do you turn off text

  • How to clear all details in iCal before syncing with Entourage?

    Deary me! I have been back and forth to iCal and Entourage trying to find which would be best. I have decided that Entourage will suffice - although not perfect by any means. In the meantime I have completely jammed up my iCal and daren't not try syn

  • Removing mailbox/folder in "Mail"

    Hi there, I've started using "mail" and I've added my 3 e-mail account, which appear under "inbox" but all my gmail appers again, under "gmail" I want to delete the Gmail folder but it wont let me, I get a message "the mailbox "(gmail)" could not be

  • Implementing Web Services as Transport Protocol in B2B and Healthcare

    Hi B2B Gurus, I am unable to implement web service transport in B2B and Healthcare, I am getting few issues. I fallowed below link. http://docs.oracle.com/cd/E28280_01/user.1111/e10229/bb_partner_webservice.htm#BABIIEJJ Can any one explain how exactl

  • Upgrade to Camera Raw 8.3

    I have just purchased a Nikon D610 and am now unable to load my RAW images into Photoshop Elements 12.  I believe I need to upgrade to Camera Raw 8.3 (I currently have version 8.0), but I can not see anywhere how I can download this upgrade and how t