Skip to main content

177 posts tagged with "jpos"

View All Tags

Small World

· 2 min read
Alejandro Revilla
jPOS project founder

/by apr/

For some time, my brother in law, who lives in Brasil, has been talking to me about his girlfriend's sister's husband (aka his brother in law) and the fact that he was a brilliant programmer, a genious! I went 'oh yeah... great' but honestly, I didn't pay too much attention.

Recently, he came to our place to spend with us Dec 31th, and he said that his girlfriend, along with her sister and husband (the brilliant programmer) were keen to come too, but they couldn't find a hotel (we were at a resort town, fully booked for the holiday season).

While I was cooking a BBQ , he went talking about how the guy has moved to the US, that he gives keynotes in many conferences, etc. etc. and after a few hours, he said, you might know him, his name is Miguel de Icaza.

What!?!?​

I was shocked! I could have booked a hotel 6 months in advance, we could have hosted them at our place!

Damn, I missed this great oportunity to shake hands with a programmer of the caliber of Miguel! Lesson learnt, do not > /dev/null all what your in-law family members have to say ... :)

On the bright side, Miguel didn't have the chance to visit Punta del Este (a very nice city), but he saved himself a long rap about jPOS ... I have a Mono T-shirt now, sent by the author, and I expect him to get his jPOS T-shirt soon (on its way...) Small world, huh?

jPOS-EE Constants

· 2 min read
Alejandro Revilla
jPOS project founder

/by apr/

If you use the jPOS' TransactionManager, and you use a Map to pass around your Context among participants, you may find yourself creating some kind of Contants kind of class in order to define your Context's keys. If you use jPOS-EE-SDK component model, you may find yourself creating a lot of those. distributed among different files, etc. and your code has to extend or implement many different interfaces in order to access them. I found a very simple solution. as part of jPOS-EE eecore module build, we search for *.k files and create a single org.jpos.ee.Constants file that you can rely to be there. So you write things like: Context.k


public static final String REQUEST = "REQUEST"
public static final String RESPONSE = "RESPONSE";
public static final String TERMINAL = "TERMINAL";
...
...

ErrorCode.k

  public static final String OK = "ok";
public static final String INVALID _ISSUER = "invalid.issuer";
public static final String INVALID_TERMINAL = "invalid.terminal";
...
...

that would create an interface org.jpos.ee.Constants like this:

package org.jpos.ee;
public interface Constants {
public static final String REQUEST = "REQUEST"
public static final String RESPONSE = "RESPONSE";
public static final String TERMINAL = "TERMINAL";
public static final String OK = "ok";
public static final String INVALID _ISSUER = "invalid.issuer";
public static final String INVALID_TERMINAL = "invalid.terminal";
}

We do the same with *.p files, we create a single org/jpos/ee/Constants.properties, so you can write something like this:

#
# defined in modules/mymodules/src/org/jpos/myapp/MyErrors.p
#
ok = 00 APPROVED
invalid.terminal = 14 INVALID TERMINAL
...
...

There's also a handy class called org.jpos.ee.K that implements Constants and give you access to the Constants.properties ResourceBundle by using code like this:

  String message = K.get (K.OK);  // would give you a "00 APPROVED"

PS.- Sorry to disappoint you... no fancy doclet processing here... this is just a very simple build patch that happens to do what I need. I hope you find it useful.

ReplicatedSpace

· One min read
Alejandro Revilla
jPOS project founder

/by apr/ An experimental prototype version of the long awaited ReplicatedSpace is out. You can read about it in jPOS-EE documentation (see Experimental chapter). We are very excited about the posibilities that components like this open to jPOS applications and we are looking forward to get your feedback and ideas about how to improve what we already have.

jPOS Training / Montevideo

· One min read
Alejandro Revilla
jPOS project founder

/by apr/ jPOS Training/Montevideo is over, we managed to cover our schedule and even had some time to have some beers, wine, grappas and chivitos. We had the great honor to host world class developers - coming from North America, South Africa - traveling almost 30 hours to come to our training, we really appreciate that guys! We also had the chance to share some experiences and we got to know about some impressive products (such as kiosks, mobile payments, etc) that either rely or will rely on jPOS for exiting mission critical applications. jPOS TrainingjPOS TrainingjPOS TrainingjPOS TrainingjPOS Training We expect to come to a city near you the next time. Update: added trackback to Jeff's blog which has some beautiful panorama pictures of Montevideo.

jPOS HA Service

· 2 min read
Alejandro Revilla
jPOS project founder

/by apr/ jPOS High Availability Service can be used to create a cluster of nodes where one of the nodes is used as a MASTER and the other(s) as SLAVE(S). A typical setup involves jPOS HA taking responsibility for standing-in with a virtual IP address in the cluster. In addition to providing peace of mind to your jPOS-EE installation, the HA Service has proven to be extremely useful when rolling out new software versions in a production environment, you roll it on a slave, then just disconnect the master, the slave becomes the new master running the new software. Should something go wrong, you re-connect the old master and disconnect the new one, that's something you can even do at the RJ45 patchbox level, which may be faster than typing commands under high pressure. jPOS-EE documentation has been updated and the jPOS-HA module is available for download . We have to thank Dave for his work in this module and for deploying it in several mission critical systems under his control. Dave is now enjoying a well deserved vacation in Europe, certainly confident that should something goes wrong with a master node, the slave will pick up the load ... he may be also crossing his fingers ... just in case ... Smiley

jPOS-EE miniGL module

· One min read
Alejandro Revilla
jPOS project founder

/by apr/ We've made some minor changes to miniGL in order to integrate it as a jPOS-EE module. GLSession now have a few new constructors that accept a DB object, so we can reuse DB's Hibernate session. In addition miniGL's configuration has been adapted to jPOS-EE-SDK naming convention (see modules/minigl/cfg). This module depends on the following modules:

  • hibernate
  • hibernate_xxx
  • eecore

Status Monitor

· One min read
Alejandro Revilla
jPOS project founder

/by apr/ There's a new QBean in eecore called org.jpos.ee.status.Monitor. It has an easy to extend interface:

 public interface MonitorTask {
public String checkService ();
}

that can be used to monitor different kind of services. We just have a pseudo-Ping implementation so far, but we plan to add monitoring capabilities for other services, both external (http, ftp, smtp, etc.) as well as internals (channels, muxes, servers). The configuration is very simple too:

<monitor class='org.jpos.ee.status.Monitor' logger='Q2'>
<monitor id='webserver jPOS.org Web server' delay='15000' period='180000'>
<class>org.jpos.ee.status.Ping</class>
<property name='host' value='www.jpos.org' />
<property name='port' value='80' />
</monitor>

<monitor id="secureserver jPOS.org Secure Web server"
delay='20000' period='180000'>
<class>org.jpos.ee.status.Ping</class>
<property name='host' value='www.jpos.org' />
<property name='port' value='443' />
</monitor>
...
...
</monitor>

Here is a live demo (login with user 'guest', password 'guest'). Several modules have been updated, so you may want to call

  ant update
ant setup

In addition, the documentation has been updated, you may want to fetch a new copy. If you find this useful and you plan to use it, please consider contributing some MonitorTask implementations.

jPOS-EE QCluster

· One min read
Alejandro Revilla
jPOS project founder

/by apr/ There's a new experimental jPOS-EE module called QCluster that can be used to manage Q2 farms. Although this is just an alpha version, stuff like this will enable the creation of web based configuration wizards usable by average operators for common tasks such as creating new servers, restarting channels and the like. QCluster There's a new section in the experimental chapter of jPOS-EE-SDK document. The module source can be found in the usual place.