Go to 'console' subdirectory and run a test by executing start_test_console.cmd or start_test_console.sh file. Than accept the port or change it.

Test executes 10 simple requests (by the JLNS - Java Object Remote Invocation Protocol) to default entry point on address: localhost:9090

You should see logs after that and the following message:

JAVA_HOME directory is C:/Program Files/Java/jdk1.8.0_05
JAVA_HOME exists
'
'========================================================================='
'
JLUPIN NEXT SERVER TEST CONSOLE
'
JAVA_HOME directory is C:/Program Files/Java/jdk1.8.0_05
'
JAVA_OPTS:
'
CONSOLE_CLASSPATH: e:/svn_projects/JLUPIN_NEXT_SERVER/trunk/console/lib/jlupin-util-1.0.0.jar;e:/svn_projects/JLUPIN_NEXT_SERVER/trunk/console/lib/jlupin-interfaces-1.0.0.jar;e:/svn_projects/JLUPIN_NEXT_SERVER/trunk/console/lib/jlupin-helper-1.0.0.jar;e:/svn_projects/JLUPIN_NEXT_SERVER/trunk/console/lib/jlupin-console-1.0.0.jar;e:/svn_projects/JLUPIN_NEXT_SERVER/trunk/console/lib/jlupin-serializer-1.0.0.jar;e:/svn_projects/JLUPIN_NEXT_SERVER/trunk/console/lib/jlupin-client-1.0.0.jar;e:/svn_projects/JLUPIN_NEXT_SERVER/trunk/console/lib/jlupin-logger-1.0.0.jar
'
"C:Program Files/Java/jdk1.8.0_05/bin/java.exe" -version
'========================================================================='
'
this test application test some JLUPIN NEXT SERVER FEATURES like connect and executing services in samples application by variable entry point
default test will be executing on server:localhost:9090 - if you want change address and port type other settings or press enter:test will be on follow settings:localhost port:9090
[2014-11-10 10:45:36] CLASS:com.jlupin.impl.client.command.JLupinDefaultCommandImpl MESSAGE ID:0 LEVEL:INFO THREAD:1 METHOD:execute LINE:66 LOG:MESSAGE ID:1 LOG:START command process with input parameters:JLupinInputParameter{jLupinServiceDTO=JLupinServiceDTO{createdDTOTime='2014-11-10 10:45:36', objectMap={surname=AnsiiC, name=Dennis}}, applicationName='firstSampleApplication', serviceName='firstSampleService', methodName='doService', requestId='d926706968026b3e66debdaf11b1c58a581000c1ca5170bd355d1e1a05815d94', sessionId='abeb6baafbacef60bb0d16400287287292d213226d04bc34615905f085fdec4c', locale=pl, privilegeNames=null, user='null', sequenceName='null', asynchronousBusName='null', clientApplicationName='null', ip='null'}
[2014-11-10 10:45:36] CLASS:com.jlupin.impl.client.command.JLupinDefaultCommandImpl MESSAGE ID:0 LEVEL:DEBUG THREAD:1 METHOD:execute LINE:70 LOG:MESSAGE ID:12 LOG:JLupinServiceDTO{createdDTOTime='2014-11-10 10:45:36', objectMap={surname=AnsiiC, name=Dennis}}
[2014-11-10 10:45:36] CLASS:com.jlupin.impl.client.command.JLupinDefaultCommandImpl MESSAGE ID:0 LEVEL:DEBUG THREAD:1 METHOD:execute LINE:72 LOG:MESSAGE ID:13 LOG:JLupinDelegator impl class:com.jlupin.impl.client.delegator.JLupinSocketDelegatorImpl
[2014-11-10 10:45:36] CLASS:com.jlupin.impl.client.delegator.JLupinSocketDelegatorImpl MESSAGE ID:0 LEVEL:DEBUG THREAD:1 METHOD:delegate LINE:58 LOG:MESSAGE ID:1 LOG:delegate to service:firstSampleService
[2014-11-10 10:45:36] CLASS:com.jlupin.impl.client.command.JLupinDefaultCommandImpl MESSAGE ID:0 LEVEL:DEBUG THREAD:1 METHOD:execute LINE:82 LOG:MESSAGE ID:14 LOG:executed service error status:false
[2014-11-10 10:45:36] CLASS:com.jlupin.impl.client.command.JLupinDefaultCommandImpl MESSAGE ID:0 LEVEL:INFO THREAD:1 METHOD:execute LINE:122 LOG:MESSAGE ID:16 LOG:STOP command process - process time (milliseconds):218 with request id:d926706968026b3e66debdaf11b1c58a581000c1ca5170bd355d1e1a05815d94 and session id:abeb6baafbacef60bb0d16400287287292d213226d04bc34615905f085fdec4c and output object:JLupinOutputParameter{jLupinExceptionModel=null, jLupinServiceDTO=JLupinServiceDTO{createdDTOTime='2014-11-10 10:45:36', objectMap={surname=AnsiiC, name=Dennis, parameter_1=answer from application:firstSampleApplication from service:firstSampleService, parameter_2=messages_sample.properties read by Thread.currentThread().getContextClassLoader():key_1:value_1key_2:value_2key_3:value_3, parameter_3=messages_sample.properties read by getClass().getClassLoader():key_1:value_1key_2:value_2key_3:value_3}}, executedServiceError=false}

....CUT...

ALL TEST PASSED!

After starting server You can invoke some services by variuous protocol, copy below code to Your IDE, to SOAP UI or Postman or another testing software.

Complete project You can download here --> /upload/jlupin_1_3_0_invoking_test.zip

OK, let`s start.

  1. Invoking sample service by JAVA REMOTE OBJECT INVOCATION:

Download jlupin-sample-application-1.3.0.jar which included service interfaces here --> /upload/jlupin-sample-application-1.3.0.jar

Add jlupin-sample-application-1.3.0.jar to Your .m2 repo by follow command:

mvn install:install-file -DgroupId=com.jlupin -DartifactId=jlupin-sample-application -Dversion=1.3.0 -Dpackaging=jar -Dfile=jlupin-sample-application-1.3.0.jar

Now downoad all required JLupin Next Server`s libraries (as JAR files) -->__ jlupin-all-assembly-1.3.0.jar__

Add libraries above by following command:

mvn install:install-file -DgroupId=com.jlupin -DartifactId=jlupin-all-assembly -Dversion=1.3.0 -Dpackaging=jar -Dfile=jlupin-all-assembly-1.3.0.jar

Add the following dependencies to Your project as maven dependencies:

<dependencies>
 <dependency>
  <groupId>com.jlupin</groupId>
  <artifactId>jlupin-sample-application</artifactId>
  <version>1.3.0</version>
  <scope>provided</scope>
 </dependency>
 <dependency>
  <groupId>com.jlupin</groupId>
  <artifactId>jlupin-all-assembly</artifactId>
  <version>1.3.0</version>
  <scope>provided</scope>
 </dependency>
 <dependency>
  <groupId>junit</groupId>
  <artifactId>junit</artifactId>
  <version>4.8.1</version>
  <scope>test</scope>
 </dependency>
</dependencies>

! Important note: If You write only client code which connect to JLupin and invoking remote method by JLupin`s load balancer (from external servers for example) use only jlupin-client-assembly-1.3.0.jar. That library You can download here --> jlupin-client-assembly-1.3.0.jar

Install command:

mvn install:install-file -DgroupId=com.jlupin -DartifactId=jlupin-client-assembly -Dversion=1.3.0 -Dpackaging=jar -Dfile=jlupin-client-assembly-1.3.0.jar

dependency:

<dependency>
  <groupId>com.jlupin</groupId>
  <artifactId>jlupin-client-assembly</artifactId>
  <version>1.3.0</version>
  <scope>provided</scope>
</dependency>

Let`s back to our sample project:
Test code:

package com.jlupin.test.invoke;

import com.jlupin.impl.client.delegator.JLupinSocketDelegatorImpl;
import com.jlupin.impl.client.proxy.producer.JLupinDefaultProxyObjectProducerImpl;
import com.jlupin.impl.logger.impl.simple.stdout.JLupinSimpleSystemOutLoggerImpl;
import com.jlupin.impl.serialize.JLupinFSTSerializerImpl;
import com.jlupin.interfaces.client.proxy.producer.JLupinProxyObjectProducer;
import com.jlupin.interfaces.common.to.JLupinInputParameter;
import com.jlupin.interfaces.logger.JLupinLogger;
import com.jlupin.interfaces.logger.enums.LogMode;
import com.jlupin.interfaces.serialize.JLupinSerializer;
import com.jlupin.sampleapp.paramsfunction.service.DateTimeService;
import org.junit.Before;
import java.net.InetAddress;
import java.net.InetSocketAddress;
import java.util.Date;
import java.util.Locale;

public class InvokeTest {

    private JLupinLogger jLupinLogger;
    private JLupinSerializer jLupinSerializer;
    private JLupinSocketDelegatorImpl jLupinDelegator;
    private JLupinProxyObjectProducer jLupinProxyObjectProducer;

    @Before
    public void before() {
        JLupinSimpleSystemOutLoggerImpl.initializeWithLogMode(LogMode.DEBUG);
        jLupinLogger     = JLupinSimpleSystemOutLoggerImpl.getInstance();
        jLupinSerializer = JLupinFSTSerializerImpl.getInstance();

        jLupinDelegator = new JLupinSocketDelegatorImpl(jLupinLogger, jLupinSerializer);
        jLupinDelegator.setSocketAddressToConnectServer(new InetSocketAddress("localhost", 9090));
        jLupinDelegator.setSoTimeout(30000);

        jLupinProxyObjectProducer = new JLupinDefaultProxyObjectProducerImpl(
                                    "firstSampleApplication", "testClientApplication",
                                    jLupinDelegator, jLupinLogger);
    }

    @org.junit.Test
    public void test() throws Throwable {
            DigestService digestService = produceDigestService();
            String digest = digestService.getMD5Digest("name", "surname");
            jLupinLogger.info("current digest:" + digest);
    }

    private DigestService produceDigestService() throws Throwable {

            String ip = InetAddress.getLocalHost().getHostAddress();
            String userName = System.getProperty("user.name");

            JLupinInputParameter jLupinInputParameter = new JLupinInputParameter("digestService","sessionId", "requestId",
                    ip,new Locale("pl"), userName, new String[] {"user_privilege_1", "user_privilege_2"});

            DigestService DigestService = jLupinProxyObjectProducer.produceObject(DigestService.class, jLupinInputParameter);
            return DigestService;
    }
}

Result:

[2016-07-19 13:06:45] CLASS:com.jlupin.impl.client.command.JLupinDefaultCommandImpl MESSAGE ID:1 SESSION ID:sessionId REQUEST ID:requestId LEVEL:DEBUG THREAD:1 METHOD:execute LINE:80 LOG:START command process with request id:requestId, session id:sessionId, service name:digestService, method name:getMD5Digest
[2016-07-19 13:06:45] CLASS:com.jlupin.impl.client.command.JLupinDefaultCommandImpl MESSAGE ID:12 SESSION ID:sessionId REQUEST ID:requestId LEVEL:DEBUG THREAD:1 METHOD:execute LINE:84 LOG:START command process with input parameters:JLupinInputParameter{jLupinServiceDTO=null', function args=object array content:[ object by index [0] class name:java.lang.String and (info based on toString() method):name | object by index [1] class name:java.lang.String and (info based on toString() method):surname]', applicationName='firstSampleApplication', serviceName='digestService', methodName='getMD5Digest', requestId='requestId', sessionId='sessionId', locale=pl, privilegeNames=[user_privilege_1, user_privilege_2], user='piotr.rog', sequenceName='null', asynchronousBusName='null', clientApplicationName='testClientApplication', ip='192.168.43.33'}
[2016-07-19 13:06:45] CLASS:com.jlupin.impl.client.command.JLupinDefaultCommandImpl MESSAGE ID:13 SESSION ID:sessionId REQUEST ID:requestId LEVEL:DEBUG THREAD:1 METHOD:execute LINE:88 LOG:JLupinDelegator impl class:com.jlupin.impl.client.delegator.JLupinDefaultBalanceProxyDelegatorImpl
[2016-07-19 13:06:45] CLASS:com.jlupin.impl.client.balancer.strategy.impl.healthchecking.JLupinHealthCheckingBalanceStrategyImpl MESSAGE ID:4 SESSION ID:sessionId REQUEST ID:requestId LEVEL:DEBUG THREAD:1 METHOD:getComputedServerIndex LINE:111 LOG:return computed index:0
[2016-07-19 13:06:45] CLASS:com.jlupin.impl.client.balancer.JLupinHealthCheckingSocketBalancerImpl MESSAGE ID:3 SESSION ID:sessionId REQUEST ID:requestId LEVEL:DEBUG THREAD:1 METHOD:getServerIndex LINE:72 LOG:current balance strategy impl:com.jlupin.impl.client.balancer.strategy.impl.healthchecking.JLupinHealthCheckingBalanceStrategyImpl@3d71d552 and returning server index:0
[2016-07-19 13:06:45] CLASS:com.jlupin.impl.client.balancer.base.JLupinBaseBalancer MESSAGE ID:7 SESSION ID:sessionId REQUEST ID:requestId LEVEL:DEBUG THREAD:1 METHOD:getGivenSocketOrIterateAllServerConfigurationAndGetFirstAvailableSocket LINE:275 LOG:getting properly socket by index:0, socket properties:Socket[addr=localhost/127.0.0.1,port=9090,localport=34504]
[2016-07-19 13:06:45] CLASS:com.jlupin.impl.client.balancer.base.JLupinBaseBalancer MESSAGE ID:5 SESSION ID:sessionId REQUEST ID:requestId LEVEL:DEBUG THREAD:1 METHOD:sendInputAndReceiveOutputOnProperOrOnFirstAvailableServer LINE:211 LOG:object was send and received correctly by socket:Socket[addr=localhost/127.0.0.1,port=9090,localport=34504]
[2016-07-19 13:06:45] CLASS:com.jlupin.impl.client.command.JLupinDefaultCommandImpl MESSAGE ID:15 SESSION ID:sessionId REQUEST ID:requestId LEVEL:DEBUG THREAD:1 METHOD:execute LINE:148 LOG:STOP command process - process time (milliseconds):448 with request id:requestId and session id:sessionId
[2016-07-19 13:06:45] CLASS:com.jlupin.impl.client.command.JLupinDefaultCommandImpl MESSAGE ID:16 SESSION ID:sessionId REQUEST ID:requestId LEVEL:DEBUG THREAD:1 METHOD:execute LINE:152 LOG:STOP command process - process time (milliseconds):448 with request id:requestId and session id:sessionId and output object:JLupinOutputParameter{jLupinExceptionModel=null, jLupinServiceDTO=null, executedServiceError=false, resultObject=50382149719ab04e47a966ad959f4241}
[2016-07-19 13:06:45] CLASS:com.jlupin.test.invoke.InvokeTest2 MESSAGE ID:0 LEVEL:INFO THREAD:1 METHOD:test LINE:70 LOG:digest:50382149719ab04e47a966ad959f4241

2. Invoking sample service by WEB SERVICE SOAP-XML interface.

Address: http://127.0.0.1:8082/jLupinNextServerWebService/JLupinWebservice

Input:

<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ent="http://entrypoint.impl.jlupin.org/">
   <soapenv:Header/>
   <soapenv:Body>
      <ent:jLupinService>
         <jLupinInputParameter>
         <applicationName>firstSampleApplication</applicationName>
           <locale>pl</locale>
            <methodName>getMD5Digest</methodName>
              <privilegeList>
               <privilegeName>privilege</privilegeName>
            </privilegeList>
            <requestId>request1</requestId>
            <sequenceName>sampleParamArrayXmlInOutSequence</sequenceName>
             <serviceName>digestService</serviceName>
            <sessionId>session1</sessionId>
            <user>test_user</user>
             <busName>busName</busName>
             <paramArray><![CDATA[<string>name</string>;
             <string>surname</string>]]>
            </paramArray>
         </jLupinInputParameter>
     </ent:jLupinService>
   </soapenv:Body>
</soapenv:Envelope>

Output:

<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
    <env:Header/>
    <env:Body>
        <jlns:jLupinServiceResponse xmlns:jlns="http://entrypoint.impl.jlupin.org/">
            <jLupinOutputParameter>
                <executedServiceError>false</executedServiceError>
                <result>
                    <![CDATA[
                    <?xml version="1.0" encoding="UTF-8"?><java version="1.8.0_45" class="java.beans.XMLDecoder"><string>50382149719ab04e47a966ad959f4241</string>]]>
                </result>
            </jLupinOutputParameter>
        </jlns:jLupinServiceResponse>
    </env:Body>
</env:Envelope>

3. Invoking sample service by WEB SERVICE HTTP-JSON interface.

Address: http://localhost:8083/jLupinNextServerRestService/JLupinRestservice

Input:

{
  "jLupinInputParameter": {
    "applicationName": "firstSampleApplication",
    "locale": "pl",
    "methodName": "getMD5Digest",
    "privilegeList": [ "privilege_1", "privilege_2" ],
    "requestId": "request_1",
    "serviceName": "digestService",
    "sequenceName":"sampleParamArrayJsonInOutSequence",
    "paramArray":["java.lang.String:\"name\"","java.lang.String:\"surname\""],
    "sessionId": "session_1",
    "user": "test_user",
  }
}

Output:

{"jLupinOutputParameter": {
   "result": "1443695824958",
   "executedServiceError": false
}}

4. Invoking sample service by Queue interface

JLupin automatically provides messaging mechanisms. The same request can be placed within a certain queue. By default two entry point responsible for asynchronous processing is running on 9093 port. Thus the class call result will not come back as in previous example, but the task id instead. In server logs we can observe acceptance of the task to the queue. Let's have a look at a call to port 9093. Test class code – in this case we don't use remote object calls but directly the implementation call JLupinDelegator – JlupinSocketDelegatorImpl. We call the delegate method that adopts the filled JLupinInputParameter object – unlike in previous examples we provide the application name, methods to execute and parameter list – this is necessary, as we don't use remote interfaces as in case of asynchronous call with __JLupin Java Remote Object Invocation __mechanisms. The return object after delegate method call is JLupinOutputParameter, whcih returns id of the task in the queue in resultObject variable.

Test class code:

Test code:

public class InvokeAsynchronousTest {

    private JLupinLogger jLupinLogger;
    private JLupinSerializer jLupinSerializer;
    private JLupinSocketDelegatorImpl jLupinDelegator;

    @Before
    public void before() {
        JLupinSimpleSystemOutLoggerImpl.initializeWithLogMode(LogMode.DEBUG);
        jLupinLogger     = JLupinSimpleSystemOutLoggerImpl.getInstance();
        jLupinSerializer = JLupinFSTSerializerImpl.getInstance();
        jLupinDelegator = new JLupinSocketDelegatorImpl(jLupinLogger, jLupinSerializer);
        jLupinDelegator.setSocketAddressToConnectServer(new InetSocketAddress("localhost", 9093));

    }

    @org.junit.Test
    public void test() throws Throwable {
        String taskId = addAsynchronousTask();
        jLupinLogger.info("task id:" + taskId );
    }

    private String addAsynchronousTask() throws Throwable {

        String ip = InetAddress.getLocalHost().getHostAddress();
        String userName = System.getProperty("user.name");

        JLupinInputParameter jLupinInputParameter = new JLupinInputParameter("digestService","sessionId", "requestId",
                ip,new Locale("pl"), userName, new String[] {"user_privilege_1", "user_privilege_2"});

        jLupinInputParameter.setApplicationName("firstSampleApplication");
        jLupinInputParameter.setMethodName("getMD5Digest");
        jLupinInputParameter.setParamArray(new Object[] {"name", "surname"});
        jLupinInputParameter.setAsynchronousBusName("simpleBus");

        JLupinOutputParameter jLupinOutputParameter = jLupinDelegator.delegate(jLupinInputParameter);
        String taskId = jLupinOutputParameter.getResultObject();
        return taskId;
    }
}

call effect:

[2015-10-26 14:09:57] CLASS:com.jlupin.test.invoke.InvokeAsynchronousTest MESSAGE ID:0 LEVEL:INFO THREAD:1 METHOD:test LINE:41 LOG:task id: cd7313dfc0bcf967f9db7015882c1fda14f80b81482a200206636470c23b7031

Most important information is taskId: cd7313dfc0bcf967f9db7015882c1fda14f80b81482a200206636470c23b7031

To see the entry below on a server it is necessary to change login mode to debug. To enable this it is required to change the following entry in__ log4j.xml file in server-resources__ directory:

<priority value="DEBUG"/>

Logs:

Task acceptance to execute in queue:

2015-10-26 14:20:18,218 DEBUG [com.jlupin.impl.entrypoint.multiprocess.binary.asynchronous.simple.JLupinSimpleBinaryAsynchronousEntryPointImpl] (pool-25-thread-1)  MESSAGE ID:42 LINE:101 LOG:successfully added task:JLupinAsynchronousTask{id='cd7313dfc0bcf967f9db7015882c1fda14f80b81482a200206636470c23b7031', inputTimeInMillis=1445865617955, probeCounter=0, applicationName='firstSampleApplication', serviceName='digestService', busName='simpleBus', sessionId='sessionId', requestId='requestId', methodName='getMD5Digest'} into task list

Task execution:

2015-10-26 14:21:21,723 DEBUG [com.jlupin.impl.entrypoint.multiprocess.binary.asynchronous.simple.JLupinSimpleBinaryAsynchronousEntryPointImpl$TaskControl] (Thread-11)  MESSAGE ID:54 LINE:183 LOG:executing task:JLupinAsynchronousTask{id='cd7313dfc0bcf967f9db7015882c1fda14f80b81482a200206636470c23b7031', inputTimeInMillis=1445865617955, probeCounter=0, applicationName='firstSampleApplication', serviceName='digestService', busName='simpleBus', sessionId='sessionId', requestId='requestId', methodName='getMD5Digest'}

Task execution confirmation:

2015-10-26 15:04:53,620 DEBUG [com.jlupin.impl.manager.multiprocess.JLupinDefaultNewMultiProcessManagerImpl] (Thread-11)  MESSAGE ID:2891 LINE:2085 LOG:task: cd7313dfc0bcf967f9db7015882c1fda14f80b81482a200206636470c23b7031 executed correctly