[mod_cluster-issues] [JBoss JIRA] (MODCLUSTER-142) Use UUID for auto-generated jvmRoute
Michal Babacek (JIRA)
issues at jboss.org
Fri Aug 8 06:29:33 EDT 2014
[ https://issues.jboss.org/browse/MODCLUSTER-142?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Michal Babacek closed MODCLUSTER-142.
-------------------------------------
Closing. Clean-up.
At least one of the following applies:
* the issue has been thoroughly tested as a part of one of the current releases
or
* it hasn't occurred in ~2 years
or
* it's utterly harmless
> Use UUID for auto-generated jvmRoute
> ------------------------------------
>
> Key: MODCLUSTER-142
> URL: https://issues.jboss.org/browse/MODCLUSTER-142
> Project: mod_cluster
> Issue Type: Feature Request
> Security Level: Public(Everyone can see)
> Affects Versions: 1.1.0.CR1
> Reporter: Paul Ferraro
> Assignee: Paul Ferraro
> Fix For: 1.1.0.CR2
>
>
> Currently, auto-generated jvm-routes are of the form: bind-address:port:engine-name
> This exposes internal addresses/ports and is not appropriate for production systems.
> To fix that, we can use UUIDs.
> e.g.
> InetAddress connectorAddress;
> int connectorPort;
> String engineName;
> int addressBytes = connectorAddress.getAddress().length;
> int intBytes = Integer.SIZE / Byte.SIZE;
> int charBytes = Character.SIZE / Byte.SIZE;
> ByteBuffer buffer = ByteBuffer.allocate(addressBytes + intBytes + (engineName.length() * charBytes));
> buffer.put(connectorAddress.getAddress());
> buffer.putInt(connectorPort);
> buffer.asCharBuffer().put(engine);
> String jvmRoute = UUID.nameUUIDFromBytes(buffer.array()).toString();
> I can think of 2 disadvantages:
> 1. UUID jvm-routes will be, on average, longer than the current default, i.e. 36 characters as opposed to ~28. Not a significant difference there.
> 2. For development, exposing the address and port via the jvm route might be useful. To satisfy this requirement, we can make the use of UUIDs configurable.
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
More information about the mod_cluster-issues
mailing list