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
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
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
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
---
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
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 :
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
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
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
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
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
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
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
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
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 =
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
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 :
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 :
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
*
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
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 :
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 :
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
23 matches
Mail list logo