Unnamed module and duplicate package

Alex Buckley alex.buckley at oracle.com
Fri Mar 11 21:31:52 UTC 2016


On 3/11/2016 7:31 AM, David M. Lloyd wrote:
> On 03/11/2016 09:23 AM, Alan Bateman wrote:
>>
>> On 11/03/2016 14:52, David M. Lloyd wrote:
>>>
>>> What about javax.transaction.xa?  Ideally we won't just throw that
>>> into some unnamed module right?
>>>
>>> With it being a part of java.sql though, it's going to be pretty tough
>>> to separate out.  Can it not at least be its own module which can be
>>> upgraded in a consistent way with java.transaction? I guess it's just
>>> not clear to me how this is going to work.  From my perspective, it
>>> would be at the least more organizationally convenient to treat all
>>> the SE+EE modules in the same way.
>> The proposal is for the java.sql module to own and export
>> javax.transaction.xa. You'll see it in the summary table that I linked
>> to in the mail.
>>
>> On the surface then it might look odd but we've explored many options.
>> The good news is that javax.transaction.xa is slow moving, I'm not aware
>> of any changes in 10+ years. We have of course discussed this with the
>> relevant spec leads in the JCP and we of course understand that it
>> requires a bit of coordination in the event that JSR 907 decides some
>> day to update something in the xa package.
>
> OK, it just seems odd since javax.transaction.xa has no dependencies on
> anything and thus would seem to be a good candidate to be its own
> module.  This would solve the problem for all time, so it's not really
> clear why that couldn't or shouldn't be done.

A type in the java.sql module (javax.sql.XAConnection) returns a 
javax.transaction.xa.* type. Therefore, the java.sql module would have 
to depend on the tiny new module containing the javax.transaction.xa 
package. The java.sql module is mapped to the bootstrap loader, so the 
the tiny new module would have to be mapped to the bootstrap loader too. 
That means it's not upgradeable, so there's little benefit in carving it 
out at this time.

The mapping of java.sql to the bootstrap loader also explains why the 
javax.transaction.xa package hasn't been placed in the tiny existing 
module java.transaction. Said module has been moved out of the bootstrap 
loader, as part of the work to move java.corba out of the bootstrap loader.

tl;dr JDBC is a substantial shareholder in the javax.transaction.xa package.

Alex


More information about the jigsaw-dev mailing list