[ 
https://issues.apache.org/jira/browse/DERBY-2469?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12503784
 ] 

Luigi Lauro commented on DERBY-2469:
------------------------------------

JNLP Application Example (@David): Yes, I should have explained better how to 
make use of my work in derby.

Let's split it in 2 steps:

A) Enable my StorageFactory with derby: this is where you guys have to help me. 
I really don't know where to start here. I gave it a quick check, but from what 
I've seen, it seems the available factories are somewhat hard-coded into derby, 
and so some tinkering will be needed to get a derby starting using my 
JNLPStorageFactory.

Any help here from someone who knows how to do this, is really appreciated.

B) Setting up a Java Web Start Environment from where to run derby, in order to 
test the factory: unluckily, there is *NO* way to manually load the JNLP APIs 
implementation classes in a non java web start environment.

I first tried to do it myself but got stuck in initializing problems when 
trying to load the PersistenceService implementation classes manually (you can 
read the whole story here: 
http://tech.groups.yahoo.com/group/junit/message/19132 ). Then queried both the 
official sun JNLP forums, and junit users forum, but to no avail.

Therefore the only way I know to test my JNLPStorageFactory is to test it 
inside a real java web start environment.

This means deploying a minimal derby jnlp application for testing. This is very 
easy to do (you only have to 'describe' your application with a xml-like .jnlp 
file, and then open this jnlp file with the java web start plugin), and you can 
check full info/docs/examples here: http://java.sun.com/products/javawebstart/

An example minimal JNLP:

<?xml version="1.0" encoding="UTF-8"?>
<jnlp codebase="http://db.apache.org/derby"/>
  <information>
    <title>Derby</title>
  </information>
  <resources>
    <jar href="derby.jar"/>
  </resources>
  <application-desc main-class="org.apache.derby.impl.MAIN_DERBY_CLASS"/>
</jnlp>

> Java Web Start JNLP PersistenceService API storage support
> ----------------------------------------------------------
>
>                 Key: DERBY-2469
>                 URL: https://issues.apache.org/jira/browse/DERBY-2469
>             Project: Derby
>          Issue Type: New Feature
>          Components: Store
>    Affects Versions: 10.2.2.0
>         Environment: Java Web Start
>            Reporter: Luigi Lauro
>            Assignee: David Van Couvering
>            Priority: Minor
>             Fix For: 10.3.0.0
>
>         Attachments: svn-diff-20070329, svn-diff-20070606
>
>
> I would love to have Derby write/read to the storage area provided by the 
> JNLP PersistenceService API.
> Since Derby is now bundled with the Java6 JDK as JavaDB, I think this  
> integration would go a long way towards making derby more developer- friendly 
> in Java Web Start environments, where using the sandbox tools Sun provides us 
> it the right way to go, instead of working  around it and force the user to 
> give the app the authorization to write on the hard drive IMHO.
> I'm investigating the effort needed to provide an implementation of the 
> WritableStorageFactory interface around the PersistenceService API, and if 
> that's doable in a few days work, I will start working on it and submit a 
> patch for testing/approval ASAP.
> Feel free to volounteer and provide pointers/hints/whatever, it's really 
> appreciate, especially since I currently know nothing of derby internals.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to