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 error:
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 t
Have Jboss some API's to work with datasource ?
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3838351#3838351
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3838351
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=bb&op=viewtopic&p=3838320#3838320
Repl
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 th
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=bb&op=viewtopic&p=3838225#3838225
Reply to the post :
http://www.jboss.org/index.ht
hi everybody,
I have a jbosscmp-jdbc.xml file with this piece of code
java:/skyline
MS SQLSERVER2000
.
.
This xml is on EJBs.jar file.
And mssql-ds.xml (on jboss_home/server/default/deploy) has these lines
skyline
jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=skyli
well, I have a lot of beans running with :
java:/skyline
MS SQLSERVER2000
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
MS SQLSERVER2000
Can I do that ?
View
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
somebody knows some tutorial to create one-to-one relationships ?
thanks in advance
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3835418#3835418
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3835418
-
so, how can I get the fields from the other bean that participate in the relationships
?
while (iter.hasNext()) {
EDocuments element = ((EDocuments) iter.next());
System.out.println("Abstract:" + element.getShortabstract());
EDocMetaDataLocal meta = element.getEDocMetaData
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 org.jboss.ejb.plugins.local.E
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 sun.rmi
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 and
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=bb&op=viewtopic&p=3835258#3835258
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&m
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 :
http://www.jboss.org/index.html?module=bb
EDocuments-EDocMetaData
EDocuments-has-one-EDocMetadata
EDocMetadata-has-one-EDocuments
docid
docid
View the original post :
http:/
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 = ((EDocument
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"
*fk-co
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=bb&op=viewtopic&p=3834975#3834975
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&m
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 :
http://www.jboss.org/index
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 me
24 matches
Mail list logo