[Hibernate-JIRA] Created: (HHH-6442) JarVisitorFactory is reconstructing URLs without the URLStreamHandler association
by Andrew Lee Rubinger (JIRA)
JarVisitorFactory is reconstructing URLs without the URLStreamHandler association
---------------------------------------------------------------------------------
Key: HHH-6442
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-6442
Project: Hibernate Core
Issue Type: Bug
Components: entity-manager
Affects Versions: 4.0.0.Beta3
Reporter: Andrew Lee Rubinger
Problem in:
https://github.com/ALRubinger/hibernate-core/blob/master/hibernate-entity...
URLs, in order to be opened, must have an associated stream handler for a known protocol. In the case that the protocol is not handled by Java built-in, the handler must either be attached to the URL instance or able to be looked up through the (IMO horribly designed) URL handler registration process.
This line reconstructs a URL (which may have the URLStreamHandler association in place) into a new instance, leaving behind the handler in the process. Nonstandard protocols will cease to work, as we now see in this test case from ShrinkWrap, for example:
{code}final URL resource = shrinkWrapClassLoader.getResource(resourceName);
// Great, we already have a working URL.
// Now reconstruct the URL by composition of its pieces
try
{
new URL(resource.getProtocol(), resource.getHost(), resource.getPort(), resource.getFile());
}
catch (final MalformedURLException murle)
{
// Blow up
Assert.fail("Malformed URL should not be received when reconstructing a new URL from pieces of the one we already have");
}{code}
Recommend we fix at the Hibernate level to properly resolve issues such as:
https://issues.jboss.org/browse/ARQ-510
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 8 months
[Hibernate-JIRA] Updated: (HHH-1083) Customization of CREATE TABLE with storage clause etc.
by Steve Ebersole (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1083?page=c... ]
Steve Ebersole updated HHH-1083:
--------------------------------
Fix Version/s: (was: 4.0.0.Beta4)
4.0.0.next
> Customization of CREATE TABLE with storage clause etc.
> ------------------------------------------------------
>
> Key: HHH-1083
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1083
> Project: Hibernate Core
> Issue Type: New Feature
> Components: core
> Reporter: Christian Bauer
> Assignee: Steve Ebersole
> Priority: Minor
> Fix For: 4.0.0.next
>
>
> Currently Hibernate features a hotfix for the MySQLInnoDBDialect:
> public String getTableTypeString() {
> return " type=InnoDB";
> }
> However, this is not the only appendix that is useful for CREATE TABLE. We should do several things:
> - allow appendix for CREATE INDEX, for example, to define the tablespace
> - pass in additional arguments to getTableTypeString(), such as tableName, schemaName, catalogName - for example, to allow custom Dialects to return different tablespaces for particular tables
> - probably rename the getTableTypeString() method to getTableAppendixString() and getIndexAppendixString()
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 8 months