portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dennis Dam (JIRA)" <jetspeed-...@portals.apache.org>
Subject [jira] Updated: (JS2-692) Fragment ids are not automatically created, causing runtime errors
Date Mon, 18 Jun 2007 07:59:26 GMT

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

Dennis Dam updated JS2-692:
---------------------------

    Attachment: castor-page-manager.patch

This patch addresses several things:

- automatic ID generation for fragments
- update to latest Cstor version (1.1.1)
- performance improvements for Castor filesystem page manager

The automatic ID generation was solved by specifying the ID field as a constructor argument
for the FragmentImpl class in the Castor page mapping file. If the ID is null or empty, a
new ID is generated, in a similar way as the JetspeedIDGenerator generates IDs.

To be able to use constructor arguments, I had to switch to the latest version of Castor (1.1.1).
The only change I had to make to make the new version work is remove the jetspeed namespaces
when parsing PSML pages. This is ok, because previously namespaces were also ignored. On a
side note , it might be "cleaner" to just support the namespaces, because the namespaces are
specified in most / all PSML files within Jetspeed, but I was afraid it might break customer
implementations if we make the namespace mandatory. 

About the performance improvements, unmarshalling / marshalling PSML pages should be a lot
faster than before. I tested it on my local machine by creating 1000 pages first and then
reading them in again, in between resetting the test environment. Unmarshalling took 1.3 seconds,
with the old version it took about 2.4 seconds.
What I did basically was applying some performance best practices from the Castor website,
and remove some deprecated code ( replacing old SAX 1 DocumentHandlers with SAX 2 ContentHandlers)




> Fragment ids are not automatically created, causing runtime errors
> ------------------------------------------------------------------
>
>                 Key: JS2-692
>                 URL: https://issues.apache.org/jira/browse/JS2-692
>             Project: Jetspeed 2
>          Issue Type: Bug
>          Components: PSML
>    Affects Versions: 2.1.1
>            Reporter: David Sean Taylor
>            Assignee: David Sean Taylor
>             Fix For: 2.1.1
>
>         Attachments: castor-page-manager.patch
>
>
> When deploying PSML pages, it is currently required to enter unique ids for each fragment
in the PSML file.
> This is an error prone process. If a fragment id is not supplied, the following stacktrace
occurs in the browser:
> java.lang.StackOverflowError
> 	java.util.regex.Pattern.atom(Pattern.java:1863)
> 	java.util.regex.Pattern.sequence(Pattern.java:1743)
> 	java.util.regex.Pattern.expr(Pattern.java:1687)
> 	java.util.regex.Pattern.compile(Pattern.java:1397)
> 	java.util.regex.Pattern.<init>(Pattern.java:1124)
> 	java.util.regex.Pattern.compile(Pattern.java:817)
> 	java.lang.String.split(String.java:2103)
> 	java.lang.String.split(String.java:2145)
> 	org.apache.jetspeed.util.Path.parsePathSegments(Path.java:116)
> 	org.apache.jetspeed.util.Path.<init>(Path.java:100)
> 	org.apache.jetspeed.util.Path.getSubPath(Path.java:253)
> 	org.apache.jetspeed.util.Path.getChild(Path.java:447)
> 	org.apache.jetspeed.decoration.BaseDecoration.getResource(BaseDecoration.java:125)
> 	org.apache.jetspeed.decoration.BaseDecoration.getStyleSheet(BaseDecoration.java:180)
> 	org.apache.jetspeed.decoration.PageTheme.setupFragmentDecorations(PageTheme.java:90)
> 	org.apache.jetspeed.decoration.PageTheme.setupFragmentDecorations(PageTheme.java:125)
> 	org.apache.jetspeed.decoration.PageTheme.setupFragmentDecorations(PageTheme.java:125)
> ...
> This bug fix will make fragment ids optional on deploy, and automatically create the
ids if they do not exist.

-- 
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: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


Mime
View raw message