Comments (5)
@ar Could you see the updated commit demsey/jPOS@7d1dbe463?
Unfortunately, I already know why it is still not ready for the public repository - My solution breaks the possibility of using different TLV sizes (tag, length) in the packager configuration. It only supports fixed T=2
, L=3
(which suits me)
To solve this, more radical action is needed. Introduction of the tagSize
and lenSize
attributes at the GenericTaggedFieldsPackager
level and abandoning the use of TLV suited packagers in GenericTaggedFieldsPackager
such as org.jpos.iso.IFA_TTLLCHAR
, org.jpos.iso.IFA_TTLLBINARY
in favor of generic org.jpos.iso.IFA_CHAR
, org.jpos.iso.IFA_BINARY
, org.jpos.iso.IFA_BINARY
,
Instead actual
<isofieldpackager
id="48"
length="999"
name="Additional Data Private Use"
class="org.jpos.iso.IFA_LLLCHAR"
tagMapper="org.jpos.iso.packager.TTDecimalTagMapper"
packager="org.jpos.iso.packager.GenericTaggedFieldsPackager">
<isofield
id="1"
length="29"
name="Some ascii value 1"
class="org.jpos.iso.IFA_TTLLCHAR"/>
<isofield
id="2"
length="12"
name="Some binary value 2"
class="org.jpos.iso.IFA_TTLLBINARY"/>
<isofield
id="3"
length="8"
name="Some ascii value 3"
class="org.jpos.iso.IFA_TTLLCHAR"/>
</isofieldpackager>
we get:
<isofieldpackager
id="48"
length="999"
name="Additional Data Private Use"
class="org.jpos.iso.IFA_LLLCHAR"
tagMapper="org.jpos.iso.packager.TTDecimalTagMapper"
tagSize="2", lenSize="2"
packager="org.jpos.iso.packager.GenericTaggedFieldsPackager">
<isofield
id="1"
length="29"
name="Some ascii value 1"
class="org.jpos.iso.IFA_CHAR"/>
<isofield
id="2"
length="12"
name="Some binary value 2"
class="org.jpos.iso.IFA_BINARY"/>
<isofield
id="3"
length="8"
name="Some ascii value 3"
class="org.jpos.iso.IFA_CHAR"/>
</isofieldpackager>
This description is much more consistent (does not allow mixing tag types, that are not allowed in TLV datasets)
Also is possible to introduce swapTagAndLen="true"
attribute to emulate packagers family like org.jpos.iso.IFA_LLTTCHAR
Ultimately, you can get rid of all packagers families like IFA_TTLLCHAR
, IFA_TTLLLCHAR
, IFA_TTTLLLCHAR
, IFA_LLTTCHAR
, IFA_LLLTTCHAR
and so on...
from jpos.
Do you have this solution running? Can you send a PR?
from jpos.
Yes, this solution has been in production since 2016, but we have recently withdrawn to the stock 686be85 commit.
I can clean up the https://github.com/demsey/jPOS/commits/tlvfield branch and make PR.
Any suggestions for class names: org.jpos.tlv.TagMap
, org.jpos.tlv.Tag
?
I think that package org.jpos.tlv
is ok, but I don't like the class names
from jpos.
TagMap
and Tag
look OK to me, we can always change it later and break some code :) :)
from jpos.
I like where this is heading. The swapTagAndLen
would be great, I have TLV and LTV custom implementations here and there. Wonder if you want to commit a work-around the 100% CPU usage issue first, until we can work on this further.
from jpos.
Related Issues (20)
- Base24Channel is not escaping `ETX` bytes at send time. HOT 2
- BitMap seems to be mismatched HOT 5
- Bug of CheckFields.setConfiguration HOT 1
- Any good first issue? HOT 5
- The trailer is unable to sent from Jpos server to the source. HOT 4
- The trailer is not added to the JPOS response. HOT 2
- New POSCapability helper
- Add Q2 switch to exit on failed deploy HOT 7
- Memory Leak in TransactionManager's redeployed participants
- QMUX Sequencing Issue HOT 3
- SimpleKeyFile.getKeys() seems to load the key file for every key.
- Q2.deployElement doesn't write the destination file atomically, which can make the deploy polling to fail HOT 2
- using BERTLVAsciiHexPackager and AsciiHexInterpreter returns incorrect uninterpretLength HOT 5
- Channel Class that wraps the JMS objects HOT 1
- Help validate ARQC using JCESecurityModule HOT 4
- When two Q2 services are connected, the response content cannot be received. HOT 1
- 2.1.9 - Compatibility with JDK8 HOT 1
- Protect name in Track1 of the ISOUtil.protect HOT 5
- About the rotation of q2 logs HOT 4
- ChannelAdaptor potentially unsafe synchronization HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jpos.