Hi,
This is not a solution, but a workaround for your specific issue: since
it's your custom factory, use a character different than newline to
separate the lines.  Any token you want...

As I said, not a complete solution, and not an answer to your question
on whether nested <parameter> tags will be an option or not.  (I
personally don't have the time to work on that).

Yoav Shapira http://www.yoavshapira.com


>-----Original Message-----
>From: Jacob Kjome [mailto:[EMAIL PROTECTED]
>Sent: Saturday, November 27, 2004 12:53 AM
>To: [EMAIL PROTECTED]
>Subject: issue with <Resource> differences between 5.0.xx and 5.5.x
>
>
>I created a custom resource factory for Tomcat which works great in
>5.0.xx.  However, I'm having an issue with the new configuration 5.5.x
>where all config is done via attributes rather than as nested
<parameter>
>elements.  Basically, I've got a parameter of which the value needs to
>include newlines as it is really a set of properties to be loaded into
a
>java.util.Properties object and this simply doesn't work if the config
is
>provided as an attribute.  I didn't expect this to work, but I made an
>attempt and verified that it didn't.  Here it is....
>
><Resource name="jdo/kodoJDO" auth="Container"
>type="javax.resource.cci.ConnectionFactory"
>
>factory="com.mycompany.container.jdo.JDOHelperWrapperJNDIFactory"
>               config="kodo.LicenseKey: [some license key]
>                       javax.jdo.PersistenceManagerFactoryClass:
>kodo.jdbc.runtime.JDBCPersistenceManagerFactory
>                       javax.jdo.option.ConnectionURL:
>jdbc:oracle:thin:@somedomain.com:1521:somedb
>                       javax.jdo.option.ConnectionDriverName:
>oracle.jdbc.driver.OracleDriver
>                       javax.jdo.option.ConnectionUserName: username
>                       javax.jdo.option.ConnectionPassword: password
>                       javax.jdo.option.Optimistic: true
>                       javax.jdo.option.RetainValues: true
>                       javax.jdo.option.NontransactionalRead: true
>                       kodo.jdbc.Schemas: SOMESCHEMA"/>
>
>This is supposed to configure a Kodo JDO connection factory to be
accessed
>via JNDI (mimicking more standard mechanisms in full J2EE
>servers).  However, using this config in Tomcat-5.5.4 results in Kodo
>saying that the property "javax.jdo.PersistenceManagerFactoryClass" is
>missing and must be specified.  Well, I've obviously attempted to
specify
>it above (along with many others).  It just can't deal with the
newlines in
>the attribute.  How do I get around this?  Is there an option for
nested
>parameters defined by XML elements rather than attributes like in
>Tomcat-5.0.xx?  Here's the equivalent config that works perfectly well
>under Tomcat-5.0.xx....
>
><Resource name="jdo/nbsJDO" auth="Container"
>                 type="javax.resource.cci.ConnectionFactory"/>
>     <ResourceParams name="jdo/nbsJDO">
>         <parameter>
>             <name>factory</name>
>
><value>com.mycompany.container.jdo.JDOHelperWrapperJNDIFactory</value>
>         </parameter>
>         <parameter>
>             <name>config</name>
>             <value>
>             kodo.LicenseKey: [some license key]
>             javax.jdo.PersistenceManagerFactoryClass:
>kodo.jdbc.runtime.JDBCPersistenceManagerFactory
>             javax.jdo.option.ConnectionURL:
>jdbc:oracle:thin:@somedomain.com:1521:somedb
>             javax.jdo.option.ConnectionDriverName:
>oracle.jdbc.driver.OracleDriver
>             javax.jdo.option.ConnectionUserName: username
>             javax.jdo.option.ConnectionPassword: password
>             javax.jdo.option.Optimistic: true
>             javax.jdo.option.RetainValues: true
>             javax.jdo.option.NontransactionalRead: true
>             kodo.jdbc.Schemas: SOMESCHEMA
>             </value>
>         </parameter>
>     </ResourceParams>
>
>Please don't tell me to implement each of these properties as config
>attributes of the <Resource> element.  The properties are free-form and
>there are many more possible, quite a few of them kodo-specific that I
>would like to be able to add without having to modify the custom
resource
>factory constantly.  It is vastly simpler to be able to load all this
stuff
>up in a Properties object which is what Kodo expects anyway for
>configuration.
>
>I can understand why the whole <Resource> + <ResourceParams> +
<parameter>
>was eschewed in favor of less verbose attributes, but attributes don't
>offer all the functionality of the nested elements.  Can nested
<parameter>
>elements be an option for Tomcat-5.5.x's <Resource> config?
>
>thanks,
>
>
>Jake
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]




This e-mail, including any attachments, is a confidential business 
communication, and may contain information that is confidential, proprietary 
and/or privileged.  This e-mail is intended only for the individual(s) to whom 
it is addressed, and may not be saved, copied, printed, disclosed or used by 
anyone else.  If you are not the(an) intended recipient, please immediately 
delete this e-mail from your computer system and notify the sender.  Thank you.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to