[JBoss-dev] [JBoss JIRA] Created: (EJBTHREE-105) DS: add hibernate.dialect metadata

2005-03-18 Thread Jens Elkner (JIRA)
DS: add hibernate.dialect metadata
--

 Key: EJBTHREE-105
 URL: http://jira.jboss.com/jira/browse/EJBTHREE-105
 Project: EJB 3.0
Type: Feature Request
Versions: Preview 4
 Environment: Linux, JDK 1.5; Jboss 4.0.1sp1
Reporter: Jens Elkner
Priority: Critical


Actually IMHO it is not possible, to deploy an EJB3 application to jboss in a 
relayable way. E.g. an application may ask a user to create a datasource with a 
certain name, however, it should not care/dictate, what a database the user 
chooses (IMHO thats one of the biggest advantage of an J2EE server). 

However, since the hibernate.dialect property depends direct on the type of 
database, an application can't be shipped with a META-INF/hibernate.properties, 
where the hibernate.dialect is set. E.g. if so 
driver-classoracle.jdbc.driver.OracleDriver/driver-class and 
hibernate.dialect=hibernate.dialect=org.hibernate.dialect.MySQLMyISAMDialect
simply would produce garbage.

Editing the META-INF/hibernate.properties is not an option, since if the 
archive is signed, this would destroy the inegrity of the archive (besides the 
fact, that it would be unaceppably to ask the user/admin to that).

To solve this problem, IMHO it is neccessary, that a new optional metadata tag 
should be allowed in local-tx-datasource. E.g.:
datasources
   ...
   metadata
  ...
  hibernate.dialect.../hibernate.dialect
   /metadata
/datasources

Now, if the EBJ3 deployer starts deploying an ejb3 archive,
it may have a look at the DS metadata and add/overwrite the hibernate.dialect 
property. 

Digging around, I guess, that 
org.jboss.ejb3.entity.HibernateSessionFactory:createSessionFactory(java.util.Collection
 classes, Properties props) right before 
if (props != null) cfg.setProperties(props); 
would be anappropriate place, doing that.

Unfortunately, I do not know, whether/how it is possible and allowed to access 
the metadata of the datasource at this point. 

If you can give me a hint, I would try to implement/test this...
 



-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.jboss.com/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira



---
SF email is sponsored by - The IT Product Guide
Read honest  candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595alloc_id=14396op=click
___
JBoss-Development mailing list
JBoss-Development@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-development


[JBoss-dev] [JBoss JIRA] Created: (EJBTHREE-104) EntityToHibernateXml: catch NPE and throw a more descriptive Exception

2005-03-14 Thread Jens Elkner (JIRA)
EntityToHibernateXml: catch NPE and throw a more descriptive Exception
--

 Key: EJBTHREE-104
 URL: http://jira.jboss.com/jira/browse/EJBTHREE-104
 Project: EJB 3.0
Type: Feature Request
Versions: Preview 4
 Environment: Linux, JDK 1.5, JBoss 4.0.1sp1
Reporter: Jens Elkner
Priority: Minor


jboss.log:
...
02:31:01,786 INFO  [Ejb3Module] Found hibernate.properties file in EJB3 jar or 
ear
02:31:01,797 ERROR [Ejb3Module] Starting failed 
jboss.j2ee:service=EJB3,module=foo.ejb3
java.lang.NullPointerException
at 
org.jboss.ejb3.entity.EntityToHibernateXml.handleOneToMany(EntityToHibernateXml.java:845)
at 
org.jboss.ejb3.entity.EntityToHibernateXml.iterateProperties(EntityToHibernateXml.java:220)
at 
org.jboss.ejb3.entity.EntityToHibernateXml.handleBasicClass(EntityToHibernateXml.java:1822)
...

Would be nice, if the NPE could be caught and re-throw a more descriptive 
Exception, so that one gets a hint, what might be wrong. In my example it was a 
typo in the mappedBy value, but who knows, what else might be the cause ...

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.jboss.com/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira



---
SF email is sponsored by - The IT Product Guide
Read honest  candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595alloc_id=14396op=click
___
JBoss-Development mailing list
JBoss-Development@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-development


[JBoss-dev] [JBoss JIRA] Commented: (EJBTHREE-90) Schema export does not honor DS mapping

2005-03-08 Thread Jens Elkner (JIRA)
 [ 
http://jira.jboss.com/jira/browse/EJBTHREE-90?page=comments#action_12315968 ]
 
Jens Elkner commented on EJBTHREE-90:
-

OK. I've also found in the forum, that one can use a hibernate.properties file 
per application.

But I'm wondering, what than the type-mapping in the datasource is used for. 
Can you enlighten me a little bit ?

 Schema export does not honor DS mapping
 ---

  Key: EJBTHREE-90
  URL: http://jira.jboss.com/jira/browse/EJBTHREE-90
  Project: EJB 3.0
 Type: Bug
 Versions: Preview 4
  Environment: Linux, JDK 1.5.0_01, JBoss 4.0.1sp1
 Reporter: Jens Elkner



 I've setup the DefaultDS to use mysqldb and hus to use the mySQL mappings.
 Trying the callback example listed in the ebj3 docs, I get the following 
 error:
 18:58:40,341 INFO  [DatasourceConnectionProvider] Using datasource: 
 java:/DefaultDS
 18:58:40,345 ERROR [SchemaExport] Unsuccessful: create table CUSTOMER (id 
 integer generated by default as identity (start with 1), STATE varchar(255), 
 FIRST varchar(255), LAST varchar(255), STREET varchar(255), CITY 
 varchar(255), ZIP varchar(255), primary key (id))
 18:58:40,345 ERROR [SchemaExport] You have an error in your SQL syntax; check 
 the manual that corresponds to your MySQL server version for the right syntax 
 to use near 'generated by default as identity (start with 1), STATE 
 varchar(255), FIRST varch' at line 1
 18:58:40,345 INFO  [SchemaExport] schema export complete
 18:58:40,348 INFO  [Dialect] Using dialect: org.hibernate.dialect.HSQLDialect
 18:58:40,348 INFO  [Configuration] processing extends queue
 ...
 So the schema stuff uses HSQLDB mappings, insteadof the given mapping in the 
 DS descriptor and finally produces invalid MySQL statements:
 datasources 
 local-tx-datasource 
 jndi-nameDefaultDS/jndi-name 
 connection-urljdbc:mysql://localhost:3306/web/connection-url 
 driver-classcom.mysql.jdbc.Driver/driver-class 
 user-namefoo/user-name 
 passwordbar/password 
 connection-property name=autoReconnecttrue/connection-property
 connection-property name=autoReconnectForPools
 true/connection-property
 exception-sorter-class-nameorg.jboss.resource.adapter.jdbc.vendor.MySQLExceptionSorter/exception-sorter-class-name
 metadata
 type-mappingmySQL/type-mapping
 /metadata
 /local-tx-datasource 
 /datasources

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.jboss.com/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira



---
SF email is sponsored by - The IT Product Guide
Read honest  candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595alloc_id=14396op=click
___
JBoss-Development mailing list
JBoss-Development@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-development


[JBoss-dev] [JBoss JIRA] Created: (EJBTHREE-90) Schema export does not honor DS mapping

2005-03-04 Thread Jens Elkner (JIRA)
Schema export does not honor DS mapping
---

 Key: EJBTHREE-90
 URL: http://jira.jboss.com/jira/browse/EJBTHREE-90
 Project: EJB 3.0
Type: Bug
Versions: Preview 4
 Environment: Linux, JDK 1.5.0_01, JBoss 4.0.1sp1
Reporter: Jens Elkner


I've setup the DefaultDS to use mysqldb and hus to use the mySQL mappings.
Trying the callback example listed in the ebj3 docs, I get the following error:

18:58:40,341 INFO  [DatasourceConnectionProvider] Using datasource: 
java:/DefaultDS
18:58:40,345 ERROR [SchemaExport] Unsuccessful: create table CUSTOMER (id 
integer generated by default as identity (start with 1), STATE varchar(255), 
FIRST varchar(255), LAST varchar(255), STREET varchar(255), CITY varchar(255), 
ZIP varchar(255), primary key (id))
18:58:40,345 ERROR [SchemaExport] You have an error in your SQL syntax; check 
the manual that corresponds to your MySQL server version for the right syntax 
to use near 'generated by default as identity (start with 1), STATE 
varchar(255), FIRST varch' at line 1
18:58:40,345 INFO  [SchemaExport] schema export complete
18:58:40,348 INFO  [Dialect] Using dialect: org.hibernate.dialect.HSQLDialect
18:58:40,348 INFO  [Configuration] processing extends queue
...

So the schema stuff uses HSQLDB mappings, insteadof the given mapping in the DS 
descriptor and finally produces invalid MySQL statements:

datasources 
local-tx-datasource 
jndi-nameDefaultDS/jndi-name 
connection-urljdbc:mysql://localhost:3306/web/connection-url 
driver-classcom.mysql.jdbc.Driver/driver-class 
user-namefoo/user-name 
passwordbar/password 
connection-property name=autoReconnecttrue/connection-property
connection-property name=autoReconnectForPools
true/connection-property
exception-sorter-class-nameorg.jboss.resource.adapter.jdbc.vendor.MySQLExceptionSorter/exception-sorter-class-name
metadata
type-mappingmySQL/type-mapping
/metadata
/local-tx-datasource 
/datasources



-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.jboss.com/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira



---
SF email is sponsored by - The IT Product Guide
Read honest  candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595alloc_id=14396op=click
___
JBoss-Development mailing list
JBoss-Development@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-development


[JBoss-dev] [JBoss JIRA] Created: (EJBTHREE-89) docs included twice

2005-03-02 Thread Jens Elkner (JIRA)
docs included twice
---

 Key: EJBTHREE-89
 URL: http://jira.jboss.com/jira/browse/EJBTHREE-89
 Project: EJB 3.0
Type: Feature Request
  Components: Documentation  
Versions: Preview 4
 Environment: All
Reporter: Jens Elkner
Priority: Trivial


jboss-EJB-3.0_Preview_4.zip contains documentation twice:
1) unpacked in jboss-EJB-3.0_Preview_4/docs/ and 
2) as zip: jboss-EJB-3.0_Preview_4/docs/ejb3-preview4-docs.zip

One of both should be removed.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.jboss.com/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira



---
SF email is sponsored by - The IT Product Guide
Read honest  candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595alloc_id=14396op=click
___
JBoss-Development mailing list
JBoss-Development@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-development


[JBoss-dev] [JBoss JIRA] Created: (EJBTHREE-88) EJB doc - missing quotes

2005-03-01 Thread Jens Elkner (JIRA)
EJB doc - missing quotes


 Key: EJBTHREE-88
 URL: http://jira.jboss.com/jira/browse/EJBTHREE-88
 Project: EJB 3.0
Type: Bug
  Components: Documentation  
Versions: Preview 4
 Environment: Linux, Mozilla 1.7.3,  Apache/2.0.52 (Unix)
Reporter: Jens Elkner
Priority: Trivial


ejb3/docs/index.html: quotes are missing for the first two hrefs and thus one 
gets e.g. http://localhost/develop/jboss40/ejb3/EJB3-edr2.pdf%22; from mozilla 
pointing to a non-existent object ... 

--- patch ---
--- index.html.orig Tue Feb  8 22:52:22 2005
+++ index.html  Wed Mar  2 00:12:44 2005
@@ -6,8 +6,8 @@
 /pp
 /pp
 ul
-li a href=EJB3-edr2.pdfEJB 3.0 Specification (non-persistence 
stuff)/a/li
-li a href=Persistence-edr2.pdfEJB 3.0 Persistence Specification/a/li
+li a href=EJB3-edr2.pdfEJB 3.0 Specification (non-persistence 
stuff)/a/li
+li a href=Persistence-edr2.pdfEJB 3.0 Persistence Specification/a/li
 li a href=tutorial/index.htmlTutorial/a Walks you through EJB 3.0 with 
real examples that you can build and run./li
 li a href=reference/hibernate.htmlConfiguring/a  Describes how you 
configure datasources and Hibernate 3.0.  Hibernate 3.0 drives our entity bean 
implementation./li
 li a href=reference/jndi.htmlJNDI Bindings/a JNDI , interceptor, and 
transport bindings for your session beans./li
--- eo patch --

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.jboss.com/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira



---
SF email is sponsored by - The IT Product Guide
Read honest  candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595alloc_id=14396op=click
___
JBoss-Development mailing list
JBoss-Development@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-development


[JBoss-dev] [JBoss JIRA] Created: (JBAS-1542) ant release: server/all/{lib,deploy} is copied to server/default/{lib,deploy}

2005-03-01 Thread Jens Elkner (JIRA)
ant release: server/all/{lib,deploy} is copied to server/default/{lib,deploy}
-

 Key: JBAS-1542
 URL: http://jira.jboss.com/jira/browse/JBAS-1542
 Project: JBoss Application Server
Type: Bug
  Components: Build System  
Versions:  JBossAS-4.0.1 SP1
 Environment: Linux, ant 1.6.2, jdk 1.5.0
Reporter: Jens Elkner
Priority: Minor


When building jboss (ant release), the whole jboss/server/all/lib directory 
gets copied to jboss/server/default/lib/ and thus one
has a useless jboss/server/default/lib/lib which increases the distribution 
size about 17 MB.
Same counts for the deploy directory, which increases the distribution size 
about 23 MB. 
So removing the unused directories would reduce the complete package to about 
60% of its original size ...

Quick and dirty fix:

# RC1 bug
[ -d ${PROTO}/server/standard/deploy/deploy ]  \
rm -rf ${PROTO}/server/standard/deploy/deploy
# SP1 bug
[ -d ${PROTO}/server/default/deploy/deploy ]  \
rm -rf ${PROTO}/server/default/deploy/deploy
[ -d ${PROTO}/server/default/lib/lib ]  \
rm -rf ${PROTO}/server/default/lib/lib


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.jboss.com/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira



---
SF email is sponsored by - The IT Product Guide
Read honest  candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595alloc_id=14396op=click
___
JBoss-Development mailing list
JBoss-Development@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-development