[jpos-users] JPOS/JPOSEE greenhorn : Rookie questions

classic Classic list List threaded Threaded
4 messages Options
Nik
Reply | Threaded
Open this post in threaded view
|

[jpos-users] JPOS/JPOSEE greenhorn : Rookie questions

Nik
Hi All,

I am a new JPOS/JPOSEE user and trying to understand its features for starting development with it.

This is what I have done as of now:

1) Cloned the master branch using https://github.com/jpos/jPOS-EE.git into my server repository
2) Cloned my master locally. This downloaded all source code under a root directory "jpos-ee"

Apart from other files, the "jpos-ee" directory has 3 directories viz. doc, gradle and modules.

I believe "modules" is the directory containing all the source code.

3) I ran "gradle eclipse" at "jpos-ee" directory. (I am new to gradle as well!!)

It threw out the following log lines for each directory inside "jpos-ee/modules":

:modules:client-simulator:eclipseClasspath
:modules:client-simulator:eclipseJdt
:modules:client-simulator:eclipseProject
:modules:client-simulator:eclipse

4) Imported generated eclipse projects into my eclipse.

This imported a total of 34 projects. While jpos-ee/modules has 33 modules. Cross-checking revealed that a "modules" project also got created with all the modules inside it.

So do I import only "modules" in eclipse ? Or is importing all 34 projects fine ?

========================================================================================================================================

Next I cloned jPOS-Template project and ran the following commands.

1) cd jPOS-Template
2) gradle eclipse (to import the project in eclipse)
3) gradle dist (which created a "distributions" directory inside "jPOS-Template/build" directory)
4) gradle installApp (which created a "install" directory inside "jPOS-Template/build" directory which had bin, deploy, lib, log directories and a jar file jPOS-Template-2.0.6.jar

Opened a command prompt. cd to "jPOS-template\build\install\jPOS-template" and ran:

java -jar jPOS-template-2.0.6.jar

This printed logs which I understand is ran "00_logger.xml and 99_sysmon.xml"

========================================================================================================================================

How do I proceed from this point onward ?
How do I start a Q2 server ?
How do I involve other modules in my projects ?
What will get deployed on my Production Server ? Is is just the jar ?

Thanks and Regards,
Nik










This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. If you are not the intended recipient you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited.

--
--
jPOS is licensed under AGPL - free for community usage for your open-source project. Licenses are also available for commercial usage. Please support jPOS, contact: [hidden email]
---
You received this message because you are subscribed to the Google Groups "jPOS Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jpos-users/a37f003a-53c6-4837-9e7d-ffa5a2f8c9ec%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [jpos-users] JPOS/JPOSEE greenhorn : Rookie questions

Alejandro Revilla
Unless you're going to contribute to jPOS-EE, you don't actually have to clone it, you can just clone the jPOS template and add the dependencies you want.

Perhaps a good start is to launch the clientsimulator and serversimulator (see http://jpos.org/blog/2013/07/setting-up-the-client-simulator/)



On Wed, Apr 26, 2017 at 12:30 AM, Nik <[hidden email]> wrote:
Hi All,

I am a new JPOS/JPOSEE user and trying to understand its features for starting development with it.

This is what I have done as of now:

1) Cloned the master branch using https://github.com/jpos/jPOS-EE.git into my server repository
2) Cloned my master locally. This downloaded all source code under a root directory "jpos-ee"

Apart from other files, the "jpos-ee" directory has 3 directories viz. doc, gradle and modules.

I believe "modules" is the directory containing all the source code.

3) I ran "gradle eclipse" at "jpos-ee" directory. (I am new to gradle as well!!)

It threw out the following log lines for each directory inside "jpos-ee/modules":

:modules:client-simulator:eclipseClasspath
:modules:client-simulator:eclipseJdt
:modules:client-simulator:eclipseProject
:modules:client-simulator:eclipse

4) Imported generated eclipse projects into my eclipse.

This imported a total of 34 projects. While jpos-ee/modules has 33 modules. Cross-checking revealed that a "modules" project also got created with all the modules inside it.

So do I import only "modules" in eclipse ? Or is importing all 34 projects fine ?

========================================================================================================================================

Next I cloned jPOS-Template project and ran the following commands.

1) cd jPOS-Template
2) gradle eclipse (to import the project in eclipse)
3) gradle dist (which created a "distributions" directory inside "jPOS-Template/build" directory)
4) gradle installApp (which created a "install" directory inside "jPOS-Template/build" directory which had bin, deploy, lib, log directories and a jar file jPOS-Template-2.0.6.jar

Opened a command prompt. cd to "jPOS-template\build\install\jPOS-template" and ran:

java -jar jPOS-template-2.0.6.jar

This printed logs which I understand is ran "00_logger.xml and 99_sysmon.xml"

========================================================================================================================================

How do I proceed from this point onward ?
How do I start a Q2 server ?
How do I involve other modules in my projects ?
What will get deployed on my Production Server ? Is is just the jar ?

Thanks and Regards,
Nik










This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. If you are not the intended recipient you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited.

--
--
jPOS is licensed under AGPL - free for community usage for your open-source project. Licenses are also available for commercial usage. Please support jPOS, contact: [hidden email]
---
You received this message because you are subscribed to the Google Groups "jPOS Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jpos-users/a37f003a-53c6-4837-9e7d-ffa5a2f8c9ec%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
--
jPOS is licensed under AGPL - free for community usage for your open-source project. Licenses are also available for commercial usage. Please support jPOS, contact: [hidden email]
---
You received this message because you are subscribed to the Google Groups "jPOS Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jpos-users/CAAgSK%3Dnx_Dge1rzYB%3DPXWV%2BkNvgCaYwj34f9rbW%3Drqkay5DGTA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Nik
Reply | Threaded
Open this post in threaded view
|

Re: [jpos-users] JPOS/JPOSEE greenhorn : Rookie questions

Nik
Hey Alejendro,

Thanks for your reply. Yes. That makes sense. No need to clone all modules.

However, I am confused about "hot deployment". What does that mean? How does it work?  Request you to read the details below:

I tried this and my setup is now this:

My ServerSimulator xml looks like this:

<server class="org.jpos.q2.iso.QServer" name="my_jpos_server" logger="Q2" realm="my_jpos_server">
 
   
<attr name="port" type="java.lang.Integer">9999</attr>
   
<attr name="maxSessions" type="java.lang.Integer">100</attr>
   
<attr name="minSessions" type="java.lang.Integer">0</attr>
 
   
<channel name="my_xml_Channel"
   
class="org.jpos.iso.channel.XMLChannel"
   
logger="Q2"
   
realm="my_xml_Channel"
   
packager="org.jpos.iso.packager.XMLPackager">
     
   
</channel>
 
   
<request-listener class="com.abc.jpos.server.ISOServerRequestListener">
       
<property name="timeout" value="10000" />
   
</request-listener>
</server>

So I have written my class ISOServerRequestListener  which is as follows:

public class ISOServerRequestListener implements ISORequestListener{
 
 
public boolean process(ISOSource source, ISOMsg message) {
 
try {
 message
.setResponseMTI();
 
System.out.println("I am here: " + message.toString());
 source
.send(message);
 
} catch (ISOException e) {
 e
.printStackTrace();
 
} catch (IOException e) {
 e
.printStackTrace();
 
}
 
return false;
 
}
}

So just getting the message and bouncing it up.

To kick off the system, I wrote a simple java class as below:

public class StartQ2
{
   
public static void main( String[] args )
   
{
    Q2 q2Server
= new Q2();
 q2Server
.start();
   
}
}


I created a distributable tar with main method of StartQ2 class as the entry point. 

The tar consists the following:

a) a log directory containing an empty file q2.log
b) a deploy directory containing xml files for logging, system monitoring and server simulator.
c) JAR file containing classes for StartQ2 and ISOServerRequestListener.

I exploded this tar in my unix system and ran the following command to bring system up:


java
-jar myjposjar.jar

This brings the server up and I am able to communicate with it through the designated port. 

Now what does hot deployment mean for me ?  

If I make some additions/enhancements (e.g. changing the server port in server simulator xml or changing the way messages are processed in ISOServerRequestListener class).
I will ofcourse create a new Tar file containing updated resource files and/or updated JAR file containing my java classes. 

If I explode the tar in my unix system, will my running Q2 server start reflecting the changes ? 
What does "deployment without bringing running jpos server down" mean in context of JPOS ? Can you please explain it using some example of changes to code. Or if you could point me to some resource explaining the concept. 

Thanks for reading!

Kind Regards,
Nik



On Thursday, April 27, 2017 at 4:31:23 AM UTC+8, Alejandro Revilla wrote:
Unless you're going to contribute to jPOS-EE, you don't actually have to clone it, you can just clone the jPOS template and add the dependencies you want.

Perhaps a good start is to launch the clientsimulator and serversimulator (see <a href="http://jpos.org/blog/2013/07/setting-up-the-client-simulator/" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fjpos.org%2Fblog%2F2013%2F07%2Fsetting-up-the-client-simulator%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFFszoixHKaSzQvZPbosoTLGfmZ2w&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fjpos.org%2Fblog%2F2013%2F07%2Fsetting-up-the-client-simulator%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFFszoixHKaSzQvZPbosoTLGfmZ2w&#39;;return true;">http://jpos.org/blog/2013/07/setting-up-the-client-simulator/)


--
<a style="font-family:garamond,serif" href="http://twitter.com/apr" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Ftwitter.com%2Fapr\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFRt8creb486OVHOJ12erdzV1NRIg&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Ftwitter.com%2Fapr\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFRt8creb486OVHOJ12erdzV1NRIg&#39;;return true;">@apr

On Wed, Apr 26, 2017 at 12:30 AM, Nik <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="NFIIlnkXDAAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">nikunj....@...> wrote:
Hi All,

I am a new JPOS/JPOSEE user and trying to understand its features for starting development with it.

This is what I have done as of now:

1) Cloned the master branch using <a href="https://github.com/jpos/jPOS-EE.git" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fjpos%2FjPOS-EE.git\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHp8da5F4JjTzmj9w5_y2z-pCZtBg&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Fjpos%2FjPOS-EE.git\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHp8da5F4JjTzmj9w5_y2z-pCZtBg&#39;;return true;">https://github.com/jpos/jPOS-EE.git into my server repository
2) Cloned my master locally. This downloaded all source code under a root directory "jpos-ee"

Apart from other files, the "jpos-ee" directory has 3 directories viz. doc, gradle and modules.

I believe "modules" is the directory containing all the source code.

3) I ran "gradle eclipse" at "jpos-ee" directory. (I am new to gradle as well!!)

It threw out the following log lines for each directory inside "jpos-ee/modules":

:modules:client-simulator:eclipseClasspath
:modules:client-simulator:eclipseJdt
:modules:client-simulator:eclipseProject
:modules:client-simulator:eclipse

4) Imported generated eclipse projects into my eclipse.

This imported a total of 34 projects. While jpos-ee/modules has 33 modules. Cross-checking revealed that a "modules" project also got created with all the modules inside it.

So do I import only "modules" in eclipse ? Or is importing all 34 projects fine ?

========================================================================================================================================

Next I cloned jPOS-Template project and ran the following commands.

1) cd jPOS-Template
2) gradle eclipse (to import the project in eclipse)
3) gradle dist (which created a "distributions" directory inside "jPOS-Template/build" directory)
4) gradle installApp (which created a "install" directory inside "jPOS-Template/build" directory which had bin, deploy, lib, log directories and a jar file jPOS-Template-2.0.6.jar

Opened a command prompt. cd to "jPOS-template\build\install\jPOS-template" and ran:

java -jar jPOS-template-2.0.6.jar

This printed logs which I understand is ran "00_logger.xml and 99_sysmon.xml"

========================================================================================================================================

How do I proceed from this point onward ?
How do I start a Q2 server ?
How do I involve other modules in my projects ?
What will get deployed on my Production Server ? Is is just the jar ?

Thanks and Regards,
Nik










This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. If you are not the intended recipient you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited.

--
--
jPOS is licensed under AGPL - free for community usage for your open-source project. Licenses are also available for commercial usage. Please support jPOS, contact: <a href="javascript:" target="_blank" gdf-obfuscated-mailto="NFIIlnkXDAAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">sa...@...
---
You received this message because you are subscribed to the Google Groups "jPOS Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="NFIIlnkXDAAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">jpos-users+...@googlegroups.com.
To post to this group, send email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="NFIIlnkXDAAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">jpos-...@....
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/jpos-users/a37f003a-53c6-4837-9e7d-ffa5a2f8c9ec%40googlegroups.com?utm_medium=email&amp;utm_source=footer" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/jpos-users/a37f003a-53c6-4837-9e7d-ffa5a2f8c9ec%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/jpos-users/a37f003a-53c6-4837-9e7d-ffa5a2f8c9ec%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/jpos-users/a37f003a-53c6-4837-9e7d-ffa5a2f8c9ec%40googlegroups.com.
For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">https://groups.google.com/d/optout.


This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. If you are not the intended recipient you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited.

--
--
jPOS is licensed under AGPL - free for community usage for your open-source project. Licenses are also available for commercial usage. Please support jPOS, contact: [hidden email]
---
You received this message because you are subscribed to the Google Groups "jPOS Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jpos-users/49cab73b-4e0b-423f-abe9-e68988f136a2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [jpos-users] JPOS/JPOSEE greenhorn : Rookie questions

Alejandro Revilla

The term hot-deployment in Q2 is used in two situations:

  • The ability to stop/start services just by editing its XML descriptor (in the deploy directory)
  • The ability to hot-deploy code in the deploy/lib directory that can be used by the QBeans

The latter has a limited use though and you usually have to know what you are doing. It is not a full fledged system such as OSGi (jPOS is quite OSGi friendly, so you can use an OSGi container and deploy jPOS as a bundle. or the other way around, use the --osgi switch to Q2 and have Q2 launch the OSGi framework.

The rationale behind adding the ability to deploy some jar in the deploy/lib and use it right away without having to bounce the system was to add the ability to hot-deploy some small fix to production, like an ISO filter until we find a good time to bounce the application.

So the rule of thumb here, if you want to write a filter, or deploy a small monitoring QBean, you can add the jar to deploy/lib. If you want something more sophisticated, with properly managed dependencies and life-cycle, go with OSGi.

Hope this helps.




--
--
jPOS is licensed under AGPL - free for community usage for your open-source project. Licenses are also available for commercial usage. Please support jPOS, contact: [hidden email]
---
You received this message because you are subscribed to the Google Groups "jPOS Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jpos-users/CAAgSK%3DkE%2BSSDRk2RJ9kbg6jknJGZHWGN7XwRrT8Yr%2BqrMt5ghw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.