Java development blog (tips, notes, …)
"First, solve the problem. Then, write the code." (John Johnson)

    USING EXISTING GIT REPO WITH OPENSHIFT

    2014-07-27 12:09:02 +0000

    Clone your git repository
    git clone
    Add openshift git repository as remote
    git remote add openshift -f
    Merging
    git merge openshift/master -s recursive -X ours
    Pushing your code to openshift repository
    git push openshift HEAD

    Setting endpoint address in cxf generated client

    2014-07-11 00:00:00 +0000

    Sometimes you have to work with somewhat broken WSDL files. Here’s a little code snippet to override the service location:

    import javax.xml.ws.BindingProvider;
    import java.net.URL;
     
    final MyService service = new Service(new URL("http........?wsdl")).getMyService();
    BindingProvider bp = (BindingProvider) service;
    bp.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, "http......");  //without ?wsdl

    Google Cloud Platform Live – YouTube

    2014-03-29 00:00:00 +0000

    [Google Cloud Platform Live – YouTube][1]

    Streamed live on Mar 25, 2014

    On March 25, 2014, Urs Hölzle, Senior Vice President for Technical Infrastructure, and the senior engineering leadership of Google Cloud Platform will be hosting a day-long developer summit and evening celebration to announce new features for Google Cloud Platform, take a deep dive on tips, tricks and technology, and share our vision for the future of cloud computing.”

    Now this I call a big query: https://www.youtube.com/watch?v=Xt7O2oHNCOU&index=3&list=WL5331C3AFFB754C2B#t=2h8m21s

    Starting JBOSS EAP as a service on Windows

    2013-04-08 00:00:00 +0000

    1. Make sure to set JBOSS_HOME as a system environment variable pointing to the JBoss installation directory
    2. Add a system environment variable NOPAUSE=1
      Alternatively edit the last line of both standalone.bat (domain.bat) / jboss-cli.bat
      and remove this line:
      if "x%NOPAUSE%" == "x" pause
    3. Open a cmd.exe window
    4. execute a “set JBOSS_HOME=...
      (not needed if you open the cmd.exe after you have added the system env. var)
    5. Installing the service, enter the below on one line:
       
    prunsrv //IS//JBossEAP6 --DisplayName="JBoss Enterprise Application Platform 6" --LogLevel=DEBUG --LogPath=%JBOSS_HOME%standalonelog --LogPrefix=service --StdOutput=auto --StdError=auto --StartMode=exe --StartImage=cmd.exe --StartPath=%JBOSS_HOME%/bin ++StartParams="/c standalone.bat" --StopMode=exe --StopImage=cmd.exe --StopPath=%JBOSS_HOME%/bin ++StopParams="/c jboss-cli.bat --connect command=:shutdown"
    1. You should now have a service installed that you can manually start/stop from the Services window.
      Set to automatic is so required.

    Should you need to remove the service, use this:
    prunsrv //DS//JBossEAP6

    Configure application in JBOSS 7

    2013-03-14 00:00:00 +0000

    As of JBOSS 7.1 you can easily create and access objects in JNDI. This is helpful, if the administration needs to set some parameter for a application. I don’t want anyone to mess with my ear- or warfiles.

    Search in the standalone.xml (or which configuration file is in use) for the following element:

    <subsystem xmlns="urn:jboss:domain:naming:1.2">
          <remote-naming/>
    </subsystem>

    Write your configuration entries:

    <subsystem xmlns="urn:jboss:domain:naming:1.2">
         <bindings>
               <simple name="java:global/myEntry" value="4" type="int"/>
               <simple name="java:global/myStringEntry" value="YEAH"/>
         </bindings>
         <remote-naming/>
    </subsystem>

    Search for the schema file jboss-as-naming_1_2.xsd if your wondering, what can be used here.

    To acces the information use a little EE6 magic:

    import javax.annotation.Resource;
     
    @Resource(lookup = "java:global/myStringEntry")
    private String testString;
     
    @Resource(lookup = "java:global/myEntry")
    private int testInt;

    That’s it. Here’s the full documentation: https://docs.jboss.org/author/display/AS71/JNDI+Reference

subscribe via RSS