4 Replies Latest reply on Jul 3, 2009 10:12 AM by 807574

    How can I do to install a domain like wndows service in JCAPS 6.0?

    807574
      I'm using JCAPS 6.0 and to start the domain I have to invoke eveytime:
      $ asadmin start-domain --user admin domain1
      Is possible create a windows service that permit to call this procedure directly?
        • 1. Re: How can I do to install a domain like wndows service in JCAPS 6.0?
          807574
          http://wiki.glassfish.java.net/Wiki.jsp?page=FaqRunAsWindowsService

          Regards,
          Peter
          • 2. Re: How can I do to install a domain like wndows service in JCAPS 6.0?
            807574
            Thanks for your help but i don't find the directory C:\Program Files\Sun\GlassfishV2\ where to install the jar file suggest in the solution. can you help me more?
            • 3. Re: How can I do to install a domain like wndows service in JCAPS 6.0?
              807574
              You have to substitute the Glassfish directory structure with the directory structure used in CAPS.. that is by default: c:\javacaps6\appserver.

              An alternative is to use the built in Service tool in Windows by creating a small bat/cmd file with contents similar to what is shown below:

              SETLOCAL
              SET I=C:\JavaCAPS6U1\appserver
              c:\windows\system32\sc.exe create domain4848 binPath= "%I%\lib\appservService.exe \"%I%\bin\asadmin.bat start-domain domain4848\" \"%I%\bin\asadmin.bat stop-domain domain4848\"" start= auto DisplayName= "CAPS6U1 domain4848"
              ENDLOCAL

              Again you have to substitute domain4848 to the name of your domain and the I environment variable to the directory used for your installation. Also make certain that the line commencing with "c:\windows..." ends with "DisplayName= "CAPS6U1 domain4848" - that is it should be *one* line in case you do copy/paste.

              Johan
              • 4. Re: How can I do to install a domain like wndows service in JCAPS 6.0?
                807574
                I've created a new domain with this command:
                $ asadmin create-domain adminport 18000 user admin dmRemineTest

                I've installed the serviceWindows with this script:
                SETLOCAL
                SET I=C:\Sun\SDK
                c:\windows\system32\sc.exe create JCAPS6U1_dmRemineTest binPath= "%I%\lib\appservService.exe \"%I%\bin\asadmin.bat start-domain dmRemineTest\" \"%I%\bin\asadmin.bat stop-domain dmRemineTest\"" start= auto DisplayName= "JCAPS6U1_dmRemineTest"
                pause
                ENDLOCAL

                like the one suggest me in this forum, and thanks for it but now i have an other problem. I've started the domain dmRemineTest and it is running:
                asadmin> list-domains
                dmRemineTest running
                domain1 not running
                Command list-domains executed successfully.

                I'm proving to access to eManager at link: http://intaliodevsrv:15000/eManager/Welcome.do
                inserting this informations required:

                Server Type: Sun Java System Application Server Domain (9.1)
                Host Name: localhost
                HTTP Administration Port: 18000
                User Name: admin
                Password: adminadmin

                I insert into HTTP Administration Port 18000 from here:
                <http-listener acceptor-threads="1" address="0.0.0.0" blocking-enabled="false" default-virtual-server="__asadmin" enabled="true" family="inet" id="admin-listener" port="18000" security-enabled="false" server-name="" xpowered-by="true"/>

                When I click on Connect to Server, eManager response with this message:
                Connection Failed. Please check the following:
                - Server Type is correct.
                - Server is running.
                - Hostname and Port number(s) are correct.
                - Server SSL configuration.

                How can I solve the problem?