RE: [JBoss-user] XML Object persistence

2002-05-22 Thread Андрей Онищук

Can you please explain me detailed?
What means - declare? In ejb-jar.xml?
What kind of translations I need to do in my ejbStore/ejbLoad? You told me about of 
using JDBC to store specified field byself, not by Bean Provider on anything else?
Can you show me your things on little example, please?
 
> 
> Probably the easiest way to do this is to declare the CMP field as a 
> String and do the XML translation yourself in ejbStore/ejbLoad.
> 
> >  It is possible to get this feature in Jboss for now.
> > I use Jboss 3.0.1 RC1 / Tomcat 4.03
> > 
> > Few of my entity beans have complicated fields 
> presented by different classes.
> > This classes have all methods to interact as XML. 
> (importXml, exportXml)
> > By default JAWS store it as BLOB in my Database, but I 
> want to store it as XML.
> > I use Oracle9I and this feture is very important for my project.
> > 
> > I can't find how to do it.
> > Can anyone help me?

Thanks

___

Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm

___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



RE: [JBoss-user] XML Object persistence

2002-05-22 Thread Андрей Онищук

> I can tell you that it is unlikely that you feature will make it into 
> JAWS, or any new features.
> 
> Can you tell me more about this XML storage?  What is 
> involved required 
> to store the XML?  A small code examples would help.  If it is not to 
> difficult or Oracle specific, it may make it into a release sooner 
> rather then later.
It is possible to use Castor for this feature or in my case I use simple DOM parsing.
For example:
--- cut ---
package jo.app.core.util;

import org.w3c.dom.*;
import javaz.xml.*;
import java.util.*;

/**

public class ScheduleModel implements XmlExternalizable, java.io.Serializable {

  private int method = 0;

  private Date startDate = new Date();

  private int workDays = 0;

  private int holiDays = 0;

  private boolean[] weekSet = new boolean[7];

/*
set of getters/setters
*/

  public Element exportXml(Document document) throws java.lang.Exception {
Element root = document.createElement("schedule");
root.setAttribute("method", Integer.toString(method));
if(method==0) {
  Element sd = new XmlDate(startDate.getTime()).exportXml(document);
  root.appendChild(sd);
  root.setAttribute("workdays", Integer.toString(workDays));
  root.setAttribute("holydays", Integer.toString(holiDays));
} else if(method==1) {
  for(int i=0; i<7; i++) {
Element day = document.createElement("day");
day.setAttribute("index", Integer.toString(i));
day.setAttribute("workday", (new Boolean(weekSet[i])).toString());
root.appendChild(day);
  }
}
return root;
  }

  public void importXml(Element root) throws java.lang.Exception {

int methodTemp = -1;
try {
  methodTemp = Integer.parseInt(root.getAttribute("method"));
} catch(Throwable th) { return; }

if(methodTemp == 0) {
  method = 0;
  XmlDate date = new XmlDate();
  date.importXml((Element)root.getElementsByTagName("date").item(0));
  startDate = date;
  workDays = Integer.parseInt(root.getAttribute("workdays"));
  holiDays = Integer.parseInt(root.getAttribute("holidays"));
} else
if(methodTemp == 1) {
  method = 1;
  NodeList nl = root.getElementsByTagName("day");
  for(int i=0; i
jo.app.core.util.ScheduleModel
JAVA_OBJECT
CLOB

jo.app.core.util.ScheduleModelObjectFactory

jo.app.core.util.ScheduleModelStateFactory
 

How do you think?

> 
> -dain
> 
> áÎÄÒÅÊ ïÎÉÝÕË wrote:
> 
> > Hello All.
> > 
> >  It is possible to get this feature in Jboss for now.
> > I use Jboss 3.0.1 RC1 / Tomcat 4.03
> > 
> > Few of my entity beans have complicated fields 
> presented by different classes.
> > This classes have all methods to interact as XML. 
> (importXml, exportXml)
> > By default JAWS store it as BLOB in my Database, but I 
> want to store it as XML.
> > I use Oracle9I and this feture is very important for my project.
> > 
> > I can't find how to do it.
> > Can anyone help me?
> > 
> > Thanks
> > 
> > ___
> > Hundreds of nodes, one monster rendering program.
> > Now that's a super model! Visit http://clustering.foundries.sf.net/
> > 
> > ___
> > JBoss-user mailing list
> > [EMAIL PROTECTED] 
> > https://lists.sourceforge.net/lists/listinfo/jboss-user
> > 
> 
> 
> 
> ___
> Hundreds of nodes, one monster rendering program.
> Now that's a super model! Visit http://clustering.foundries.sf.net/
> 
> ___
> JBoss-user mailing list
> [EMAIL PROTECTED] 
> https://lists.sourceforge.net/lists/listinfo/j> boss-user
> 

___

Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm

___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



Re: [JBoss-user] XML Object persistence

2002-05-21 Thread Burkhard Vogel

Hi,
I guess you are using CMP, and moreover I guess you are on JBoss3... (Your
OS and JDK I can't really guess). So what you can do is modify the
JDBC-mapping to store your java.lang.Object/String/whatever to a specific
database type (Is there a xml-type in Oracle??)
On the other hand, if you are looking for a database to xml-mapping tool
have a look at jaxme.sf.net.
Regards,
Burkhard
- Original Message -
From: "áÎÄÒÅÊ ïÎÉÝÕË" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, May 20, 2002 8:03 AM
Subject: [JBoss-user] XML Object persistence


Hello All.

 It is possible to get this feature in Jboss for now.
I use Jboss 3.0.1 RC1 / Tomcat 4.03

Few of my entity beans have complicated fields presented by different
classes.
This classes have all methods to interact as XML. (importXml, exportXml)
By default JAWS store it as BLOB in my Database, but I want to store it as
XML.
I use Oracle9I and this feture is very important for my project.

I can't find how to do it.
Can anyone help me?

Thanks

___
Hundreds of nodes, one monster rendering program.
Now that's a super model! Visit http://clustering.foundries.sf.net/

___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



___

Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm

___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



Re: [JBoss-user] XML Object persistence

2002-05-20 Thread Dan Christopherson

Probably the easiest way to do this is to declare the CMP field as a 
String and do the XML translation yourself in ejbStore/ejbLoad.

-danch

áÎÄÒÅÊ ïÎÉÝÕË wrote:
> Hello All.
> 
>  It is possible to get this feature in Jboss for now.
> I use Jboss 3.0.1 RC1 / Tomcat 4.03
> 
>   Few of my entity beans have complicated fields presented by different classes.
>   This classes have all methods to interact as XML. (importXml, exportXml)
>   By default JAWS store it as BLOB in my Database, but I want to store it as XML.
>   I use Oracle9I and this feture is very important for my project.
> 
> I can't find how to do it.
> Can anyone help me?
> 
> Thanks
> 
> ___
> Hundreds of nodes, one monster rendering program.
> Now that's a super model! Visit http://clustering.foundries.sf.net/
> 
> ___
> JBoss-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-user
> 



-- 

=
Disclaimer:
All statements are my own, personal opinions and have nothing to do
with the opinions of employer, wife, or cat. They may not have anything
to do with objective reality, as a matter of fact. Your Milage May Vary, 
Excludes Delivery Charges, etc.
=


___

Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm

___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



Re: [JBoss-user] XML Object persistence

2002-05-20 Thread Dain Sundstrom

I can tell you that it is unlikely that you feature will make it into 
JAWS, or any new features.

Can you tell me more about this XML storage?  What is involved required 
to store the XML?  A small code examples would help.  If it is not to 
difficult or Oracle specific, it may make it into a release sooner 
rather then later.

-dain

áÎÄÒÅÊ ïÎÉÝÕË wrote:

> Hello All.
> 
>  It is possible to get this feature in Jboss for now.
> I use Jboss 3.0.1 RC1 / Tomcat 4.03
> 
>   Few of my entity beans have complicated fields presented by different classes.
>   This classes have all methods to interact as XML. (importXml, exportXml)
>   By default JAWS store it as BLOB in my Database, but I want to store it as XML.
>   I use Oracle9I and this feture is very important for my project.
> 
> I can't find how to do it.
> Can anyone help me?
> 
> Thanks
> 
> ___
> Hundreds of nodes, one monster rendering program.
> Now that's a super model! Visit http://clustering.foundries.sf.net/
> 
> ___
> JBoss-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-user
> 



___
Hundreds of nodes, one monster rendering program.
Now that's a super model! Visit http://clustering.foundries.sf.net/

___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



[JBoss-user] XML Object persistence

2002-05-20 Thread Андрей Онищук

Hello All.

 It is possible to get this feature in Jboss for now.
I use Jboss 3.0.1 RC1 / Tomcat 4.03

Few of my entity beans have complicated fields presented by different classes.
This classes have all methods to interact as XML. (importXml, exportXml)
By default JAWS store it as BLOB in my Database, but I want to store it as XML.
I use Oracle9I and this feture is very important for my project.

I can't find how to do it.
Can anyone help me?

Thanks

___
Hundreds of nodes, one monster rendering program.
Now that's a super model! Visit http://clustering.foundries.sf.net/

___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user