[JBoss-user] [Persistence CMP/JBoss] - Re: blob CMP MySQL EJB JBoss3.2 mapping problem

2004-09-23 Thread dblin_xm
CMP

View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=3849218#3849218

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3849218


---
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Persistence CMP/JBoss] - Re: blob CMP MySQL EJB JBoss3.2 mapping problem

2004-06-22 Thread loubyansky
If the default doesn't work, then you have to find out it yourself. Please, let us 
know what worked for you. Thanks.

View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=3839491#3839491

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3839491


---
This SF.Net email sponsored by Black Hat Briefings  Training.
Attend Black Hat Briefings  Training, Las Vegas July 24-29 - 
digital self defense, top technical experts, no vendor pitches, 
unmatched networking opportunities. Visit www.blackhat.com
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Persistence CMP/JBoss] - Re: blob CMP MySQL EJB JBoss3.2 mapping problem

2004-06-21 Thread ebende
If you say default mapping I suppose you mean the one in  
jboss-3.2.2/server/default/conf/standardjbosscmp-jdbc.xml, right?

Well I also had problems with the default mappings for timestamp/datetime. None of the 
listed mappings worked for me.
However, what worked for me is:

JAVA Sql type: TIMESTAMP
Vendor type: datetime (in Mysql)
CMP field: java.sql.Timestamp

which was arranged by my IDE. 

If i'm correct this mapping is not in 
jboss-3.2.2/server/default/conf/standardjbosscmp-jdbc.xml. This one only contains: 

  | java-typejava.sql.Timestamp/java-type
  | jdbc-typeTIMESTAMP/jdbc-type
  | sql-typeTIMESTAMP/sql-type
  | !--
  | | This type is problematical because mysql does not have any
  | | date/time types that store milliseconds. You should avoid it.
  | --
  |  
  |  
  | java-typejava.util.Date/java-type
  | jdbc-typeTIMESTAMP/jdbc-type
  | sql-typeDATETIME/sql-type
  | !--
  | | Note that you lose granularity here
  | | Use a numeric type and store milliseconds if you really need it
  | --
  |  
  |  
  | java-typejava.sql.Date/java-type
  | jdbc-typeDATE/jdbc-type
  | sql-typeDATETIME/sql-type
  |  
  |  
  | java-typejava.sql.Time/java-type
  | jdbc-typeTIME/jdbc-type
  | sql-typeTIME/sql-type
  |  
  | 
  | 
  | As far as BLOBs are concerned, in file 
jboss-3.2.2/server/default/conf/standardjbosscmp-jdbc.xml you have the mapping
  | 
  |  
  |   | java-typejava.lang.Object/java-type
  |   | jdbc-typeBLOB/jdbc-type
  |   | sql-typeLONGBLOB/sql-type
  |   | !--
  |   | | Change this from LONGBLOB to BLOB if you know your
  |   | | serialized object will be = 2^16 bytes
  |   | --
  |   |  
  | 
  | This one doesn't work for me. JBuilderX makes a scheme from the DB as follows:
  | 
  | JAVA Sql type: VARBINARY
  | Vendor type: blob (in Mysql)
  | CMP field: byte[]
  | 
  | When I use this it doesn't work either.
  | 
  | 
  | 
  | The mapping done by the IDE is based on the driver, which is confirmed by the 
MysqlDefs class from Mark Matthew's driver (the official one now):
  | 
  | 
  | Maybe I am misuderstanding something fundamentally.
  | 
  | Any help would be highly appreciated.
  | 
  |   | 
  |   | /*
  |   |Copyright (C) 2002 MySQL AB
  |   | 
  |   |   This program is free software; you can redistribute it and/or modify
  |   |   it under the terms of the GNU General Public License as published by
  |   |   the Free Software Foundation; either version 2 of the License, or
  |   |   (at your option) any later version.
  |   | 
  |   |   This program is distributed in the hope that it will be useful,
  |   |   but WITHOUT ANY WARRANTY; without even the implied warranty of
  |   |   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  |   |   GNU General Public License for more details.
  |   | 
  |   |   You should have received a copy of the GNU General Public License
  |   |   along with this program; if not, write to the Free Software
  |   |   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  |   | 
  |   |  */
  |   | package com.mysql.jdbc;
  |   | 
  |   | import java.sql.Types;
  |   | 
  |   | 
  |   | /**
  |   |  * MysqlDefs contains many values that are needed for communication
  |   |  * with the MySQL server.
  |   |  *
  |   |  * @author Mark Matthews
  |   |  * @version $Id: MysqlDefs.java,v 1.6.2.4 2003/03/10 13:02:48 mmatthew Exp $
  |   |  */
  |   | final class MysqlDefs {
  |   | //
  |   | // Constants defined from mysql
  |   | //
  |   | // DB Operations
  |   | static final int SLEEP = 0;
  |   | static final int QUIT = 1;
  |   | static final int INIT_DB = 2;
  |   | static final int QUERY = 3;
  |   | static final int FIELD_LIST = 4;
  |   | static final int CREATE_DB = 5;
  |   | static final int DROP_DB = 6;
  |   | static final int RELOAD = 7;
  |   | static final int SHUTDOWN = 8;
  |   | static final int STATISTICS = 9;
  |   | static final int PROCESS_INFO = 10;
  |   | static final int CONNECT = 11;
  |   | static final int PROCESS_KILL = 12;
  |   | static final int DEBUG = 13;
  |   | static final int PING = 14;
  |   | static final int TIME = 15;
  |   | static final int DELAYED_INSERT = 16;
  |   | static final int CHANGE_USER = 17;
  |   | static final int COM_BINLOG_DUMP = 18;
  |   | static final int COM_TABLE_DUMP = 19;
  |   | static final int COM_CONNECT_OUT = 20;
  |   | static final int COM_REGISTER_SLAVE = 21;
  |   | static final int COM_PREPARE = 22;
  |   |   

[JBoss-user] [Persistence CMP/JBoss] - Re: blob CMP MySQL EJB JBoss3.2 mapping problem

2004-06-18 Thread loubyansky
Doesn't default mapping work for you? As to the Java type, any of those should work. 
What's the problem?

View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=3839183#3839183

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3839183


---
This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference
Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer
Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA
REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKND
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user