You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by "David Jencks (JIRA)" <de...@geronimo.apache.org> on 2005/11/16 03:41:28 UTC

[jira] Reopened: (GERONIMO-1175) Schema conversion problems in geronimo plans

     [ http://issues.apache.org/jira/browse/GERONIMO-1175?page=all ]
     
David Jencks reopened GERONIMO-1175:
------------------------------------


There seem to be more problems.  This fixes one of them
Sending        modules/j2ee-schema/src/java/org/apache/geronimo/schema/NamespaceElementConverter.java
Transmitting file data .
Committed revision 344849.

> Schema conversion problems in geronimo plans
> --------------------------------------------
>
>          Key: GERONIMO-1175
>          URL: http://issues.apache.org/jira/browse/GERONIMO-1175
>      Project: Geronimo
>         Type: Bug
>   Components: deployment
>     Versions: 1.0
>     Reporter: David Jencks
>     Assignee: David Jencks
>      Fix For: 1.0

>
> Two similar and somewhat interrelated problems:
> 1. GenericToSpecificPlanConverter converts all the elements inside gbean elements to the new namespace, including contents of xml-attributes and xml-references, which thus lose their namespace info.
> 2. GBeanElementConverter doesn't convert the namespace of xml-attribute and xml-reference elements.
> Thanks to Jian Liao for discovering these problems

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Re: [jira] Reopened: (GERONIMO-1175) Schema conversion problems in geronimo plans

Posted by Jian Liao <no...@gmail.com>.
Hi dj,
There is some problems in GBeanElementConverter, too.

org.apache.geronimo.schema.GBeanElementConverter.

if (GERONIMO_SERVICE_NAMESPACE.equals(cursor.getName().getNamespaceURI())) {
//already has correct schema, exit
return;
}

It should not return here. It should consume the whole gbean element and
make the cursor navigate to </gbean>

For example, take a look at the comment in the following xml:

<?xml version="1.0"?>
<web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-1.0"
configId="org/apache/jetspeed/web">
<context-priority-classloader>false</context-priority-classloader>
<container-config>
<tomcat xmlns="http://geronimo.apache.org/xml/ns/j2ee/web/tomcat/config-1.0
">
<cross-context/>
<tomcat-realm>TomcatJAASRealm</tomcat-realm>
</tomcat>
</container-config>
<resource-ref>
<ref-name>jdbc/DB1</ref-name>
<target-name>DefaultDatabase</target-name>
</resource-ref>
<security-realm-name>jetspeed-realm</security-realm-name>
<security>
<default-principal>
<principal class="org.apache.jetspeed.security.impl.UserPrincipalImpl"
name="guest"/>
</default-principal>
<role-mappings>
<role role-name="admin">
<principal class="org.apache.jetspeed.security.impl.RolePrincipalImpl"
name="admin" designated-run-as="true"/>
</role>
</role-mappings>
</security>
<!-- When cursor comes to here, the GBeanElementConverter will be called, it
should consume the whole gbean element, otherwise the
GenericToSpecificPlanConverter will convert the sub-element in gbean into
tom prefix. -->
<gbean name="jetspeed-realm" class="
org.apache.geronimo.security.realm.GenericSecurityRealm">
<attribute name="realmName">jetspeed-realm</attribute>
<xml-reference name="LoginModuleConfiguration">
<lc:login-config xmlns:lc="http://geronimo.apache.org/xml/ns/loginconfig-1.0
">
<lc:login-module control-flag="REQUIRED" server-side="true">
<lc:login-domain-name>jetspeed-realm</lc:login-domain-name>
<lc:login-module-class>org.apache.jetspeed.security.impl.DefaultLoginModule
</lc:login-module-class>
</lc:login-module>
</lc:login-config>
</xml-reference>
<reference name="ServerInfo">
<module>org/apache/geronimo/System</module>
<name>ServerInfo</name>
</reference>
<reference name="LoginService">
<name>JaasLoginService</name>
</reference>
</gbean>
</web-app>

Correct me if I am wrong.:-)

-Jian Liao

On 11/16/05, David Jencks (JIRA) <dev@geronimo.apache.org > wrote:
>
> [ http://issues.apache.org/jira/browse/GERONIMO-1175?page=all ]
>
> David Jencks reopened GERONIMO-1175:
> ------------------------------------
>
>
> There seem to be more problems. This fixes one of them
> Sending
> modules/j2ee-schema/src/java/org/apache/geronimo/schema/NamespaceElementConverter.java
>
> Transmitting file data .
> Committed revision 344849.
>
> > Schema conversion problems in geronimo plans
> > --------------------------------------------
> >
> > Key: GERONIMO-1175
> > URL: http://issues.apache.org/jira/browse/GERONIMO-1175
> > Project: Geronimo
> > Type: Bug
> > Components: deployment
> > Versions: 1.0
> > Reporter: David Jencks
> > Assignee: David Jencks
> > Fix For: 1.0
>
> >
> > Two similar and somewhat interrelated problems:
> > 1. GenericToSpecificPlanConverter converts all the elements inside gbean
> elements to the new namespace, including contents of xml-attributes and
> xml-references, which thus lose their namespace info.
> > 2. GBeanElementConverter doesn't convert the namespace of xml-attribute
> and xml-reference elements.
> > Thanks to Jian Liao for discovering these problems
>
> --
> This message is automatically generated by JIRA.
> -
> If you think it was sent incorrectly contact one of the administrators:
> http://issues.apache.org/jira/secure/Administrators.jspa
> -
> For more information on JIRA, see:
> http://www.atlassian.com/software/jira
>
>