[JBoss-user] [Persistence CMP/JBoss] - problem with auto-increment field and CMP bean

2004-06-15 Thread nacho2004
I want to know if I can work with auto-increment with CMP beans. I have a table with 2 fields: id (identity) dbPass dbUrl dbUser dbDriver dbName and when I use a create() method ECollections collHome = collectionHome.create(dbPass,dbUrl,dbUser,dbDriver,dbName); , the console display this

[JBoss-user] [Persistence CMP/JBoss] - Re: DataSource API's from JBoss

2004-06-11 Thread nacho2004
I want to change the CMP datasource on the fly. Can I use CMP's in this context where I need to connect to different databases(with absolutely identical structure) for each client. Different databases mean different Datasources, hence how do I uniquely associate a CMP Entity Bean with a single

[JBoss-user] [Persistence CMP/JBoss] - Re: Changing a Datasource at runtime

2004-06-10 Thread nacho2004
I read a note from Alexey Loubyansky on http://www.junlu.com/msg/36487.html but I can't get some other examples. Could you give me an examples of your DataSource Factory ? Thanks in advance!!! View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3838320#3838320 Reply

[JBoss-user] [Persistence CMP/JBoss] - DataSource API's from JBoss

2004-06-10 Thread nacho2004
Have Jboss some API's to work with datasource ? View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3838351#3838351 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3838351 ---

[JBoss-user] [Persistence CMP/JBoss] - dinamic datasource in jbosscmp-jdbc.xml

2004-06-09 Thread nacho2004
hi everybody, I have a jbosscmp-jdbc.xml file with this piece of code jbosscmp-jdbc java:/skyline datasource-mappingMS SQLSERVER2000/datasource-mapping . . /jbosscmp-jdbc This xml is on EJBs.jar file. And mssql-ds.xml (on jboss_home/server/default/deploy) has these lines

[JBoss-user] [Persistence CMP/JBoss] - Re: dinamic datasource in jbosscmp-jdbc.xml

2004-06-09 Thread nacho2004
I think that is that I'm looking for. I've 2 DB with the same tables and I need to choose one of them in every moment depends of the client choose View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3838225#3838225 Reply to the post :

[JBoss-user] [Persistence CMP/JBoss] - Changing a Datasource at runtime

2004-06-09 Thread nacho2004
Consider a hypothetical application that needs to be deployed on a single app server and has to service mulitple clients. Consider that there is a database per client. Thus n databases for n clients. However, all of these database have the same structure, and only the content varies. Now to

[JBoss-user] [Persistence CMP/JBoss] - jbosscmp-jdbc

2004-06-08 Thread nacho2004
well, I have a lot of beans running with : java:/skyline datasource-mappingMS SQLSERVER2000/datasource-mapping and ... I want to create other beans in the same jar file (EJBs.jar) but these beans will be use a different jndi connection like java:/skylineAdmin

[JBoss-user] [Persistence CMP/JBoss] - EJB-QL ordey by...

2004-05-26 Thread nacho2004
Hi everyBody !!! well I want to know how can I do this query with ejb-ql: SELECT * FROM documents WHERE docid =x ORDER BY docname ASC I did try with this code but didn't running *@ ejb.finder query=SELECT OBJECT(d) FROM documents d where d.docid=?1 order by ?2 ?3 View the original post

[JBoss-user] [Persistence CMP/JBoss] - EJB-QL order by...

2004-05-26 Thread nacho2004
Hi everyBody !!! well I want to know how can I do this query with ejb-ql: SELECT * FROM documents WHERE docid =x ORDER BY docname ASC I did try with this code but didn't running *@ ejb.finder query=SELECT OBJECT(d) FROM documents d where d.docid=?1 order by ?2 ?3 View the original post

[JBoss-user] [Persistence CMP/JBoss] - simplest one-to-one relationships bug

2004-05-18 Thread nacho2004
Hi all!! I've 2 tables that contain the same primary key (docid) and both have diferent fileds for a document One of that has all the basic fields for a document and the other has metadata for the same document. Obviously the relation is one-to-one well, the names of the beans are : EDocuments

[JBoss-user] [Persistence CMP/JBoss] - Re: simplest one-to-one relationships bug

2004-05-18 Thread nacho2004
ava.rmi.ServerException: RemoteException occurred in server thread; nested exception is: java.rmi.ServerException: RuntimeException; nested exception is: java.lang.ClassCastException at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:292) at

[JBoss-user] [Persistence CMP/JBoss] - Re: simplest one-to-one relationships bug

2004-05-18 Thread nacho2004
My Problem was because I didn't use a Local Interface. Ok , I just use EDocMetaDataLocal meta = element.getEDocMetaData(); but when I want to use any filed for example: System.out.println(meta.getAuthor()); this error appear: java.lang.NullPointerException at

[JBoss-user] [Persistence CMP/JBoss] - Re: simplest one-to-one relationships bug

2004-05-18 Thread nacho2004
somebody knows some tutorial to create one-to-one relationships ? thanks in advance View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3835418#3835418 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3835418

[JBoss-user] [Persistence CMP/JBoss] - java.lang.ClassCastException

2004-05-17 Thread nacho2004
Hi, I've 2 beans one-one relationships and this piece of code InitialContext ctx = new InitialContext(); SDocuments myBean = getHome().create(); Collection col = myBean.getAllDocumentByCategoryId(11); Iterator iter = col.iterator(); while (iter.hasNext()) { EDocuments element =

[JBoss-user] [Persistence CMP/JBoss] - Re: java.lang.ClassCastException

2004-05-17 Thread nacho2004
ejb-relation ejb-relation-nameEDocuments-EDocMetaData/ejb-relation-name foreign-key-mapping/ ejb-relationship-role ejb-relationship-role-nameEDocuments-has-one-EDocMetadata/ejb-relationship-role-name key-fields/ /ejb-relationship-role

[JBoss-user] [Persistence CMP/JBoss] - Re: java.lang.ClassCastException

2004-05-17 Thread nacho2004
do you have any document to implement a one-to-one relationships I think the @ejb.relation is good in both case (2 beans) but I can't understand why I can't call one bean to other by getDocidMetaData() method. thanks in advance View the original post :

[JBoss-user] [Persistence CMP/JBoss] - Re: java.lang.ClassCastException

2004-05-17 Thread nacho2004
But in my case both tables contain the same amount of row And the data model for those tables is one-to-one relationships View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3835258#3835258 Reply to the post :

[JBoss-user] [Persistence CMP/JBoss] - Error compiling EJB-QL statement 'SELECT OBJECT(b) FROM ...

2004-05-15 Thread nacho2004
I've 2 beans ECatDocuments and EDocuments I created a relationships like this in ECatDocuments /** * @ejb.interface-method * * @ejb.relation *name=ECatDocuments-EDocuments *role-name=ECatDocuments-has-many-EDocuments * @jboss.relation *related-pk-field=docid *

[JBoss-user] [Persistence CMP/JBoss] - relationship doubt

2004-05-14 Thread nacho2004
Hi everybody! I've 2 tables : CatDocuments and Documents CatDocuments has docid and catid fields Documents has docid and docname fields The relation between both are with the docid field I want to get all the docs from documents where catid =x for example [select docname from catdocuments a inner

[JBoss-user] [Persistence CMP/JBoss] - How to create relationships with XDoclet

2004-05-14 Thread nacho2004
Anybody knows a tutorial , document anything that talk about how to create relationships with XDoclet. thanks in advance. View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3834975#3834975 Reply to the post :

[JBoss-user] [Persistence CMP/JBoss] - EJB-QL query

2004-05-13 Thread nacho2004
somebody knows how I can do this query with EJB-QL Select A.catid FROM catparents A where (A.parentid IN (SELECT B.parentid from dbo.catparents B WHERE (B.catid = 4) AND (B.depth = 0)) AND (A.depth = 0) AND (A.catid 4)) thanks in advance View the original post :

[JBoss-user] [Persistence CMP/JBoss] - Problem with Integer fields on @ejb.finder result

2004-05-11 Thread nacho2004
I've been doing a CMP with 3 integer fields. So, when I create an use this finder: * @ejb.finder * query=SELECT OBJECT(c) FROM catparents c where c.parentId=?1 * signature=java.util.Collection findByChild(java.lang.Integer catId) the result give me the collection of the same row. I mean