JPosTemplate lib directory at wrong place in the project structure ?

42 views
Skip to first unread message

Nik

unread,
May 3, 2017, 4:13:13 AM5/3/17
to jPOS Users
When we run "gradle installApp" task on downloaded JPosTemplate, the "lib" directory gets created outside the deploy directory. 

But Section 7.7 of "http://jpos.org/doc/proguide-draft.pdf" says : 

"In addition to the deploy directory that Q2 monitors to see changes in the deployed services, it also monitors the timestamp of the deploy/lib directory, and if changed, it scans all jars in there and add them to the URL classloader of the MBeanServer, used by Q2 to instantiate its QBeans."

Further it says:

"Let’s try a simple example. If you start Q2 in say the /opt/local/jpos directory, it will be monitoring the /opt/local/jpos/deploy directory for QBean descriptors and the /opt/ local/jpos/deploy/lib for jars to be added to the classpath."

Is the structure in JPosTemplate wrong ?

Shouldn't the "lib" directory be inside "deploy" directory ?

Or am I missing something ?

chhil

unread,
May 3, 2017, 10:26:39 AM5/3/17
to jpos-...@googlegroups.com
See if this helps...

Followed instructions in the readme on the page.

ran gradle installApp.

Ended up with the template jar in the build\install.
See the locations of lib and deploy. They are relative to Q2 in the jPOS-template-master-2.0.6.jar (Q2 is the main class to run in the jars manifest). You can also open the jars manifest and see how the jars in the lib folder have been added to the classpath.

You can be in the folder that contains jPOS-template-master-2.0.6.jar and run 

java -jar jPOS-template-master-2.0.6.jar

C:.
|   out.txt
|   
\---jPOS-template-master
    |   jPOS-template-master-2.0.6.jar
    |   
    +---bin
    |       bsh
    |       q2
    |       q2.bat
    |       start
    |       stop
    |       
    +---cfg
    |       echo_r
    |       echo_s
    |       
    +---deploy
    |       00_logger.xml
    |       01_single.xml
    |       10_clientsimulator_channel.xml
    |       20_clientsimulator_mux.xml
    |       25_clientsimulator_ui.xml
    |       30_clientsimulator.xml
    |       99_sysmon.xml
    |       
    +---lib
    |       bcpg-jdk15on-1.55.jar
    |       bcprov-jdk15on-1.55.jar
    |       bsh-2.0b5.jar
    |       commons-cli-1.3.1.jar
    |       javatuples-1.2.jar
    |       jdbm-1.0.jar
    |       jdom2-2.0.6.jar
    |       je-7.0.6.jar
    |       jline-3.1.1.jar
    |       jpos-2.0.10.jar
    |       org.osgi.core-6.0.0.jar
    |       slf4j-api-1.7.21.jar
    |       slf4j-nop-1.7.21.jar
    |       sshd-core-1.2.0.jar
    |       
    \---log
            q2.log
-chhil

Alejandro Revilla

unread,
May 3, 2017, 2:54:53 PM5/3/17
to jPOS Users
Exactly, those are two different lib directories, the top level 'lib' is the one used by the main jar in its MANIFEST.MF to load its dependencies, then the deploy/lib is an optional directory used for hot-deployment of user jars.




Nik

unread,
May 7, 2017, 10:12:40 PM5/7/17
to jPOS Users
Thanks Alejandro for the clarification. I am one step ahead in my setup :).

Next I am trying to explore how JPOS handles multiple requests coming at the same time. Will JPOS create a new ISORequestListener (containing my business logic to process the messages and prepare the response) thread for every request like Java Servlet does?

Please read my reply to Chill in this post. Let me know if my understanding is incorrect. 

Kind Regards,
Nik

Alejandro Revilla

unread,
May 8, 2017, 6:34:16 PM5/8/17
to jPOS Users
Nik, you may want to take a look at the tutorial I just posted http://jpos.org/blog/2017/05/jpos-tutorial-writing-a-jpos-gateway/

If you get to understand how QueryHost and SendResponse works, you'd be able to use them in your application and achieve quite high throughput.





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: sa...@jpos.org
---
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 jpos-users+unsubscribe@googlegroups.com.
To post to this group, send email to jpos-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jpos-users/24fee907-ff07-4137-8dcc-1d221e86b076%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Nik

unread,
May 8, 2017, 9:58:02 PM5/8/17
to jPOS Users
Thanks a ton! Diving in right away.... :) :) Will post if I have any issues/questions....


On Tuesday, May 9, 2017 at 6:34:16 AM UTC+8, Alejandro Revilla wrote:
Nik, you may want to take a look at the tutorial I just posted http://jpos.org/blog/2017/05/jpos-tutorial-writing-a-jpos-gateway/

If you get to understand how QueryHost and SendResponse works, you'd be able to use them in your application and achieve quite high throughput.





On Sun, May 7, 2017 at 11:12 PM, Nik <nikunj....@waivcard.com> wrote:
Thanks Alejandro for the clarification. I am one step ahead in my setup :).

Next I am trying to explore how JPOS handles multiple requests coming at the same time. Will JPOS create a new ISORequestListener (containing my business logic to process the messages and prepare the response) thread for every request like Java Servlet does?

Please read my reply to Chill in this post. Let me know if my understanding is incorrect. 

Kind Regards,
Nik

On Thursday, May 4, 2017 at 2:54:53 AM UTC+8, Alejandro Revilla wrote:
Exactly, those are two different lib directories, the top level 'lib' is the one used by the main jar in its MANIFEST.MF to load its dependencies, then the deploy/lib is an optional directory used for hot-deployment of user jars.





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: sa...@jpos.org
---
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 jpos-users+...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages