axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andreas Veithen (JIRA)" <j...@apache.org>
Subject [jira] Reopened: (AXIS2-4527) Axis2 UUIDGenerator does not create Standard (ISO/IEC 11578:1996) conform UUIDs
Date Thu, 20 May 2010 21:11:17 GMT

     [ https://issues.apache.org/jira/browse/AXIS2-4527?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Andreas Veithen reopened AXIS2-4527:
------------------------------------


Several comments here:

1. There is a piece of code in LifecycleManagerImpl saying this:

        // Generate unique id.  The UUID generator is used so that we can limit
        // synchronization with the java random number generator.
        String id = UUIDGenerator.getUUID();

UUID.randomUUID() invokes a synchronized method on a SecureRandom object held in a static
attribute. Assuming that the comment shown above is accurate/relevant, r939925 would introduce
a regression.

2. Unfortunately, UUIDGenerator is used in many places to generate unique IDs, even if there
is no requirement to base them on UUIDs (in the sense of the ISO standard cited by Bastian).
Example:

mimeBoundary = "MIMEBoundary" + UUIDGenerator.getUUID().replace(':', '_');

r939925 changes the format of the ID returned by UUIDGenerator.getUUID(), which now contains
dashes. There is a risk that this breaks existing (poorly written) code because '-' may be
a forbidden character in the context where UUIDGenerator.getUUID() is used.

3. UUIDGenerator has a very poorly defined interface: its name suggests that it returns UUIDs,
it attempts to constructs URNs with a uuid NID, but it neither returns one nor the other (before
r939925).

Therefore, my suggestion is to revert r939925, deprecate the whole UUIDGenerator stuff and
replace it by a new, well defined utility class that is able to produce unique/random identifiers
of various kinds (UUIDs, MIME content IDs, MIME boundaries) that respect the relevant standards
(see also the TODO item in [1]) and makes an appropriate compromise between overhead, uniqueness
and randomness. E.g. the uniqueness requirements for a MIME content ID are much weaker than
for a UUID and can easily be satisfied in a thread safe way without any synchronization.

[1] http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/om/impl/OMStAXWrapper.java?view=diff&r1=793344&r2=793345&pathrev=793345

> Axis2 UUIDGenerator does not create Standard (ISO/IEC 11578:1996) conform UUIDs
> -------------------------------------------------------------------------------
>
>                 Key: AXIS2-4527
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4527
>             Project: Axis2
>          Issue Type: Bug
>          Components: kernel
>    Affects Versions: 1.5
>         Environment: Java 1.6.0_13, Windows
>            Reporter: Bastian Ibach
>
> UUIDs generated with Axis2 Util UUIDGenerator have the form
> urn:uuid:16F37BAAB5ADE4B10F1255435492771
> This is not conform to the Standard (ISO/IEC 11578:1996) and these UUID are rejected
by e.g. Windows Clients etc.
> A Standard conform UUID would look like:
> urn:uuid:fddc7dc5-837b-443c-8ae7-7e715bab8666
> Please fix this bug! Java includes a UUID Class, with produces Standard conform UUID
of the form fddc7dc5-837b-443c-8ae7-7e715bab8666 for Webservice use one must only add urn:uudi:
befor the generated Number

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


Mime
View raw message