RE: [JBoss-user] Persisting arrays using CMP in Entity EJBs

2004-09-23 Thread Alexey Loubyansky
It is certainly possible. Try with defaults and if it doesn't work try
different mappings and read the JBossCMP wikis. 

 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf Of 
 Allan Kamau
 Sent: Wednesday, September 22, 2004 2:31 PM
 To: [EMAIL PROTECTED]
 Subject: [JBoss-user] Persisting arrays using CMP in Entity EJBs
 
 This is probably an EJB spec question. I am using PostgreSQL 
 for persistance and it susports array datatype. I would like 
 to know if it is possible to store seamlessly an array in 
 Entity EJBs using CMP.
 And if so do I simply refer (in the ejb-jar.xml) to the array 
 field as if it was a non-collection field as illustrated below?
 
 cmp-field
   field-namemyArrayField/field-name
 /cmp-field
 
 Allan.
 
 
 
   
 ___
 Do you Yahoo!?
 Declare Yourself - Register online to vote today!
 http://vote.yahoo.com
 
 
 ---
 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
 
 


---
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


RE: [JBoss-user] Problem with cascade-delete

2004-07-10 Thread Alexey Loubyansky
It maybe because of complex relationships. You would need to post
deployment descriptors and describe relationships among real instances.
But could you try 3.2.5 first?
and batch-cascade-delete?

 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf Of 
 Maykel Tres
 Sent: Friday, July 09, 2004 9:08 PM
 To: [EMAIL PROTECTED]
 Subject: [JBoss-user] Problem with cascade-delete
 
 Hi folks,
 
 I work with JBoss 3.2.1 and CMP 2.0.
 I have a CMR relation 1-n in my application and I tried 
 deleting an entity that has n entities related, but JBoss 
 show me the following
 error: 
 
 org.jboss.tm.JBossTransactionRolledbackException: null; 
 nested exception
 is: javax.ejb.EJBException: Update failed. Expected one affected row:
 rowsAffected=0id=1;
 
 I was seeing the log file generated by P6spy and I thing 
 there is something wrong. 
 
 Following the log:
 
 1089394476685|0|0|statement|DELETE FROM NEWS WHERE F_ID=?|DELETE FROM
 NEWS WHERE F_ID='11'
 1089394476695|0|0|statement|DELETE FROM NEWSLINKS WHERE F_ID=?|DELETE
 FROM NEWSLINKS WHERE F_ID='1'
 1089394476715|0|0|statement|UPDATE NEWSLINKS SET F_NEWS=? WHERE
 F_ID=?|UPDATE NEWSLINKS SET F_NEWS='' WHERE F_ID='1'
 
 JBoss performed a delete command and after an update command. 
 I think this command is unnecessary and it's generating an error.
 
 My question is: Why does this update command is being performed?
 
 Maykel Tres
 
 
 
 
 
 ---
 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
 
 


---
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


RE: [JBoss-user] Ordering CMR results - best practice ?

2004-06-15 Thread Alexey Loubyansky
No, there is not. You should order them yourself. 

 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf Of 
 Klaus Richarz
 Sent: Monday, June 14, 2004 1:52 PM
 To: [EMAIL PROTECTED]
 Subject: [JBoss-user] Ordering CMR results - best practice ?
 
 Hello *,
 
 I'm trying to get an ordered CMR. Is there any propritary way 
 JBoss can handle this ?
 Or any best practice how to realize it ?
 
 Any help is appreciated,
 
 Klaus Richarz
 Hamburg, Germany
 
 
 ---
 This SF.Net email is sponsored by the new InstallShield X.
 From Windows to Linux, servers to mobile, InstallShield X is 
 the one installation-authoring solution that does it all. 
 Learn more and evaluate today! 
 http://www.installshield.com/Dev2Dev/0504
 ___
 JBoss-user mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/jboss-user
 
 


---
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


RE: [JBoss-user] Dirty read with commit option B on JBoss 3.2.0

2004-06-03 Thread Alexey Loubyansky
Did the second transaction found the instance with on-find read-ahead? 

 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf Of 
 Maxim Mikhelman
 Sent: Thursday, June 03, 2004 11:08 AM
 To: [EMAIL PROTECTED]
 Subject: [JBoss-user] Dirty read with commit option B on JBoss 3.2.0
 
 I use JBoss 3.2.0 with container configuration Standard CMP 
 2.x EntityBean (commit option B, pessimistic locking). All 
 code run within transactions, user or container (required).
 
 I see next strange behavior:
 1. JBoss starts first transaction that find some Entity Bean 
 instance A, use it with get and set methods and lock it 
 within transaction.
 2. Started second transaction that try to gain lock on the 
 same object A and waiting.
 3. First transaction end it's actions and commit changed A 
 property to DB.
 4. From this moment second transaction can continue to run , 
 gains lock on A, but when it try to call get property i see 
 inconsistence and view that actually read value that was 
 before commit of first transaction - dirty read.
 
 What i do wrong and should change ?



---
This SF.Net email is sponsored by the new InstallShield X.
From Windows to Linux, servers to mobile, InstallShield X is the one
installation-authoring solution that does it all. Learn more and
evaluate today! http://www.installshield.com/Dev2Dev/0504
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


RE: [JBoss-user] Dirty read with commit option B on JBoss 3.2.0

2004-06-03 Thread Alexey Loubyansky
You need to post the deployment descriptors, logs with SQL statements
and relevant details. Please, try our forums.

Thanks.

alex

 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf Of 
 Maxim Mikhelman
 Sent: Thursday, June 03, 2004 2:15 PM
 To: JBoss List
 Subject: RE: [JBoss-user] Dirty read with commit option B on 
 JBoss 3.2.0
 
 Hi, thanx for response.
 
 On you question : No. I use default JBoss preferences for 
 entity beans without on-find or on-load strategies.
 
 Actually i have 2 entity beans with CMR relation 1 to 1, for 
 example entity A has entity B in relation.
 First transaction find A and modified it's CMR B. On commit 
 in DB log i see that all committed right and B changed. 
 Second transactions use findByPK for find A and get from A 
 entity B entity. Here i get B with old values. 
 More strange that in DB log and by debugger i see that 
 ejbLoad() for entity B called after first transaction 
 committed, BUT container return for me old values for B, like 
 if some cashing was enabled...
 
 Regards, 



---
This SF.Net email is sponsored by the new InstallShield X.
From Windows to Linux, servers to mobile, InstallShield X is the one
installation-authoring solution that does it all. Learn more and
evaluate today! http://www.installshield.com/Dev2Dev/0504
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


RE: [JBoss-user] error compiling ejbql (dynamicQL): EJB-QL statement '';

2004-05-10 Thread Alexey Loubyansky
Looks like for some reason it doesn't think that it is dynamic. It does
work for me with DR4. If you put some query in the ejb-ql will it work
as dynamic?

 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf Of ?? ?
 Sent: Sunday, May 09, 2004 12:22 PM
 To: [EMAIL PROTECTED]
 Subject: [JBoss-user] error compiling ejbql (dynamicQL): 
 EJB-QL statement '';
 
 Hi all
 I'm trying to use JBoss Dynamic-QL
 
 But When I submit the following Dynamic-QL, I get the 
 following consol error msgs.
 
 ---ConsolErrorMessages---
 ERROR [EntityContainer] Starting failed
 org.jboss.deployment.DeploymentException: Error compiling 
 EJB-QL statement ''; - nested throwable:
 (org.jboss.ejb.plugins.cmp.ejbql.ParseException: FROM not
 found)
 
 
 
 in jbosscmp-jdbc.xml tell JBoss that this method is dynamic. 
 So, ejb-qlvalue is empty in the ejb-jar.xml.
 
 reference is 117/207Page of ejbwJboss.eBook.pdf 
 http://www.univ-orleans.fr/SCIENCES/INFO/RESSOURCES/modules/si
 r/ejbwJboss.eBook.pdf
 
 
 ---ejb-jar.xml---
 query
 description![CDATA[]]/description
 query-method
 method-nameejbSelectScreeningAbleNumFromUserResponseNum/met
 hod-name
 method-params
 method-paramjava.lang.String/method-param
 method-paramjava.lang.Object[]/method-param
 /method-params
 /query-method
 ejb-ql/ejb-ql
 /query
 
 
 ---jbosscmp-jdbc.xml---
 query
 query-method
 method-nameejbSelectScreeningAbleNumFromUserResponseNum/met
 hod-name
 method-params
 method-paramjava.lang.String/method-param
 method-paramjava.lang.Object[]/method-param
 /method-params
 /query-method
 dynamic-ql/
 /query
 
 
 ---CMP Xdoclet (ClassLevel)---
 * @jboss.query
 * dynamic = true
 * signature = int
 ejbSelectScreeningAbleNumFromUserResponseNum(java.lang.String
 jbossQL, java.lang.Object[] arguments)
 
 
 ---CMP Xdoclet (MethodLevel)---
 /**
  */
 public abstract int
 ejbSelectScreeningAbleNumFromUserResponseNum(String
 jbossQL, java.lang.Object[] arguments) throws FinderException;
 /**
  * @ejb.home-method
  */
 public int ejbHomeGetScreeningAbleNumFromUserResponseNum()
 throws FinderException
 {
 StringBuffer jbossQL = new StringBuffer(); 
 jbossQL.append(SELECT count(distinct ur.monitorID) FROM 
 UserResponse As ur where ur.responseData = '0123'); 
 java.lang.Object[] args = null; return 
 ejbSelectScreeningAbleNumFromUserResponseNum(jbossQL.toString(),
 args);
 }
 
 
 jboss-4.0.0DR3
 
 
 Does anyone recognize what the problem could be here?
 
 Any help is appreciated.
 
 
 masaru



---
This SF.Net email is sponsored by Sleepycat Software
Learn developer strategies Cisco, Motorola, Ericsson  Lucent use to
deliver higher performing products faster, at low TCO.
http://www.sleepycat.com/telcomwpreg.php?From=osdnemail3
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


RE: [JBoss-user] unknown-pk won't work...

2004-04-03 Thread Alexey Loubyansky
Is this generated by JBossCMP for MySql?
I would guess that in fact it is for Hypersonic. In this case you should set 
pk-constraint to false. Because, Hypersonic does not allow IDENTITY and explicit 
primary key constraint at the same time.

 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf Of 
 [EMAIL PROTECTED]
 Sent: Wednesday, March 31, 2004 6:19 PM
 To: [EMAIL PROTECTED]
 Subject: [JBoss-user] unknown-pk won't work...
 
 Hi folks, 
 
 I'm trying to get an CMP EntityBean startet that should have 
 an auto-generated primary-key, an auto-incremented Integer. 
 After searching quite a long time for information about this, 
 I found only little. And it's not working.
 JBoss tells about a thrown SQLException: Attempt to define a 
 second primary key in statement [CREATE TABLE EMPLOYEE 
 (firstname VARCHAR(256), lastname VARCHAR(256), employeeid 
 INTEGER(11) NOT NULL IDENTITY, CONSTRAINT PK_EMPLOYEE PRIMARY 
 KEY (employeeid))]
 
 I'd strongly apreciate some help, or maybe even some 
 links/books/whatever where I can get more information. 
 
 I'm working with Eclipse 2.1.3; JBoss 3.2.3; MySQL 4.0.18 and 
 XDoclet. 
 Here are my XMLs... 
 
 Thanks in advance for your help. 
 Karsten 
 
 ejb-jar.xml:
 
   entity 
  description![CDATA[The Employee Entity Bean saves 
 every Employee.]]/description
  display-nameEB_Employee/display-name
  ejb-nameEmployee/ejb-name
  
 local-homemedsched.entity.employee.EmployeeLocalHome/local-home
  localmedsched.entity.employee.EmployeeLocal/local
  ejb-classmedsched.entity.employee.EmployeeBean/ejb-class
  persistence-typeContainer/persistence-type
  prim-key-classjava.lang.Object/prim-key-class
  reentrantfalse/reentrant
  cmp-version2.x/cmp-version
  abstract-schema-nameEmployee/abstract-schema-name
  cmp-field 
 field-namefirstname/field-name
  /cmp-field
  cmp-field 
 field-namelastname/field-name
  /cmp-field
  cmp-field 
 field-nametelephone/field-name
  /cmp-field
   /entity
   
  
 
 
 jbosscmp-jdbc.xml: 
 
   entity
  ejb-nameEmployee/ejb-name
  create-tabletrue/create-table
  remove-tabletrue/remove-table
  cmp-field
 field-namefirstname/field-name
 column-namefirstname/column-name
 /cmp-field
  cmp-field
 field-namelastname/field-name
 column-namelastname/column-name
 /cmp-field
  cmp-field
 field-nametelephone/field-name
 column-nametelephone/column-name
 /cmp-field
   unknown-pk
   unknown-pk-classjava.lang.Integer/unknown-pk-class
   field-nameemployeeID/field-name
   read-onlytrue/read-only
   column-nameemployeeid/column-name
   auto-increment/
   /unknown-pk
   /entity
   
  
 
 -- 
 +++ NEU bei GMX und erstmalig in Deutschland: TÜV-geprüfter 
 Virenschutz 
 +++ +++
 100% Virenerkennung nach Wildlist. Infos: 
 http://www.gmx.net/virenschutz
 
 
 
 ---
 This SF.Net email is sponsored by: IBM Linux Tutorials Free 
 Linux tutorial presented by Daniel Robbins, President and CEO 
 of GenToo technologies. Learn everything from fundamentals to 
 system 
 administration.http://ads.osdn.com/?ad_id=1470alloc_id=3638op=click
 ___
 JBoss-user mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/jboss-user
 
 


---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id70alloc_id638op=click
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


RE: [JBoss-user] [EJB/JBoss] EJB QL - jboss 3.2.3 -why i can't acess to father id?

2004-03-29 Thread Alexey Loubyansky
User lowercased first characters for field names. 

 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf Of 
 Laurent MARQUEZ
 Sent: Monday, March 29, 2004 12:56 PM
 To: [EMAIL PROTECTED]
 Subject: [JBoss-user] [EJB/JBoss] EJB QL - jboss 3.2.3 -why i 
 can't acess to father id?
 
 
   Hi,
   
 t_tm   |t_scenario
 ---|--
 tm_id  |scenario_id
 tm_nom |scenario_label
|scenario_valeur
|scenario_horodate
|scenario_tmid  - refers to t_tm.tm.id as foreign key
 
 
 Why I can't access to the father id tm_id?
 
 
 
 2004-03-29 11:40:54,523 DEBUG
 [org.jboss.ejb.plugins.cmp.jdbc.JDBCCreateEntityCommand.ScenarioEJB]
 Insert Entity SQL: INSERT INTO t_scenario (scenario_id, 
 scenario_label, scenario_valeur, scenario_horodate, 
 scenario_tmid) VALUES (?, ?, ?, ?,
 ?)
 2004-03-29 11:40:54,523 DEBUG
 [org.jboss.ejb.plugins.cmp.jdbc.JDBCCreateEntityCommand.ScenarioEJB]
 Entity Exists SQL: SELECT COUNT(*) FROM t_scenario WHERE scenario_id=?
 2004-03-29 11:40:54,523 DEBUG
 [org.jboss.ejb.plugins.cmp.jdbc.JDBCCommandFactory.ScenarioEJB]
 entity-command: [commandName=default,commandClass=class
 org.jboss.ejb.plugins.cmp.jdbc.JDBCCreateEntityCommand,attributes={}]
 2004-03-29 11:40:54,523 DEBUG
 [org.jboss.ejb.plugins.cmp.jdbc.JDBCRemoveEntityCommand.ScenarioEJB]
 Remove SQL: DELETE FROM t_scenario WHERE scenario_id=?
 2004-03-29 11:40:54,554 DEBUG
 [org.jboss.ejb.plugins.cmp.jdbc.JDBCStartCommand.ScenarioEJB] 
 Table not create as requested: t_scenario
 2004-03-29 11:40:54,554 DEBUG
 [org.jboss.ejb.plugins.cmp.jdbc.JDBCFindByPrimaryKeyQuery.Scen
 arioEJB#fi
 ndByPrimaryKey] SQL: SELECT scenario_id FROM t_scenario WHERE 
 scenario_id=?
 2004-03-29 11:40:54,554 DEBUG
 [org.jboss.ejb.plugins.cmp.jdbc.JDBCQueryManager.ScenarioEJB] 
 Added findByPrimaryKey query command for local home interface
 2004-03-29 11:40:54,554 DEBUG
 [org.jboss.ejb.plugins.cmp.jdbc.JDBCEJBQLQuery.ScenarioEJB#findAll]
 EJB-QL: SELECT OBJECT(s) FROM Scenario AS s
 2004-03-29 11:40:54,554 DEBUG
 [org.jboss.ejb.plugins.cmp.jdbc.JDBCEJBQLQuery.ScenarioEJB#fin
 dAll] SQL:
 SELECT t0_s.scenario_id FROM t_scenario t0_s
 2004-03-29 11:40:54,554 DEBUG
 [org.jboss.ejb.plugins.cmp.jdbc.JDBCEJBQLQuery.ScenarioEJB#fin
 dByTmIdAnd
 Valeur] EJB-QL: SELECT DISTINCT OBJECT(s) FROM Scenario s,
 IN(s.scenarioTm) t WHERE t.Id=?1 AND s.Valeur=?2
 2004-03-29 11:40:54,569 DEBUG 
 [org.jboss.util.NestedThrowable] 
 org.jboss.util.NestedThrowable.parentTraceEnabled=true
 2004-03-29 11:40:54,569 DEBUG 
 [org.jboss.util.NestedThrowable] 
 org.jboss.util.NestedThrowable.nestedTraceEnabled=false
 2004-03-29 11:40:54,569 DEBUG 
 [org.jboss.util.NestedThrowable] 
 org.jboss.util.NestedThrowable.detectDuplicateNesting=true
 2004-03-29 11:40:54,569 ERROR [org.jboss.ejb.EntityContainer] 
 Starting failed
 org.jboss.deployment.DeploymentException: Error compiling 
 EJB-QL statement 'SELECT DISTINCT OBJECT(s) FROM Scenario s, 
 IN(s.scenarioTm) t WHERE t.Id=?1 AND s.Valeur=?2'; - nested throwable:
 (org.jboss.ejb.plugins.cmp.ejbql.ParseException: Encountered 
 s.scenarioTm at line 1, column 49.
 Was expecting:
 COLLECTION_VALUED_PATH ...
 )
   at
 org.jboss.ejb.plugins.cmp.jdbc.JDBCEJBQLQuery.init(JDBCEJBQL
 Query.java
 :50)
   at
 org.jboss.ejb.plugins.cmp.jdbc.JDBCCommandFactory.createEJBQLQ
 uery(JDBCC
 ommandFactory.java:59)
   at
 org.jboss.ejb.plugins.cmp.jdbc.JDBCQueryManager.start(JDBCQuer
 yManager.j
 ava:212)
 
 
 
 ---
 This SF.Net email is sponsored by: IBM Linux Tutorials Free 
 Linux tutorial presented by Daniel Robbins, President and CEO 
 of GenToo technologies. Learn everything from fundamentals to 
 system 
 administration.http://ads.osdn.com/?ad_id=1470alloc_id=3638op=click
 ___
 JBoss-user mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/jboss-user
 
 


---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id70alloc_id638op=click
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


RE: [JBoss-user] problem with finder findAll

2004-03-19 Thread Alexey Loubyansky



It means the none of home interfacescontains 
findAll.

  
  
  From: [EMAIL PROTECTED] 
  [mailto:[EMAIL PROTECTED] On Behalf Of 
  benoitSent: Wednesday, March 17, 2004 6:37 PMTo: 
  [EMAIL PROTECTED]Subject: [JBoss-user] problem with 
  finder findAll
  
  
  Hi all,
  
  Im trying to insert a finder 
  findAll which answer the entire table.
  Im using a 
  sessionfacade.
  But when i deploy , ive a problem 
  which concern org.jboss.deployment.DeploymentException: Query method not 
  found: findAll
  
  I send you the console : 
  
  
  17:13:28,999 INFO 
  [EjbModule] Starting
  
  17:13:29,030 INFO 
  [EntityContainer] Starting
  
  17:13:29,061 ERROR 
  [EntityContainer] Starting failed
  
  org.jboss.deployment.DeploymentException: 
  Query method not found: findAll
  
   
  at 
  org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCQueryMetaDataFactory.getQueryMethods(JDBCQueryMetaDataFactory.java:274)
  
  


RE: [JBoss-user] cmr bug in 3.2.4RC1?

2004-03-19 Thread Alexey Loubyansky
This XDoclet results in 1:m with relation table mapping (on my machine).
And it is in fact broken at the moment.
True m:n works fine for me.

Here is an example of unidirectional m:n
   /**
* @ejb.interface-method
* @ejb.relation
*name=B-C
*role-name=B-has-Cs
*target-ejb=C
*target-role-name=C-belongsto-B
*target-multiple=true
* @jboss.target-relation
*related-pk-field=id
*fk-column=C_FK
* @jboss.relation
*related-pk-field=id
*fk-column=B_FK
* @jboss.relation-table
*table-name=B_C
*datasource=${ds.name}
*datasource-mapping=${ds.mapping}
*create-table=${jboss.create.table}
*remove-table=${jboss.remove.table}
*/

 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf Of 
 Heinz-Dieter Conradi
 Sent: Thursday, March 18, 2004 11:22 AM
 To: [EMAIL PROTECTED]
 Subject: [JBoss-user] cmr bug in 3.2.4RC1?
 
 when updating form jboss-3.2.3 to jboss-3.2.4RC1 i noticed 
 that one of my JUnit tests failed. the test is about a m-n 
 relation which is managed by a relation table.
 
 looking at the debugging output it appears that after the 
 setter method for the set no insert method is called. this is 
 what was in 3.2.3:
 
 2004-03-17 08:47:05,698 DEBUG
 [org.jboss.ejb.plugins.cmp.jdbc.JDBCInsertRelationsCommand.Ins
 titution]
 Executing SQL: INSERT INTO T_A_CONTACT(s_b_id,s_b_id) VALUES (?, ?)
 2004-03-17 08:47:05,699 DEBUG
 [org.jboss.ejb.plugins.cmp.jdbc.JDBCInsertRelationsCommand.Ins
 titution]
 Rows affected = 1
 2004-03-17 08:47:05,699 DEBUG
 [org.jboss.ejb.plugins.cmp.jdbc.JDBCInsertRelationsCommand.Ins
 titution]
 Rows affected = 1
 
 but it missing in 3.2.4RC1.
 
 is this a regressin bug in jboss. or i am doing something stupid.
 
 tia, heinz-dieter conradi
 
 
 
 ps: the bean is unidirectional is the code looks as follows:
 
 public abstract class ABean implements EntityBean {
 [...]
 
 /**
  * @ejb.interface-method view-type=local
  *
  * @ejb.relation
  *  name=A-AContact
  *  role-name=A-has-AContacts
  *  target-ejb=B
  *  target-role-name=B-is-an-AContact
  *
  * @jboss.relation-mapping style=relation-table
  *
  * @jboss.relation-table
  *table-name=t_a_contact
  *
  * @jboss.target-relation
  *fk-constraint=${fk-constraint}
  *related-pk-field=aId
  *fk-column=s_a_id
  *
  * @jboss.relation
  *fk-constraint=${fk-constraint}
  *related-pk-field=bId
  *fk-column=s_b_id
  */
 public abstract Set getAContacts();
 
 /** @ejb.interface-method view-type=local */
 public abstract void setAContacts(Set aContacts);
 
[...]
 }
 
 
 
 ---
 This SF.Net email is sponsored by: IBM Linux Tutorials Free 
 Linux tutorial presented by Daniel Robbins, President and CEO 
 of GenToo technologies. Learn everything from fundamentals to 
 system 
 administration.http://ads.osdn.com/?ad_id=1470alloc_id=3638op=click
 ___
 JBoss-user mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/jboss-user
 
 


---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id70alloc_id638op=click
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


RE: [JBoss-user] cmr bug in 3.2.4RC1?

2004-03-19 Thread Alexey Loubyansky
 This XDoclet results in 1:m with relation table mapping (on 
 my machine).
 And it is in fact broken at the moment.

Fixed in 3.2.4RC2 and 4.0.0DR4.



---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id70alloc_id638op=click
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


RE: [JBoss-user] [Persistence CMP/JBoss] - Re: Problem : CMR field cannot be null

2004-02-13 Thread Alexey Loubyansky
Title: [JBoss-user] [Persistence & CMP/JBoss] - Re: Problem : CMR field cannot be null



A field is either a CMP or CMR, not both. CMP fields can be 
mapped to foreign key columns.




From: 
[EMAIL PROTECTED] 
[mailto:[EMAIL PROTECTED] On Behalf Of Rod 
MacphersonSent: Friday, February 13, 2004 2:31 AMTo: 
[EMAIL PROTECTED]Subject: RE: [JBoss-user] 
[Persistence  CMP/JBoss] - Re: Problem : CMR field cannot be 
null

  
  It definitely works on 3.2.2 or greater. One caveat is that you cannot 
  use container generated primary keys, perhaps that is the problem you are 
  seeing? You have to supply the primary key "manually". As far as patching 
  jboss.xml you can do that in your ant script after XDoclet has run with a 
  simple substitution. 
  
  Sounds like you have a good solution though. I did not realize you could 
  stipulate that a field was both CMR and CMP. You sure that works? If so that's 
  great.


RE: [JBoss-user] primary key: auto-increment

2004-02-05 Thread Alexey Loubyansky
 Is there any way to have incremental primary keys without the 
 explicit usage of sequences? If yes, how?

What do you mean by implicit use of sequences?

 What can I win with a unknown-pk declaration?

There is a paragraph in the spec about it called Special case Unknown
primary keys.

 Is there any way to automatically create the sequences if 
 they don't still exist (something like: @jboss:create-table 
 create=true)?

At the moment, JBoss does not create sequences even if it is setup to
create tables. As a workaround, I think, you could use something like
@jboss.persistence post-table-create=CREATE SEQUENCE %%t_seq START WITH
1 INCREMENT BY 1



---
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


RE: [JBoss-user] primary key: auto-increment

2004-02-05 Thread Alexey Loubyansky
  What do you mean by implicit use of sequences?
 Is it possible to have an incremental primary key without the 
 usage of sequences?

  !-- uses key generator to fetch the next key value --
  entity-command name=key-generator
 
class=org.jboss.ejb.plugins.cmp.jdbc.keygen.JDBCKeyGeneratorCreateComma
nd
 attribute
name=key-generator-factoryUUIDKeyGeneratorFactory/attribute
  /entity-command

key-generator-factory is the JNDI name under which an impl of
org.jboss.ejb.plugins.keygenerator.KeyGeneratorFactory is bound. UUID is
the only one that is available for now. You can write your own. For an
example look at org.jboss.ejb.plugins.keygenerator.uuid in the server
module.

 Which is the better way to have a incremental primary key?

I don't know. They all are so cute!

   Is there any way to automatically create the sequences if 
 they don't 
   still exist (something like: @jboss:create-table create=true)?
 
  At the moment, JBoss does not create sequences even if it 
 is setup to 
  create tables. As a workaround, I think, you could use 
 something like 
  @jboss.persistence post-table-create=CREATE SEQUENCE %%t_seq START 
  WITH
  1 INCREMENT BY 1
 Unfortunately the jboss.persistence tag doesn't seems to be 
 working

I guess, the resulting jbosscmp-jdbc.xml should contain

entity
...
   post-table-create
  sql-statementany sql statement 1/sql-statement
  sql-statementany sql statement 2/sql-statement
  sql-statementany sql statement etc/sql-statement
   /post-table-create

   table-nameMyTable/table-name
   cmp-field
...



---
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


RE: [JBoss-user] JBossCPM problems ..

2004-02-04 Thread Alexey Loubyansky
yes 

 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf Of 
 Rafal Kedziorski
 Sent: Wednesday, February 04, 2004 6:20 PM
 To: [EMAIL PROTECTED]
 Subject: [JBoss-user] JBossCPM problems ..
 
 hi,
 
 I've posted from 2004-01-21 to today three bugs in JBossCMP, 
 which obstruct us in our development. We use JBoss 3.2.2 
 which works fine. We can't switch to 3.2.3 cause, there are 
 new bugs. We hope, that we can use 3.2.4 in production 
 release with all the bugfixes. Are there efforts to fix this 
 problems in the next time?
 
 
 Best Ragrds,
 Rafal
 
 
 
 ---
 The SF.Net email is sponsored by EclipseCon 2004 Premiere 
 Conference on Open Tools Development and Integration See the 
 breadth of Eclipse activity. February 3-5 in Anaheim, CA.
 http://www.eclipsecon.org/osdn
 ___
 JBoss-user mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/jboss-user
 
 


---
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


RE: [JBoss-user] Are inner joins possible?

2004-02-02 Thread Alexey Loubyansky
Yes, it is possible. Check this
http://www.mail-archive.com/[EMAIL PROTECTED]/msg3
9568.html

 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf Of 
 Steffen Gransow
 Sent: Thursday, January 29, 2004 6:21 PM
 To: [EMAIL PROTECTED] Sourceforge. Net
 Subject: [JBoss-user] Are inner joins possible?
 
 Hi,
 
 I'm wondering, if multiple inner joins are possible using 
 jboss-ql or similar. I'm new to this and did only provide 
 some simple queries so far.
 Here's one example:
 
 SELECT teilnehmer.pkey,
 teilnehmer.titel,
 teilnehmer.vorname,
 teilnehmer.nachname,
 teilnehmer.ort,
 teilnehmer.fk_kv,
 teilnehmer.teilnehmer_id
 FROM
   kommission INNER JOIN teilnehmer ON 
 kommission.fk_teilnehmer = teilnehmer.pkey
   INNER JOIN kv ON kommission.fk_kv = kv.pkey WHERE
   kv.kvid = 6 
 
 How do I implement such queries? Or if this doesn't work with 
 ejb-ql or jboss-ql, what other possibilities do I have?
 
 Thanks in advance
 
 Steffen Gransow
 
 
 
 
 ---
 The SF.Net email is sponsored by EclipseCon 2004 Premiere 
 Conference on Open Tools Development and Integration See the 
 breadth of Eclipse activity. February 3-5 in Anaheim, CA.
 http://www.eclipsecon.org/osdn
 ___
 JBoss-user mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/jboss-user
 
 


---
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


RE: [JBoss-user] Problem when query contains international characters

2004-01-28 Thread Alexey Loubyansky
It works fine for me with statically encoded russian text and passed in as a 
parameter. 

  String name = XXX; // some russian text

  log.debug(avoka:  + home.findByName(name));
  log.debug(avoka:  + home.select(SELECT OBJECT(o) FROM A AS o WHERE 
o.name=?1, new Object[]{name}));

// for dynamic case you need to decode it from the source encoding to the JVM default 
one
  name = new String(name.getBytes(windows-1251), ISO-8859-1);
  log.debug(avoka:  + home.select(SELECT OBJECT(o) FROM A AS o WHERE o.name=' 
+ name + ', null));

 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf Of 
 Milen Dyankov
 Sent: Tuesday, January 27, 2004 6:25 PM
 To: [EMAIL PROTECTED]
 Subject: Re: [JBoss-user] Problem when query contains 
 international characters
 
 People please, is my question too complicated or too stupid ??
 
 I think I may be narrowed down it to this:
 
 Somewhere in generated from JBossQLParser.jjt and/or 
 EJBQLParser.jjt 
 files,
 my string  =  [261,281,380,378,263,347,322,243,324]
 changes like it was converted to UTF-16 - 
 [1,5,1,25,1,124,1,122,1,7,1,91,1,66,?,243,1,68]
 and then the odd bites were trimmed out 
 [5,25,124,122,7,91,66,243,68] = |z [BD
 
 Anyone ever experienced a problem like this before?
 Have someone ever managed to make JBoss-Tomcat-Struts 
 application to find entities using characters outside of the 
 Latin1 scope?
 What character encoding you have used? Is UTF-8 not 
 recommended for some reason?
 
 Please, any hint will be highly appreciated!
 
 Milen Dyankov
 
 
 
 
 
 ---
 The SF.Net email is sponsored by EclipseCon 2004 Premiere 
 Conference on Open Tools Development and Integration See the 
 breadth of Eclipse activity. February 3-5 in Anaheim, CA.
 http://www.eclipsecon.org/osdn
 ___
 JBoss-user mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/jboss-user
 
 


---
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


RE: [JBoss-user] ejb-ql problem

2004-01-27 Thread Alexey Loubyansky
Not yet. The spec does not allow to select more than one field. 

 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf Of 
 [EMAIL PROTECTED]
 Sent: Tuesday, January 27, 2004 5:31 PM
 To: [EMAIL PROTECTED]
 Subject: [JBoss-user] ejb-ql problem
 
 Hi all, I´m trying to do this with ejb-ql but I cannot get it works:
 
 'SELECT DISTINCT a.phone_oper, a.oper_description FROM 
 Dyt_orc_area_off_cSchema as a'
 
 when I deploy the bean it drops:
 
 12:25:53,522 ERROR [EntityContainer] Starting failed
 org.jboss.deployment.DeploymentException: Error compiling 
 EJB-QL statement 'SELECT DISTINCT a.phone_oper, 
 a.oper_description FROM Dyt_orc_area_off_cSchema as a'; - 
 nested throwable:
 (org.jboss.ejb.plugins.cmp.ejbql.ParseException: Encountered 
 , at line 1, column 29.
 Was expecting:
 FROM ...
 )
 at
 org.jboss.ejb.plugins.cmp.jdbc.JDBCEJBQLQuery.init(JDBCEJBQL
 Query.java:46)
 at
 org.jboss.ejb.plugins.cmp.jdbc.JDBCCommandFactory.createEJBQLQ
 uery(JDBCComma
 ndFactory.java:53)
 
 If I get only 1 field it works.
 Is there any way to do what I want?
 
 
 Regards,
 Hernán.
 
 
 ---
 The SF.Net email is sponsored by EclipseCon 2004 Premiere 
 Conference on Open Tools Development and Integration See the 
 breadth of Eclipse activity. February 3-5 in Anaheim, CA.
 http://www.eclipsecon.org/osdn
 ___
 JBoss-user mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/jboss-user
 
 


---
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


RE: [JBoss-user] IS (NOT) EMPTY EJBQL supported in JBoss for mysql ?

2004-01-23 Thread Alexey Loubyansky
This is fixed now in JBoss-3.2.4RC1. Thanks. 

 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf Of 
 Stephane Nicoll
 Sent: Friday, January 23, 2004 12:47 PM
 To: JBoss user (E-mail)
 Subject: [JBoss-user] IS (NOT) EMPTY EJBQL supported in JBoss 
 for mysql ?
 
 Hello,
 
 I've seen people complaining about this but not a message 
 saying whether it's a bug or not.
 
 We use JBoss 3.2.3 with a mySQL database 4.0.16 and the 
 latest JDBC driver.
 We noticed that IS EMPTY or IS NOT EMPTY ejb ql are badly 
 translated by JBoss. Here's an example:
 
 
 * @ejb.finder
 * signature=java.util.Collection
 findByCountryIdAndHasScanner(java.lang.String countryId)
 * result-type-mapping=Local
 * method-intf=LocalHome
 * query=SELECT OBJECT(o) FROM KP o WHERE o.country.countryId 
 = ?1 AND o.scanners IS NOT EMPTY
 
 JBoss translates this to the following SQL:
 
 SELECT DISTINCT t0_o.kp_id FROM kp t0_o, country t1_o_country 
 WHERE (t1_o_country.country_id = ? AND 
 t2_o_scanners.scanner_id IS NOT NULL AND
 t0_o.country_id=t1_o_country.country_id)
 
 t2_o_scanners is never defined. 
 
 Is it a bug? How can we manage to define this query without 
 the IS (NOT) EMPTY clause?
 
 Regards,
 
 Stephane
 
 
 ---
 The SF.Net email is sponsored by EclipseCon 2004 Premiere 
 Conference on Open Tools Development and Integration See the 
 breadth of Eclipse activity. February 3-5 in Anaheim, CA.
 http://www.eclipsecon.org/osdn
 ___
 JBoss-user mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/jboss-user
 
 


---
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


RE: [JBoss-user] Commit Option A and ejbCreate

2004-01-22 Thread Alexey Loubyansky
Please, submit a bug report and I will look at it.

 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf Of 
 Neal Sanche
 Sent: Thursday, January 22, 2004 12:56 AM
 To: jboss-user
 Subject: [JBoss-user] Commit Option A and ejbCreate
 
 Hi All,
 
 I have recently been experimenting with Commit Option A and 
 have noticed on rare occasions that creation of an EJB and 
 subsequent setting of some of its CMRs will fail with an EJB 
 spec violation in JBoss 3.2.4RC1. The exception mentions that 
 the CMR should only be set in the ejbPostCreate. However, I 
 am not actually setting any CMRs in the ejbCreate, I am doing 
 so in subsequent lines of the code. For
 example:
 
   MYEJBLocal ejb = myhome.create();
   ejb.setRelatedItem(item);
 
 The exception will occur on the call to setRelatedItem() 
 which is a CMR method, which is in this case a one to one 
 relation. I am also using the unknown-pk functionality with 
 mysql to have auto-incrementing primary keys, if that makes a 
 difference.
 
 So far, this doesn't ever happen when the commit option is B, 
 which is the default in the Entity container.
 
 Any ideas?
 
 -Neal
 
 
 
 ---
 The SF.Net email is sponsored by EclipseCon 2004 Premiere 
 Conference on Open Tools Development and Integration See the 
 breadth of Eclipse activity. February 3-5 in Anaheim, CA.
 http://www.eclipsecon.org/osdn
 ___
 JBoss-user mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/jboss-user
 
 


---
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


RE: [JBoss-user] information regarding locking policies

2004-01-22 Thread Alexey Loubyansky
In Instance Per Transaction container each transaction gets its own
cache of instances, i.e. each one get its own copy of persistent data.
And, thus, allows different transactions to access the same persistence
data at the same time.

 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf Of 
 Stephane Nicoll
 Sent: Thursday, January 22, 2004 3:12 PM
 To: JBoss user (E-mail)
 Subject: [JBoss-user] information regarding locking policies
 
 Hello list,
 
 I sent a mail a while ago regarding tx lock and got no 
 response so far. 
 http://www.mail-archive.com/[EMAIL PROTECTED]/m
 sg32131.html
 
 As a quick recall, we are creating entities X. For this we 
 need to test that an instance of entity A,B,C,D and E exist 
 (that is X could be crated only if an instance of A with 
 particular key exist on the DB, etc).
 
 So A,B,C,D and E are READ-ONLY. We noticed that using an MDB 
 to create our entity X, nothing was done in parallel.
 
 We changed to the one instance per transaction container 
 configuration and it worked quite fine. I would like to have 
 more detail about this container. Is it as safe as the 
 default one. What coult be the transaction problem?
 
 Regards,
 
 Stephane
 
 
 ---
 The SF.Net email is sponsored by EclipseCon 2004 Premiere 
 Conference on Open Tools Development and Integration See the 
 breadth of Eclipse activity. February 3-5 in Anaheim, CA.
 http://www.eclipsecon.org/osdn
 ___
 JBoss-user mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/jboss-user
 
 


---
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


RE: [JBoss-user] How to configure locking mechanism for EnityBeans - optimistic vs pessimistic? In the entire JBoss system?

2004-01-17 Thread Alexey Loubyansky
No, at the moment OL is condfigured per entity. 

 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf Of 
 Sasidharan, Manoj
 Sent: Saturday, January 17, 2004 2:00 AM
 To: [EMAIL PROTECTED]
 Subject: [JBoss-user] How to configure locking mechanism for 
 EnityBeans - optimistic vs pessimistic? In the entire JBoss system?
 
 Any ideas?? Is there any one place where the user can make a 
 change and all locking mechanisms become optimistic or pessimistic?
 
 Please let know.
 
 rgds
 MS



---
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


RE: [JBoss-user] How to configure locking mechanism for EnityBeans- optimistic vs pessimistic? In the entire JBoss system?

2004-01-17 Thread Alexey Loubyansky
No, it does not depend on the container configuration anymore (AFAIR
since 3.2.2). You could configure OL with pessimistic locking. It does
not make sense unless in a cluster.

 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf Of 
 Adrian Brock
 Sent: Saturday, January 17, 2004 2:18 AM
 To: [EMAIL PROTECTED]
 Subject: Re: [JBoss-user] How to configure locking mechanism 
 for EnityBeans- optimistic vs pessimistic? In the entire JBoss system?
 
 On Fri, 2004-01-16 at 23:59, Sasidharan, Manoj wrote:
  Any ideas?? Is there any one place where the user can make a change 
  and all locking mechanisms become optimistic or pessimistic?
  
 
 The dtd says does not list it as an option in the defaults element.
 It also depends upon the container configuration in 
 [standard]jboss.xml
 
 Regards,
 Adrian



---
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


RE: [JBoss-user] JBoss 3.2.3 commit option B or C a lot slower than JBoss 3.2.1

2004-01-17 Thread Alexey Loubyansky



If we didn't check any dirty flag you would not be able to 
update the data.

  
  
  From: [EMAIL PROTECTED] 
  [mailto:[EMAIL PROTECTED] On Behalf Of Boulatian, 
  MisakSent: Saturday, January 17, 2004 2:38 AMTo: 
  [EMAIL PROTECTED]Subject: RE: [JBoss-user] JBoss 
  3.2.3 commit option B or C a lot slower than JBoss 3.2.1
  
  There are some bugs in JBoss 3.2.1 that forced us move to 3.2.3. For 
  example, in commit option C we would get warning 'unable to return to the pool 
  due to ctx lock' every time that type of bean was being used. There was also 
  another bug using version control attribute: cmp field could not be specified 
  as a version control attribute that did not work with us. It seems like 
  we
  cannot use JBoss 3.2.1 anymore because of these bugs 
  so I cannot really prove if CMP 1.1 is faster than CMP 2.0 but I know that 
  'modified' flag helped us minimize database synchs. How is it done in CMP 2.0? 
  From the traces I can tell that JBoss does not check any dirty flag. 
  
  It 
  seems like we are kind of stuck, don't know how to configure JBoss running 
  with cluster. None of the options like cache invalidation with commit option 
  A, regular cluster configuration, or even using commit option C without 
  cluster with row level locking in DB,give us normal speed to go to 
  production.


RE: [JBoss-user] How to configure locking mechanism for EnityBean s - optimistic vs pessimistic?

2004-01-17 Thread Alexey Loubyansky



The OL and its tests where completely rewritten in 
3.2.2.

  
  
  From: [EMAIL PROTECTED] 
  [mailto:[EMAIL PROTECTED] On Behalf Of Peter 
  LuttrellSent: Saturday, January 17, 2004 2:55 AMTo: 
  [EMAIL PROTECTED]Subject: Re: [JBoss-user] How to 
  configure locking mechanism for EnityBean s - optimistic vs 
  pessimistic?
  Where are these test beans used? In other words, where is the code 
  for the test cases located?I just did a text search of the 3.2.1-src i 
  have and couldn't find the text "EntityModifiedLocking" in any files other 
  then the deployment descriptors.


RE: [JBoss-user] Help with JBossQL

2004-01-16 Thread Alexey Loubyansky
It was introduced in 3.2.2. 

 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf Of Luis
 Sent: Friday, January 16, 2004 5:32 PM
 To: [EMAIL PROTECTED]
 Subject: RE: [JBoss-user] Help with JBossQL
 
 I have implemented a dynamic query using xdoclet as
 follows:
 
 1. @ejb.finder
 query=
 signature=java.util.Collection
 findMaxId(java.lang.String sql,java.lang.Obj[] args)
 
 2. @jboss.query
signature=java.util.Collection
 findMaxId(java.lang.String sql,java.lang.Obj[] args)
dynamic=true
 
 
 in the client the call is:
 
 findMaxId(SELECT MAX(a.id) FROM Marca as a,new Object[0]);
 
 When I try to use this I get an error: 
 
 ERROR[STDERR] javax.ejb.FinderException: Error compiling ejbql:
 org.jboss.ejb.plugins.cmp.ejbql.ParseException:
 Encountered MAX at line 1, col 8.
 Was expecting one of:
DISTINCT
OBJECT...
 
 I am using jboss 3.2.1. Can anybody tell me what is wrong 
 here, I would appreciate a lot your help.



---
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


RE: [JBoss-user] EnityBeans: Optimistic Locking Help

2004-01-16 Thread Alexey Loubyansky
It is called detachment, i.e. an instance that represents persistent
data is read in one transaction, detached from it and then attached to
another (updating) transaction.
It is not possible in CMP.

 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf Of 
 Peter Luttrell
 Sent: Thursday, January 15, 2004 7:21 PM
 To: [EMAIL PROTECTED]
 Subject: [JBoss-user] EnityBeans: Optimistic Locking Help
 
 
 Can JBoss handle cmp optimistic locking that spans web requests?
 
 Here's the scenario that i'm trying to get working: Open two 
 browser windows and display a value for a sample field. 
 Update the value on one.
 Then update the value on the second, without refreshing 
 first, and i'm hoping to get an exception signifying the 
 stale data displayed, but i don't the update works fine. If 
 this is possible, how do i make this happen?
 
 I have constructed a very simple sample project based on the 
 optimistic locking section in the paydocs and have tried all 
 but the UID method of locking but can't seam to get it to 
 work. I'm wondering if someone might be able to identify what 
 i have wrong.
 
 The sample project can be downloaded here:
 http://www.sharpuniverse.com/jboss/entitybeanlocking/sample.zi
 p All you'll need to is set your jboss install dir in the 
 build.properties then run the deploy target and go to the 
 entitybeanlocking context.
 
 The JSP page reads the value from the db, puts the entitybean 
 in the session and displays the current value to the page. On 
 subsequent requests it gets the entitybean out of the 
 session. The update servlet gets the entitybean out of the 
 session and updates the value. In order to get optimistic 
 locking working, it sounds like i need to get and set the 
 value from the same reference, hence why i'm putting the 
 entity bean reference in the session.
 
 The documentation refers optimistic locking working within 
 the transaction, which could be my problem considering i'm 
 executing across multiple web requests. If this is the 
 problem, can anyone suggest a strategy for getting it to work.
 
 thanks.
 .peter
 
 
 
 
 --
 CONFIDENTIALITY NOTICE: This e-mail message, including any 
 attachments,is for the sole use of the intended recipient(s), 
 even if addressed incorrectly, and may contain confidential 
 and privileged information.  Any unauthorized review, use, 
 disclosure or distribution is prohibited.  If you are not the 
 intended recipient, please contact the sender by reply e-mail 
 and destroy or delete all copies of the original message and 
 all attachments, including deletion from the trash or 
 equivalent folder.  Thank you.
 
 


---
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


RE: [JBoss-user] Knowing when a CMP bean is modified

2004-01-16 Thread Alexey Loubyansky



Lastlycould I ask if u 
know of a non jboss specific way to know when a CMP Bean is 
modified??

The spec does not define it, so, the answer is 
no.



RE: [JBoss-user] CMP: error with cascade delete

2004-01-16 Thread Alexey Loubyansky
It works for me with 3.2.4RC1. I belive my testcase would work for me in
3.2.3 too. Could you provide me with your testcase?

 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf Of 
 Panagiotis Korros
 Sent: Friday, January 16, 2004 1:27 PM
 To: [EMAIL PROTECTED]
 Subject: RE: [JBoss-user] CMP: error with cascade delete
 
 This happens on Jboss 3.2.3 (build: 200311301445) on a 
 Windows 2000 Server machine.
 
 -Original Message-
 From: Panagiotis Korros
 Sent: Friday, January 16, 2004 12:59 PM
 To: [EMAIL PROTECTED]
 Subject: [JBoss-user] CMP: error with cascade delete
 
 I get the following error
 TransactionRolledbackLocalException in method: public abstract void
 javax.ejb.EJBLocalObject.remove() throws 
 javax.ejb.RemoveException,javax.ejb.EJBException, causedBy:
 javax.ejb.NoSuchObjectLocalException: Entity not found: 
 primaryKey=84 ... (for complete stack trace go to the end of 
 this message)
 
 I have some EJBs to represent a Organization Chart.
 
 OrganizationalUnitTypeLocal
 OrganizationalUnitLocal
 PositionLocal
 
 The relations are:
 OrganizationalUnit has one OrganizationalUnitType 
 OrganizationalUnit belongs to one or none OrganizationalUnit 
 Position belongs to one OrganizationalUnit
 
 All these relations are configured for cascade delete.
 
 I create the following instances:
 
 OrganizationalUnitTypeLocal/4
 OrganizationalUnitLocal/79 (type 4, parent NULL)
   OrganizationalUnitLocal/80 (type x, parent
 OrganizatonalUnitLocal/79)
   OrganizationalUnitLocal/83 (type x, parent
 OrganizatonalUnitLocal/80)
   OrganizationalUnitLocal/84 (type 4, parent
 OrganizatonalUnitLocal/83)
   OrganizationalUnitLocal/85 (type 4, parent
 OrganizatonalUnitLocal/83)
 
 
 The problem occures when I try to remove 
 OrganizationalUnitTypeLocal/4. 
 
 From the trace I see that jboss correctly deletes all the 
 instances and then tries to load OrganizationalUnitLocal/84 
 but this is deleted so this exception occures and the 
 transaction is rolled back.
 
 12:25:51,406 DEBUG [OrganizationalUnitType#findByPrimaryKey] Executing
 SQL: SELECT id FROM tou_type WHERE id=?
 12:25:51,421 DEBUG [OrganizationalUnitType] Executing SQL: 
 SELECT name FROM tou_type WHERE (id=?)
 12:25:51,421 DEBUG [OrganizationalUnitType] Executing SQL: 
 SELECT id FROM tou WHERE (type=?)
 12:25:51,437 DEBUG [OrganizationalUnit] Executing SQL: SELECT 
 id, code, name, imported, status, parent_ou FROM tou WHERE 
 (id=?) OR (id=?) OR
 (id=?)
 12:25:51,437 DEBUG [OrganizationalUnit] Executing SQL: UPDATE 
 tou SET type=? WHERE id=?
 12:25:51,453 DEBUG [OrganizationalUnit] Rows affected = 1
 12:25:51,453 DEBUG [OrganizationalUnit] Executing SQL: UPDATE 
 tou SET type=? WHERE id=?
 12:25:51,453 DEBUG [OrganizationalUnit] Rows affected = 1
 12:25:51,453 DEBUG [OrganizationalUnit] Executing SQL: UPDATE 
 tou SET type=? WHERE id=?
 12:25:51,453 DEBUG [OrganizationalUnit] Rows affected = 1
 12:25:51,453 DEBUG [OrganizationalUnitType] Executing SQL: 
 DELETE FROM tou_type WHERE id=?
 12:25:51,453 DEBUG [OrganizationalUnitType] Remove: Rows affected = 1
 12:25:51,453 DEBUG [OrganizationalUnitType] Removing
 ejb/OrganizationalUnitLocal:79
 12:25:51,453 DEBUG [OrganizationalUnit] Executing SQL: SELECT 
 belongs_to_ou, id FROM tposition WHERE (belongs_to_ou=?) OR
 (belongs_to_ou=?) OR (belongs_to_ou=?)
 12:25:51,468 DEBUG [OrganizationalUnit] Executing SQL: SELECT 
 parent_ou, id FROM tou WHERE (parent_ou=?) OR (parent_ou=?) 
 OR (parent_ou=?) 12:25:51,500 DEBUG [OrganizationalUnit] 
 Executing SQL: SELECT code, name, imported, status, type FROM 
 tou WHERE (id=?) 12:25:51,500 DEBUG [OrganizationalUnit] 
 Executing SQL: UPDATE tou SET parent_ou=? WHERE id=?
 12:25:51,500 DEBUG [OrganizationalUnit] Rows affected = 1 
 12:25:51,500 DEBUG [OrganizationalUnit] Executing SQL: SELECT 
 id FROM tposition WHERE
 (belongs_to_ou=?)
 12:25:51,515 DEBUG [OrganizationalUnit] Executing SQL: SELECT 
 id FROM tou WHERE (parent_ou=?)
 12:25:51,515 DEBUG [OrganizationalUnit] Executing SQL: SELECT 
 code, name, imported, status, type FROM tou WHERE (id=?)
 12:25:51,718 DEBUG [OrganizationalUnit] Executing SQL: UPDATE 
 tou SET parent_ou=? WHERE id=?
 12:25:51,734 DEBUG [OrganizationalUnit] Rows affected = 1
 12:25:51,734 DEBUG [OrganizationalUnit] Executing SQL: SELECT 
 id FROM tposition WHERE (belongs_to_ou=?)
 12:25:51,734 DEBUG [OrganizationalUnit] Executing SQL: SELECT 
 id FROM tou WHERE (parent_ou=?)
 12:25:51,734 DEBUG [OrganizationalUnit] Executing SQL: UPDATE 
 tou SET parent_ou=? WHERE id=?
 12:25:51,750 DEBUG [OrganizationalUnit] Rows affected = 1 
 12:25:51,750 DEBUG [OrganizationalUnit] Executing SQL: DELETE 
 FROM tou WHERE id=?
 12:25:51,750 DEBUG [OrganizationalUnit] Remove: Rows affected 
 = 1 12:25:51,750 DEBUG [OrganizationalUnit] Executing SQL: 
 UPDATE tou SET parent_ou=? WHERE id=?
 12:25:51,750 DEBUG [OrganizationalUnit] Rows affected = 1 
 

RE: [JBoss-user] JBoss 3.2.3 commit option B or C a lot slower than JBoss 3.2.1

2004-01-16 Thread Alexey Loubyansky



Why don't you try to run CMP2.0 version of your app on 
3.2.1 and see whether it's true.
What your experience shows is that CMP1.1 app is faster 
than CMP2.0.

  
  
  From: [EMAIL PROTECTED] 
  [mailto:[EMAIL PROTECTED] On Behalf Of Boulatian, 
  MisakSent: Friday, January 16, 2004 10:22 PMTo: 
  [EMAIL PROTECTED]Subject: [JBoss-user] JBoss 3.2.3 
  commit option B or C a lot slower than JBoss 3.2.1
  
  Hi,
  
  It seems like 
  JBoss 3.2.3 commit option B or C a lot slower than JBoss 3.2.1 with same 
  commit options. The only difference is that with JBoss 3.2.1 we were running 
  CMP 1.1 with 'modified' flag optimization to minimize the number of 
  synchronizations with Database (it served as some kind of dirty bit for an 
  instance of entity bean). With JBoss 3.2.3 we moved to CMP 2.0 and lost the 
  option to use 'modified' optimization. Can this be the source of slowdown? By 
  the way, all my get methods are declared to be read only in the jboss.xml. 
  Here is a piece of log that I got:
  
  - 
  JBOSS 3.2.3 with Commit-Option B (Sybase row-level locking)
  
  I am doing a findBy***() to retrieve a Collection 
  of references to an Entity Bean. While iterating through the collection, it 
  appears that a SELECT statement is executed for every get() method that is 
  called.In addition, the response time of each 
  SELECT statement is ~300ms. How can I improve this performance? The 
  Entity Bean is configured for transaction "Required".
  See logs below:
  2004-01-16 08:45:22,706 136813 DEBUG 
  [org.jboss.ejb.plugins.cmp.jdbc.JDBCEJBQLQuery.PositionDetail#findByAccountId] 
  (TP-Processor4:) Executing SQL: SELECT t0_o.accountId, t0_o.accountType, 
  t0_o.countryCode, t0_o.currency, t0_o.symbol, t0_o.symbolType FROM 
  PositionDetail t0_o WHERE (t0_o.accountId = ?)
  2004-01-16 08:45:22,706 136813 TRACE 
  [org.jboss.resource.connectionmanager.JBossManagedConnectionPool] 
  (TP-Processor4:) supplying ManagedConnection from pool: 
  [EMAIL PROTECTED]
  2004-01-16 08:45:22,706 136813 TRACE 
  [org.jboss.resource.connectionmanager.JBossManagedConnectionPool] 
  (TP-Processor4:) Getting connection from pool [InUse/Available/Max]: 
  [1/10/20]
  2004-01-16 08:45:23,096 137203 TRACE 
  [org.jboss.resource.connectionmanager.JBossManagedConnectionPool] 
  (TP-Processor4:) putting ManagedConnection back into pool
  2004-01-16 08:45:23,096 137203 TRACE 
  [org.jboss.resource.connectionmanager.JBossManagedConnectionPool] 
  (TP-Processor4:) Returning connection to pool [InUse/Available/Max]: 
  [0/10/20]
  2004-01-16 08:45:23,096 137203 DEBUG 
  [org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.PositionDetail] 
  (TP-Processor4:) Executing SQL: SELECT dayTradingAmount, dayTradingQuantity, 
  marketValue, nonNegPosition, oca, requiredBoxQuantity, safekeepingQuantity, 
  settlementDatePosition, tradeDatePosition, transferQuantity FROM 
  PositionDetail WHERE (accountId=? AND accountType=? AND countryCode=? AND 
  currency=? AND symbol=? AND symbolType=?)
  2004-01-16 08:45:23,096 137203 TRACE 
  [org.jboss.resource.connectionmanager.JBossManagedConnectionPool] 
  (TP-Processor4:) supplying ManagedConnection from pool: 
  [EMAIL PROTECTED]
  2004-01-16 08:45:23,096 137203 TRACE 
  [org.jboss.resource.connectionmanager.JBossManagedConnectionPool] 
  (TP-Processor4:) Getting connection from pool [InUse/Available/Max]: 
  [1/10/20]
  2004-01-16 08:45:23,300 137407 TRACE 
  [org.jboss.resource.connectionmanager.JBossManagedConnectionPool] 
  (TP-Processor4:) putting ManagedConnection back into pool
  2004-01-16 08:45:23,300 137407 TRACE 
  [org.jboss.resource.connectionmanager.JBossManagedConnectionPool] 
  (TP-Processor4:) Returning connection to pool [InUse/Available/Max]: 
  [0/10/20]
  2004-01-16 08:45:23,300 137407 DEBUG 
  [org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.PositionDetail] 
  (TP-Processor4:) Executing SQL: SELECT dayTradingAmount, dayTradingQuantity, 
  marketValue, nonNegPosition, oca, requiredBoxQuantity, safekeepingQuantity, 
  settlementDatePosition, tradeDatePosition, transferQuantity FROM 
  PositionDetail WHERE (accountId=? AND accountType=? AND countryCode=? AND 
  currency=? AND symbol=? AND symbolType=?)
  2004-01-16 08:45:23,300 137407 TRACE 
  [org.jboss.resource.connectionmanager.JBossManagedConnectionPool] 
  (TP-Processor4:) supplying ManagedConnection from pool: 
  [EMAIL PROTECTED]
  2004-01-16 08:45:23,300 137407 TRACE 
  [org.jboss.resource.connectionmanager.JBossManagedConnectionPool] 
  (TP-Processor4:) Getting connection from pool [InUse/Available/Max]: 
  [1/10/20]
  2004-01-16 08:45:23,628 137735 TRACE 
  [org.jboss.resource.connectionmanager.JBossManagedConnectionPool] 
  (TP-Processor4:) putting ManagedConnection back into pool
  2004-01-16 08:45:23,628 137735 TRACE 
  [org.jboss.resource.connectionmanager.JBossManagedConnectionPool] 
  (TP-Processor4:) Returning connection to pool [InUse/Available/Max]: 
  [0/10/20]
  2004-01-16 08:45:23,628 137735 

RE: [JBoss-user] JBoss clustering with commit option B or C too slow

2004-01-15 Thread Alexey Loubyansky



You could use commit option A with optimistic 
locking.

  
  
  From: [EMAIL PROTECTED] 
  [mailto:[EMAIL PROTECTED] On Behalf Of Boulatian, 
  MisakSent: Wednesday, January 14, 2004 7:48 PMTo: 
  [EMAIL PROTECTED]Subject: [JBoss-user] JBoss 
  clustering with commit option B or C too slow
  
  Hi,
  
  I am trying to 
  cluster JBoss 3.2.3 with CMP 2.0. Current clustering configuration doesn't 
  allow me to use commit option A (Only with cache invalidation based clustering 
  A can be used). So, I need to use commit option B or C. With CMP 1.1 there was 
  a modified flag that allowed control over synchronization with Database. With 
  CMP 2.0 the flag is of no use. I wonder if there is a way to improve 
  performance with commit option B or C using CMP 2.0. It is terribly slow in a 
  clustered environment. Is there any other way to cluster to improve 
  performance.?
  
  Thanks,
  Misak
  
  This message and 
  any attachments are intended only for the use of the addressee and may contain 
  information that is privileged and confidential. If the reader of the message 
  is not the intended recipient or an authorized representative of the intended 
  recipient, you are hereby notified that any dissemination of this 
  communication is strictly prohibited. If you have received this communication 
  in error, please notify us immediately by e-mail and delete the message and 
  any attachments from your system. 



RE: [JBoss-user] Help with JBossQL

2004-01-15 Thread Alexey Loubyansky
JBossQL  supports MAX function in SELECT that takes a CMP field as an
agrument. Hence, you should use ejbSelect.

 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf Of Luis
 Sent: Wednesday, January 14, 2004 3:56 PM
 To: [EMAIL PROTECTED]
 Subject: [JBoss-user] Help with JBossQL
 
 Hi everyone,I am trying to write a JBossQL query to get the 
 entity with the maximun value of a certain field. Something 
 similar to the SQL function MAX() but I can't get it to work. 
 Can anybody tell me the right way to do this. 
 
 Thanks in advance.
 
 __
 Do you Yahoo!?
 Yahoo! Hotjobs: Enter the Signing Bonus Sweepstakes 
 http://hotjobs.sweepstakes.yahoo.com/signingbonus
 
 
 ---
 This SF.net email is sponsored by: Perforce Software.
 Perforce is the Fast Software Configuration Management System 
 offering advanced branching capabilities and atomic changes 
 on 50+ platforms.
 Free Eval! http://www.perforce.com/perforce/loadprog.html
 ___
 JBoss-user mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/jboss-user
 
 


---
This SF.net email is sponsored by: Perforce Software.
Perforce is the Fast Software Configuration Management System offering
advanced branching capabilities and atomic changes on 50+ platforms.
Free Eval! http://www.perforce.com/perforce/loadprog.html
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


RE: [JBoss-user] Problems with deployment of EJB's in Jboss 3.2.3

2004-01-15 Thread Alexey Loubyansky
Did you modify standardjbossXXX.xml files in the conf dir? Make sure
  entity-command name=default/
is in standardjbosscmp-jdbc.xml 

 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf Of Hans Lund
 Sent: Wednesday, January 14, 2004 5:10 PM
 To: [EMAIL PROTECTED]
 Subject: [JBoss-user] Problems with deployment of EJB's in Jboss 3.2.3
 
 When I try to deploy an j2ee application on Jboss 3.2.x,  I 
 get a deployment error.
 Has anyone seen the same error, and knows the reason ( or 
 possible reasons to this error )???
 
 It seams only the SequenceEJB bean fails ( but it's  a 
 primary key generator bean - simple but needed )
 
 
 Description:
 
 in jbosscmp-jdbc.xml the following is registered on the Bean:
 
 entity
 ejb-nameSequenceEJB/ejb-name
 table-nameSequence/table-name
 cmp-field
 field-namename/field-name
 column-namename/column-name
 /cmp-field
 cmp-field
 field-namevalue/field-name
 column-namevalue/column-name
 /cmp-field
 /entity
 
 
 in ejb-jar.xml the entitybean is definded
 
 entity
 ejb-nameSequenceEJB/ejb-name
 
 local-homedk.statsbiblioteket.brugerregister.ejb.SequenceLoc
 alHome/local-home
 
 localdk.statsbiblioteket.brugerregister.ejb.SequenceLocal/local
 
 ejb-classdk.statsbiblioteket.brugerregister.ejb.SequenceBean
 /ejb-class
 persistence-typeContainer/persistence-type
 
 prim-key-classjava.lang.String/prim-key-class
 reentrantTrue/reentrant
 cmp-version2.x/cmp-version
 
 abstract-schema-nameSequence/abstract-schema-name
 cmp-field
 descriptionThe bean which 
 uses these 
 keys/description
 field-namename/field-name
 /cmp-field
 cmp-field
 descriptionThe next primary key to 
 hand out/description
 field-namevalue/field-name
 /cmp-field
 primkey-fieldname/primkey-field
 /entity
 
 
 and the transaction model:
 
 container-transaction
 descriptionTransaction attributes for 
 'SequenceEJB' methods/description
 method
 ejb-nameSequenceEJB/ejb-name
 method-name*/method-name
 /method
 trans-attributeRequired/trans-attribute
 /container-transaction
 
 
 All other entitybeans in the app- uses the Sequence and have a ref 
 defined by:
 
 ejb-local-ref
 description/
 ejb-ref-nameSequence/ejb-ref-name
 ejb-ref-typeEntity/ejb-ref-type
 
 local-homedk.statsbiblioteket.brugerregister.ejb.SequenceLoc
 alHome/local-home
 
 localdk.statsbiblioteket.brugerregister.ejb.SequenceLocal/local
 ejb-linkSequenceEJB/ejb-link
 /ejb-local-ref
 
 
 Here is some of the log ( DEBUG level ):
 
 
 2004-01-14 14:47:54,421 DEBUG [org.jboss.deployment.MainDeployer] 
 Watching new file: 
 file:/home/hal/mira/jboss-3.2.1_tomcat-4.1.24/server/default/d
 eploy/brugerregister-ejb.jar
 2004-01-14 14:47:54,421 DEBUG 
 [org.jboss.deployment.MainDeployer] create 
 step for deployment 
 file:/home/hal/mira/jboss-3.2.1_tomcat-4.1.24/server/default/d
 eploy/brugerregister-ejb.jar
 2004-01-14 14:47:54,898 DEBUG [org.jboss.ejb.EJBDeployer] Verifying 
 file:/home/hal/mira/jboss-3.2.1_tomcat-4.1.24/server/default/d
 eploy/brugerregister-ejb.jar
 2004-01-14 14:47:54,993 DEBUG 
 [org.jboss.ejb.EJBDeployer.verifier] Bean 
 checked: AddressEJB: Verified.
 2004-01-14 14:47:55,000 DEBUG 
 [org.jboss.ejb.EJBDeployer.verifier] Bean 
 checked: SyncAttributeEJB: Verified.
 2004-01-14 14:47:55,010 DEBUG 
 [org.jboss.ejb.EJBDeployer.verifier] Bean 
 checked: AttributeEJB: Verified.
 2004-01-14 14:47:55,026 DEBUG 
 [org.jboss.ejb.EJBDeployer.verifier] Bean 
 checked: CustomerEJB: Verified.
 2004-01-14 14:47:55,030 DEBUG 
 [org.jboss.ejb.EJBDeployer.verifier] Bean 
 checked: SequenceEJB: Verified.
 2004-01-14 14:47:55,059 DEBUG 
 [org.jboss.ejb.EJBDeployer.verifier] Bean 
 checked: CprFacadeEJB: Verified.
 2004-01-14 14:47:55,070 DEBUG 
 [org.jboss.ejb.EJBDeployer.verifier] Bean 
 checked: ApplicationFacadeEJB: Verified.
 2004-01-14 14:47:55,108 DEBUG [org.jboss.ejb.EJBDeployer] Deploying: 
 file:/home/hal/mira/jboss-3.2.1_tomcat-4.1.24/server/default/d
 eploy/brugerregister-ejb.jar
 2004-01-14 14:47:55,108 DEBUG 

RE: [JBoss-user] JbossQL SUM (was: [jboss4 and EJB2.1 ejb-ql?])

2004-01-15 Thread Alexey Loubyansky
You must use ejbSelect. Define it in ejb-jar.xml and overwrite it in
jbosscmp-jdbc.xml the same way as a finder query. You could also check
the testsuite for cmp2/ejbselect. Though, it usese dynamic queries.

 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf Of 
 Darren Hartford
 Sent: Wednesday, January 14, 2004 11:23 PM
 To: [EMAIL PROTECTED]
 Subject: [JBoss-user] JbossQL SUM (was: [jboss4 and EJB2.1 ejb-ql?])
 
 I have the paid-for docs, full google, and several days later 
 I still do not know how to use the JbossQL to get a SUM.  
 Could someone enlighten me please? It should have been simple...
 
 -D
 
 --__--__--
 Subject: RE: [JBoss-user] RE: jboss4 and EJB2.1 ejb-ql?
 Date: Mon, 12 Jan 2004 16:25:24 -0600
 From: Alexey  Loubyansky [EMAIL PROTECTED]
 
 You answered the question yourself. ejb.select - method 
 level, jboss.query - class level.
 
  -Original Message-
  /**
   * @ejb.select
   *signature=3Djava.util.Float=20
  ejbSelectStoreSum(java.lang.String store, java.util.Date theday)
   *query =3D SELECT o.amountpaid FROM Store AS o WHERE=20
  ((o.store =3D ?1) AND (o.transday=3D?2))
   * @jboss.query
   *signature=3Djava.util.Float=20
  ejbSelectStoreSum(java.lang.String store , java.util.Date theday)
   *strategy=3Dnone
   *query =3D SELECT SUM(o.amountpaid) FROM Store AS o WHERE=20
  ((o.store =3D ?1) AND (o.transday=3D?2))
  **/
 
 
 ---
 This SF.net email is sponsored by: Perforce Software.
 Perforce is the Fast Software Configuration Management System 
 offering advanced branching capabilities and atomic changes 
 on 50+ platforms.
 Free Eval! http://www.perforce.com/perforce/loadprog.html
 ___
 JBoss-user mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/jboss-user
 
 


---
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


RE: [JBoss-user] Knowing when a CMP bean is modified

2004-01-15 Thread Alexey Loubyansky



There is an optimistic locking strategy that could be what 
you are intersted in. It is configured in jbosscmp-jdbc.xml
 
optimistic-locking 
timestamp-column/ 
field-nameversion/field-name 
column-nameol_timestamp/column-name 
jdbc-typeTIMESTAMP/jdbc-type 
sql-typeDATETIME/sql-type 
/optimistic-locking



From: 
[EMAIL PROTECTED] 
[mailto:[EMAIL PROTECTED] On Behalf Of ed 
banfaSent: Thursday, January 15, 2004 6:06 PMTo: 
[EMAIL PROTECTED]Subject: [JBoss-user] Knowing when a 
CMP bean is modified

  
  Hello all,
  
  I would like to know when my CMP bean has been modified so as to keep a 
  last modified
  marker on the bean, I would like to keep track of the exact time a record 
  was updated.
  Has anybody done similar work?
  I would apreciate any advice/tips.
  
  Thanks in advance
  EdEDWARD BANFANETPLAY TECHNOLOGIES INC.JOS, 
  PLATEAU STATENIGERIA.
  
  
  Do you Yahoo!?Yahoo! Hotjobs: Enter 
  the "Signing Bonus" Sweepstakes


RE: [JBoss-user] Defining Load groups with xdoclet

2004-01-12 Thread Alexey Loubyansky
There is
 * @jboss.load-group name=basic 

On the class level it declares the load group. On the field level you
actually specify which fields comprise the group.

 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf Of 
 Jonathan.O'[EMAIL PROTECTED]
 Sent: Monday, January 12, 2004 7:41 PM
 To: [EMAIL PROTECTED]
 Subject: [JBoss-user] Defining Load groups with xdoclet
 
 Just wondering if there is any tag to setup load groups using XDoclet.
 From my own search, I think the answer is no. So, how do I 
 set up a merge point to do this.
 I have added a mergeDir=myMergeDir in the ejbDoclet ant task.
 I have also added a file jbosscmp-jdbc-Settlement.xml into 
 the mergeDir. 
 This file just contains:
 load-groups
 load-group
 load-group-namesortKeys/load-group-name
 field-namemerchantName/field-name
 field-nameamount/field-name
 field-nametxnDateDbFormat/field-name
 /load-group
 /load-groups
 
 However, I don't see any load-groups in my Settlement entity 
 within the generated jbosscmp-jdbc.xml.
 
 Any help is greatly appreciated.
 Ciao,
 Jonathan O'Connor
 XCOM Dublin
 
 
 ---
 This SF.net email is sponsored by: Perforce Software.
 Perforce is the Fast Software Configuration Management System 
 offering advanced branching capabilities and atomic changes 
 on 50+ platforms.
 Free Eval! http://www.perforce.com/perforce/loadprog.html
 ___
 JBoss-user mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/jboss-user
 
 


---
This SF.net email is sponsored by: Perforce Software.
Perforce is the Fast Software Configuration Management System offering
advanced branching capabilities and atomic changes on 50+ platforms.
Free Eval! http://www.perforce.com/perforce/loadprog.html
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


RE: [JBoss-user] RE: jboss4 and EJB2.1 ejb-ql?

2004-01-12 Thread Alexey Loubyansky
You answered the question yourself. ejb.select - method level,
jboss.query - class level.

 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf Of 
 Darren Hartford
 Sent: Monday, January 12, 2004 9:29 PM
 To: [EMAIL PROTECTED]
 Subject: [JBoss-user] RE: jboss4 and EJB2.1 ejb-ql?
 
 Been trying to get this to work, but no luck. How do you use 
 JbossQL with Xdoclet for an EJB.SELECT? The following does 
 not work, and some of the mailing lists mention that 
 jboss.query is NOT for SELECT (SELECT is method level while 
 jboss.query is class level), so what would one use?
 
 /**
  * @ejb.select
  *signature=java.util.Float 
 ejbSelectStoreSum(java.lang.String store, java.util.Date theday)
  *query = SELECT o.amountpaid FROM Store AS o WHERE 
 ((o.store = ?1) AND (o.transday=?2))
  * @jboss.query
  *signature=java.util.Float 
 ejbSelectStoreSum(java.lang.String store , java.util.Date theday)
  *strategy=none
  *query = SELECT SUM(o.amountpaid) FROM Store AS o WHERE 
 ((o.store = ?1) AND (o.transday=?2))
 **/
 
 p.s. seems silly to declare an ejb.select for a JbossQL SUM 
 that you know will not work as expected outside of Jboss.
 
 TIA!!
 -D
 
 Subject: RE: [JBoss-user] jboss4 and EJB2.1 ejb-ql?
 Date: Thu, 8 Jan 2004 09:03:55 -0600
 From: Alexey  Loubyansky [EMAIL PROTECTED]
 
 Check these change notes. EJB2.1 is not yet supported but you 
 can do it in JBossQL in 3.2 and HEAD.
 
 [ 794199 ] Functions in SELECT clause
 http://sourceforge.net/tracker/?func=3Ddetailaid=3D794199gro
 up_id=3D228=
 66at
 id=3D381174
 [ 815115 ] JBossQL: SUM, AVG, MAX, MIN
 http://sourceforge.net/tracker/?func=3Ddetailaid=3D815115gro
 up_id=3D228=
 66at
 id=3D381174=20
 
  -Original Message-
  From: [EMAIL PROTECTED]
  [mailto:[EMAIL PROTECTED] On Behalf Of=20  
 Darren Hartford
  Sent: Thursday, January 08, 2004 4:45 PM
  To: [EMAIL PROTECTED]
  Subject: [JBoss-user] jboss4 and EJB2.1 ejb-ql?
 =20
  Hey all,
  Grabbed a snapshot of 4.0DR3 as it is the most recent to see=20  if 
 the aggregate functions defined in EJB2.1 are ready to go.=20  
 Unfortunately, this query did not work or my code is wrong.
 =20
  EJB-QL
  SELECT SUM(o.amountpaid) FROM MyTable AS o
  Jboss-QL
  SELECT SUM(o.amountpaid) FROM MyTable AS o
 
 
 ---
 This SF.net email is sponsored by: Perforce Software.
 Perforce is the Fast Software Configuration Management System 
 offering advanced branching capabilities and atomic changes 
 on 50+ platforms.
 Free Eval! http://www.perforce.com/perforce/loadprog.html
 ___
 JBoss-user mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/jboss-user
 
 


---
This SF.net email is sponsored by: Perforce Software.
Perforce is the Fast Software Configuration Management System offering
advanced branching capabilities and atomic changes on 50+ platforms.
Free Eval! http://www.perforce.com/perforce/loadprog.html
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


RE: AW: [JBoss-user] JBoss 3.2.4 and Oracle9i: SQLException: Invalid conversion requested

2004-01-09 Thread Alexey Loubyansky



As I understand, this is Oracle's new feature that is not 
backward compatible and resulted in a bug in JBossCMP default type mapping that 
is fixed now.

  
  
  From: [EMAIL PROTECTED] 
  [mailto:[EMAIL PROTECTED] On Behalf Of shubhu 
  muttaSent: Friday, January 09, 2004 5:47 AMTo: 
  [EMAIL PROTECTED]Subject: Re: AW: [JBoss-user] JBoss 
  3.2.4 and Oracle9i: SQLException: Invalid conversion 
  requested
  
  Hi Heiko,
  
  Is this a bug with Oracle or withJBoss ? Does Oracle Client 9.2.0.4 
  work well with other App. Servers without makingchanges in the Data type 
  mapping ?
  
  regards,
  Shubhu"Rupp, Heiko" [EMAIL PROTECTED] 
  wrote:
  

Hi,

there is a bug report open on this (#729719)

https://sourceforge.net/tracker/?func=detailatid=376687aid=729719group_id=22866
Can you confirm/verify the solution from there?
 Heiko

  -Ursprüngliche Nachricht- Von: 
  [EMAIL PROTECTED]im Auftrag vonshubhu 
  mutta Gesendet: Mo 05.01.2004 09:35 An: 
  [EMAIL PROTECTED] Cc: Betreff: 
  [JBoss-user] JBoss 3.2.4 and Oracle9i: SQLException: Invalid conversion 
  requested 
  Hi,
  I updated my Oracle Client from 9.2.0.1 to 9.2.0.4. Jboss is 3.2.0. 

  
  After that I tried to execute my application and got this in 
  server.log: 
  javax.ejb.EJBException: Internal error setting parameters for field 
  status; CausedByException is:
  Invalid conversion requested
  java.sql.SQLException: Invalid conversion requested
  at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java)
  at 
  oracle.jdbc.driver.OraclePreparedStatement.setObject(OraclePreparedStatement.java)
  at 
  oracle.jdbc.driver.OraclePreparedStatement.setObject(OraclePreparedStatement.java)
  at 
  org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.setObject(WrappedPreparedStatement.java:607)
  at 
  org.jboss.ejb.plugins.cmp.jdbc.JDBCUtil.setParameter(JDBCUtil.java:280)
  at 
  org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCAbstractCMPFieldBridge.setArgumentParameters(JDBCAbstractCMPFieldBridge.java:301)
  at 
  org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCAbstractCMPFieldBridge.setInstanceParameters(JDBCAbstractCMPFieldBridge.java:280)
  at 
  org.jboss.ejb.plugins.cmp.jdbc.JDBCCreateEntityCommand.insertEntity(JDBCCreateEntityCommand.java:285)
  at 
  org.jboss.ejb.plugins.cmp.jdbc.JDBCCreateEntityCommand.execute(JDBCCreateEntityCommand.java:182)
  at 
  org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.createEntity(JDBCStoreManager.java:569)
  at 
  org.jboss.ejb.plugins.CMPPersistenceManager.createEntity(CMPPersistenceManager.java:225)
  at 
  org.jboss.resource.connectionmanager.CachedConnectionInterceptor.createEntity(CachedConnectionInterceptor.java:270)
  at 
  org.jboss.ejb.EntityContainer.createHome(EntityContainer.java:725)
  at java.lang.reflect.Method.invoke(Native Method)
  at 
  org.jboss.ejb.EntityContainer$ContainerInterceptor.invokeHome(EntityContainer.java:998)
  at 
  org.jboss.ejb.plugins.AbstractInterceptor.invokeHome(AbstractInterceptor.java:88)
  at 
  org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invokeHome(EntitySynchronizationInterceptor.java:188)
  at 
  org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invokeHome(CachedConnectionInterceptor.java:215)
  at 
  org.jboss.ejb.plugins.AbstractInterceptor.invokeHome(AbstractInterceptor.java:88)
  at 
  org.jboss.ejb.plugins.EntityInstanceInterceptor.invokeHome(EntityInstanceInterceptor.java:91)
  at 
  org.jboss.ejb.plugins.EntityLockInterceptor.invokeHome(EntityLockInterceptor.java:61)
  at 
  org.jboss.ejb.plugins.EntityCreationInterceptor.invokeHome(EntityCreationInterceptor.java:28)
  at 
  org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:88)
  at 
  org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:243)
  at 
  org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:74)
  at 
  org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:92)
  at 
  org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:120)
  at 
  org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invokeHome(ProxyFactoryFinderInterceptor.java:93)
  at 
  org.jboss.ejb.EntityContainer.internalInvokeHome(EntityContainer.java:477)
  at org.jboss.ejb.Container.invoke(Container.java:694)
  at java.lang.reflect.Method.invoke(Native Method)
  at 
  org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
  at 
  org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
  at 
  org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:101)
  at 
  

RE: [JBoss-user] jboss4 and EJB2.1 ejb-ql?

2004-01-08 Thread Alexey Loubyansky
Check these change notes. EJB2.1 is not yet supported but you can do it
in JBossQL in 3.2 and HEAD.

[ 794199 ] Functions in SELECT clause
http://sourceforge.net/tracker/?func=detailaid=794199group_id=22866at
id=381174
[ 815115 ] JBossQL: SUM, AVG, MAX, MIN
http://sourceforge.net/tracker/?func=detailaid=815115group_id=22866at
id=381174 

 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf Of 
 Darren Hartford
 Sent: Thursday, January 08, 2004 4:45 PM
 To: [EMAIL PROTECTED]
 Subject: [JBoss-user] jboss4 and EJB2.1 ejb-ql?
 
 Hey all,
 Grabbed a snapshot of 4.0DR3 as it is the most recent to see 
 if the aggregate functions defined in EJB2.1 are ready to go. 
 Unfortunately, this query did not work or my code is wrong.
 
 EJB-QL
 SELECT SUM(o.amountpaid) FROM MyTable AS o
 Jboss-QL
 SELECT SUM(o.amountpaid) FROM MyTable AS o
 
 It gives the the error:
 09:34:36,460 ERROR [STDERR] 
 org.jboss.ejb.plugins.cmp.ejbql.ParseException: FROM  not found
 09:34:36,460 ERROR [STDERR] at 
 org.jboss.ejb.plugins.cmp.ejbql.EJBQLParser.p
 arse(EJBQLParser.java:38)
 09:34:36,460 ERROR [STDERR] at 
 org.jboss.ejb.plugins.cmp.jdbc.JDBCEJBQLCompi
 ler.compileEJBQL(JDBCEJBQLCompiler.java:146)
 09:34:36,460 ERROR [STDERR] at 
 org.jboss.ejb.plugins.cmp.jdbc.JDBCEJBQLQuery
 .init(JDBCEJBQLQuery.java:42)
 
 
 Any ideas please?
 -D
 
 
 ---
 This SF.net email is sponsored by: Perforce Software.
 Perforce is the Fast Software Configuration Management System 
 offering advanced branching capabilities and atomic changes 
 on 50+ platforms.
 Free Eval! http://www.perforce.com/perforce/loadprog.html
 ___
 JBoss-user mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/jboss-user
 
 


---
This SF.net email is sponsored by: Perforce Software.
Perforce is the Fast Software Configuration Management System offering
advanced branching capabilities and atomic changes on 50+ platforms.
Free Eval! http://www.perforce.com/perforce/loadprog.html
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


RE: [JBoss-user] 1:1 Unidirectional (Aggregate) Relationship Prob lem

2004-01-06 Thread Alexey Loubyansky
Hello,

comments below.

 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf Of 
 Hanson, Matthew
 Sent: Monday, January 05, 2004 4:41 PM
 To: '[EMAIL PROTECTED]'
 Subject: RE: [JBoss-user] 1:1 Unidirectional (Aggregate) 
 Relationship Prob lem
 
 Hi,
 
 Hadn't gotten a response, so I thought I would try again...  
 Really looking to get this type of 1:1 relationship pinned 
 down, as it would complete a bunch of the schema stuff of the app...
 
 Thanks!
 Matt Hanson
 
 -Original Message-
 From: Hanson, Matthew [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, December 30, 2003 7:17 AM
 To: '[EMAIL PROTECTED]'
 Subject: RE: [JBoss-user] 1:1 Unidirectional (Aggregate) 
 Relationship Prob lem
 
 
 Is id (from field-name/) a field belonging to B or A?

A

  Is 
 the a_fk (from
 column-name/) column from B or A?

This is a foreign key column referencing A.id in the table entity B is
mapped to.

  What if the columns and 
 fields from B bean are totally different from A (i.e., 
 B.weird_column_name with
 B.getWeirdColumnName() maps to A.a_primary_key and 
 a.getMyKey())?  What would the resulting jbosscmp-jdbc.xml look like?

Just specify the foreign key column name as it is shown in the example
(a_fk). This column will reference the primary key column in the table A
is mapped to. Referencing other than primary key unique column in A's
table is not supported.

 
 I think I have been able to set up the type of relationship 
 you mention below.  However, it only seems to work if the 
 primary key from B is found in A with the same column name 
 for both tables.  This isn't exactly what I am hoping to do.
 
 In my case, the primary key from B is simply not relevent to 
 A, and B contains a non-primary-key field linking it to A.

If it references A's primary key, it is a mapping issue. It should work.

 
 Does this now make sense?
 
 -Original Message-
 From: Alexey Loubyansky [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, December 30, 2003 1:56 AM
 To: [EMAIL PROTECTED]
 Subject: RE: [JBoss-user] 1:1 Unidirectional (Aggregate) 
 Relationship Problem
 
 
  Here is an example for 1:1 unidirectional relationship from B to A:
 In B:
/**
 * @ejb.relation
 *name=A-B
 *role-name=B-has-A
 *target-ejb=A
 *target-role-name=A-belongsto-B
 *target-multiple=false
 * @jboss.relation
 *related-pk-field=id
 *fk-column=a_fk
 * @ejb.interface-method
 */
public abstract ALocal getA();
/**
* @ejb.interface-method
*/
public abstract void setA(ALocal value); 
 
 Resulting DDs:
 
 ejb-jar.xml:
   ejb-relation 
  ejb-relation-nameA-B/ejb-relation-name
 
  ejb-relationship-role 
 
 ejb-relationship-role-nameB-has-A/ejb-relationship-role-name
 multiplicityOne/multiplicity
 relationship-role-source 
ejb-nameB/ejb-name
 /relationship-role-source
 cmr-field 
cmr-field-namea/cmr-field-name
 /cmr-field
  /ejb-relationship-role
 
  ejb-relationship-role 
  
 ejb-relationship-role-nameA-belongsto-B/ejb-relationship-role-name
 multiplicityOne/multiplicity
 relationship-role-source 
ejb-nameA/ejb-name
 /relationship-role-source
  /ejb-relationship-role
 
   /ejb-relation
 
 jbosscmp-jdbc.xml:
 ejb-relation
   ejb-relation-nameA-B/ejb-relation-name
 
   ejb-relationship-role
   
 ejb-relationship-role-nameB-has-A/ejb-relationship-role-name
 key-fields/
 
   /ejb-relationship-role
   ejb-relationship-role
  
 ejb-relationship-role-nameA-belongsto-B/ejb-relationship-role-name
   key-fields
  key-field
field-nameid/field-name
column-namea_fk/column-name
  /key-field
   /key-fields
 
   /ejb-relationship-role
 /ejb-relation
 
 
 
 
 ---
 This SF.net email is sponsored by: IBM Linux Tutorials.
 Become an expert in LINUX or just sharpen your skills.  Sign 
 up for IBM's Free Linux Tutorials.  Learn everything from the 
 bash shell to sys admin.
 Click now! http://ads.osdn.com/?ad_id=1278alloc_id=3371op=click
 ___
 JBoss-user mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/jboss-user
 
 
 ---
 This SF.net email is sponsored by: IBM Linux Tutorials.
 Become an expert in LINUX or just sharpen your skills.  Sign 
 up for IBM's Free Linux Tutorials.  Learn everything from the 
 bash shell to sys admin.
 Click now! http://ads.osdn.com/?ad_id=1278alloc_id=3371op=click
 ___
 JBoss-user mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/jboss-user

RE: [JBoss-user] key auto-increment in Jboss3.2.2 and MySql

2004-01-06 Thread Alexey Loubyansky



Nothing should be changed in ejb-jar.xml. This is set 
up in jbosscmp-jdbc.xml. The following field will be 
auto-incremented:
cmp-field
 
field-namemyId/field-name
 
/auto-increment
/cmp-field

Also 
the entity which has auto-incremented primary key should specify an 
entity-command that implements specific auto-incrementation. For MySql it 
is:
entity
 
ejb-nameMyEntity/ejb-name
 ...
 entity-command 
name="mysql-get-generated-keys"/
/entity

Refer 
to jbosscmp-jdbc_3_2.dtd and standardjbosscmp-jdbc.xml for configuration and 
available entity-commands.


  
  
  From: [EMAIL PROTECTED] 
  [mailto:[EMAIL PROTECTED] On Behalf Of  
  Sent: Sunday, January 04, 2004 8:38 PMTo: 
  [EMAIL PROTECTED]Subject: [JBoss-user] key 
  auto-increment in Jboss3.2.2 and MySql
  
  Hi,
  
  Some time ago, there was some discusion about auto-increment for the key 
  (mySQL database is supported). But I looked email archive, I couldn't find 
  answer to my question.
  
  Say I have an ejb bean with a key for auto-increment. What changes I 
  should make to ejb-jar.xml (or other deploymentdescriptors, or something 
  else)so that jboss will know the key is auto-increment-template?
  
  (
   In the standardjbosscmp-jdbc.xml file, 
  there was a line for mySQL database.:
  
   
  auto-increment-template?1 
  auto_increment/auto-increment-template
  )
  
  
  If possible, any examples?
  
  Any help is appreciated.
  
  Mark
  
  
  Do you Yahoo!?Find out what made 
  the Top Yahoo! Searches of 2003 


RE: [JBoss-user] 1:1 Unidirectional (Aggregate) Relationship Prob lem

2004-01-06 Thread Alexey Loubyansky
The spec does not disallow it and there is a chance that it will be
supported in future releases.

 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf Of 
 Hanson, Matthew
 Sent: Tuesday, January 06, 2004 3:12 PM
 To: '[EMAIL PROTECTED]'
 Subject: RE: [JBoss-user] 1:1 Unidirectional (Aggregate) 
 Relationship Prob lem
 
 thanks, alexey--
 
 i have decided to take an alternate approach to reference 
 data...  i do not think that creating the relationship type 
 that i would like is supported, because it would entail 
 referencing a non-primary-key field...  is this type of 
 relationship not supported due to the j2ee spec, or will it 
 potentially be supported in future releases?



---
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id78alloc_id371op=click
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


RE: [JBoss-user] 1:1 Unidirectional (Aggregate) Relationship Problem

2004-01-05 Thread Alexey Loubyansky
Here is an example for 1:1 unidirectional relationship from B to A:
In B:
   /**
* @ejb.relation
*name=A-B
*role-name=B-has-A
*target-ejb=A
*target-role-name=A-belongsto-B
*target-multiple=false
* @jboss.relation
*related-pk-field=id
*fk-column=a_fk
* @ejb.interface-method
*/
   public abstract ALocal getA();
   /**
   * @ejb.interface-method
   */
   public abstract void setA(ALocal value); 

Resulting DDs:

ejb-jar.xml:
  ejb-relation 
 ejb-relation-nameA-B/ejb-relation-name

 ejb-relationship-role 
 
ejb-relationship-role-nameB-has-A/ejb-relationship-role-name
multiplicityOne/multiplicity
relationship-role-source 
   ejb-nameB/ejb-name
/relationship-role-source
cmr-field 
   cmr-field-namea/cmr-field-name
/cmr-field
 /ejb-relationship-role

 ejb-relationship-role 
 
ejb-relationship-role-nameA-belongsto-B/ejb-relationship-role-name
multiplicityOne/multiplicity
relationship-role-source 
   ejb-nameA/ejb-name
/relationship-role-source
 /ejb-relationship-role

  /ejb-relation

jbosscmp-jdbc.xml:
ejb-relation
  ejb-relation-nameA-B/ejb-relation-name

  ejb-relationship-role
 
ejb-relationship-role-nameB-has-A/ejb-relationship-role-name
  key-fields/

  /ejb-relationship-role
  ejb-relationship-role
 
ejb-relationship-role-nameA-belongsto-B/ejb-relationship-role-name
  key-fields
 key-field
   field-nameid/field-name
   column-namea_fk/column-name
 /key-field
  /key-fields

  /ejb-relationship-role
/ejb-relation

 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf Of 
 Hanson, Matthew
 Sent: Monday, December 29, 2003 8:49 PM
 To: '[EMAIL PROTECTED]'
 Subject: RE: [JBoss-user] 1:1 Unidirectional (Aggregate) 
 Relationship Problem
 
 Hi,
 
 I'm confused...  I cannot remove the target-relation tag, 
 because it is needed to generate the jbosscmp-jdbc.xml 
 mappings for the relationshipp I'm trying to create.
 
 What I am trying to do is fetch data from tableB based on a 
 key found in tableA, in a 1:1 relationship, where tableB is 
 reference data and has no knowledge of tableA and used as a 
 lookup so that tableA doesn't need to store a bunch of 
 duplicate data for each entry.
 
 Here is an example of something I want to do:
 
 1) Beer Recipe table
 Recipe_Grain_Id - primary key
 Grain_Type - integer mapping to the grain table mapping to 
 grain.grain_id
 
 2) Grain table
 Grain_Id - primary key
 Grain_name - data
 Grain data 1
 Grain data 2
 Etc.
 
 How should this relationship be set up?
 
 I initially thought of making it a 1:1 unidirectional, where 
 the recipe table can return the local bean object of the 
 grain itself.  However, I don't seem to be able to get the 
 jbosscmp-jdbc.xml relationship element setup for jboss to 
 understand this.
 
 Is this just something that cannot be done in this context?  
 If it can be done, how would the relationship look in 
 jbosscmp-jdbc.xml (key-field, column-name, field-name)?  Does 
 this have anything to do with primary key fields?  The code 
 in JDBCRelationshipRoleMetaData.java, where the exceptions 
 have been thrown, seems to look like the grain_type column 
 from table #1 must be a primary key field.
 
 I'm lost...  Can someone set me straight on if this 
 relationship should work???  I would really need to know 
 exactly how the relationship should look in jbosscmp-jdbc.xml.
 
 Thanks, in advance, for the help...
 
 Regards,
 Matt Hanson



---
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id78alloc_id371op=click
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


RE: [JBoss-user] CMR fields and sorting?

2004-01-05 Thread Alexey Loubyansky
There is no way at the moment to tell JBoss to sort CMR collections. 

 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf Of 
 Poppe, Troy
 Sent: Monday, December 29, 2003 11:03 PM
 To: Jboss User (E-mail)
 Subject: [JBoss-user] CMR fields and sorting?
 
 
 I am using XDoclet to generate EJBs that have some CMR 
 fields.  I'm using the XDoclet VO's as well.
 
 I'm curious if anyone knows of a way to sort the CMR field 
 given some Comparator class.  Not sure if there is a way to 
 do this with JBoss during the construction of the EJB object, 
 or with XDoclet, or in the XDoclet produced code.
 
 Thanks.
 
 Troy
 
 
 
 ---
 This SF.net email is sponsored by: IBM Linux Tutorials.
 Become an expert in LINUX or just sharpen your skills.  Sign 
 up for IBM's Free Linux Tutorials.  Learn everything from the 
 bash shell to sys admin.
 Click now! http://ads.osdn.com/?ad_id=1278alloc_id=3371op=click
 ___
 JBoss-user mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/jboss-user
 
 


---
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id78alloc_id371op=click
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


RE: [JBoss-user] java.util.Date with Jboss3.2.3

2004-01-05 Thread Alexey Loubyansky
To fix what exactly?

 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf Of 
 Darren Hartford
 Sent: Wednesday, December 24, 2003 7:52 PM
 To: [EMAIL PROTECTED]
 Subject: [JBoss-user] java.util.Date with Jboss3.2.3
 
 Hey all,
 Using CMP and JBoss3.2.3, using a field with java.util.Date breaks.
 
 This sucks - you can not effectively use the Jboss-Net 
 WebServices on any objects created from the CMP (like 
 value-objects) directly and quickly and instead have to 
 specifically cast those particular fields from java.sql.Date 
 to java.util.Date.  That is, of course, inefficient and stupid.
 
 Luckily, some people did find this issue and fixed a portion 
 of the problem in the CVS version of 3.2-BRANCH.
 https://sourceforge.net/tracker/?func=detailatid=376685aid=8
 37092group_id=22866
 
 I am still having problems using finder methods on fields 
 that use java.util.Date.  The symptom is it appears to look 
 for the date +1900 years when it goes to retrieve the record. 
  Has anyone successfully used java.util.Date in their 
 environments with Jboss 3.2.X?  If not, does anyone else 
 think this would be a good thing to fix?
 
 -D
 
 
 ---
 This SF.net email is sponsored by: IBM Linux Tutorials.
 Become an expert in LINUX or just sharpen your skills.  Sign 
 up for IBM's Free Linux Tutorials.  Learn everything from the 
 bash shell to sys admin.
 Click now! http://ads.osdn.com/?ad_id78alloc_id371op=ick
 ___
 JBoss-user mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/jboss-user
 
 


---
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id78alloc_id371op=click
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


RE: [JBoss-user] 1:1 Unidirectional (Aggregate) Relationship Problem

2003-12-30 Thread Alexey Loubyansky
 Here is an example for 1:1 unidirectional relationship from B to A:
In B:
   /**
* @ejb.relation
*name=A-B
*role-name=B-has-A
*target-ejb=A
*target-role-name=A-belongsto-B
*target-multiple=false
* @jboss.relation
*related-pk-field=id
*fk-column=a_fk
* @ejb.interface-method
*/
   public abstract ALocal getA();
   /**
   * @ejb.interface-method
   */
   public abstract void setA(ALocal value); 

Resulting DDs:

ejb-jar.xml:
  ejb-relation 
 ejb-relation-nameA-B/ejb-relation-name

 ejb-relationship-role 
ejb-relationship-role-nameB-has-A/ejb-relationship-role-name
multiplicityOne/multiplicity
relationship-role-source 
   ejb-nameB/ejb-name
/relationship-role-source
cmr-field 
   cmr-field-namea/cmr-field-name
/cmr-field
 /ejb-relationship-role

 ejb-relationship-role 
 
ejb-relationship-role-nameA-belongsto-B/ejb-relationship-role-name
multiplicityOne/multiplicity
relationship-role-source 
   ejb-nameA/ejb-name
/relationship-role-source
 /ejb-relationship-role

  /ejb-relation

jbosscmp-jdbc.xml:
ejb-relation
  ejb-relation-nameA-B/ejb-relation-name

  ejb-relationship-role
  ejb-relationship-role-nameB-has-A/ejb-relationship-role-name
  key-fields/

  /ejb-relationship-role
  ejb-relationship-role
 
ejb-relationship-role-nameA-belongsto-B/ejb-relationship-role-name
  key-fields
 key-field
   field-nameid/field-name
   column-namea_fk/column-name
 /key-field
  /key-fields

  /ejb-relationship-role
/ejb-relation




---
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278alloc_id=3371op=click
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


RE: [JBoss-user] Cannot access EJB with multiple CMR columns

2003-12-24 Thread Alexey Loubyansky
So what is causing the SQLException? Incorrect SQL? 

 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf Of 
 Rod Macpherson
 Sent: Wednesday, December 24, 2003 12:34 AM
 To: [EMAIL PROTECTED]
 Subject: [JBoss-user] Cannot access EJB with multiple CMR columns
 
 
 We get the following error fetching one of our entity beans in JBoss
 3.2.2:
 
 java.sql.SQLException: ORA-00936: missing expression
 
 The associated table is different than every other table in 
 the schema.
 I will use a fictitious example to explain. Assume you have a 
 TREE table with six columns that reference the ORNAMENT 
 table. Therefore each TREE is restricted to six associated 
 ORNAMENT records. The entity beans associated with TREE are 
 failing to load. This is not a common structure. In general 
 we use an intersect table to associate any number of child 
 records with the parent. We can use that as a workaround. 
 Also noted that eliminating all or all but one of the 
 ORNAMENT refereces from the TREE bean's deployment descritor 
 fixes the problem. The failure only shows up when a given EJB 
 has several foreign key references to the same table. 
 
 
 
 
 
 
 
 ---
 This SF.net email is sponsored by: IBM Linux Tutorials.
 Become an expert in LINUX or just sharpen your skills.  Sign 
 up for IBM's Free Linux Tutorials.  Learn everything from the 
 bash shell to sys admin.
 Click now! http://ads.osdn.com/?ad_id78alloc_id371op=ick
 ___
 JBoss-user mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/jboss-user
 




---
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id78alloc_id371op=click
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] RE: finding a may of getting max value in cmp

2003-12-24 Thread Alexey Loubyansky
JBoss' user mailing list is jboss-user at lists dot sourceforge dot net, not
alex at jboss dot org.

JBoss-3.2.2 does support MAX() function but in JBossQL, not EJB-QL. And you
must use ejbSelect instead of finders.

 -Original Message-
 From: netanel weinberg [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, December 24, 2003 11:58 AM
 To: [EMAIL PROTECTED]
 Subject: finding a may of getting max value in cmp
 
 Hello!
 
 I'm trying to make a finder method that will give me the max 
 value of a field in the table but i've noticed that jboss 
 3.2.2 isn't support the MAX() option in the EJB-QL.
 Is there a way of getting the max value in a finder method in 
 EJB-QL CMP?
 
 10x ahead,
  netanel
 
 




---
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278alloc_id=3371op=click
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


RE: [JBoss-user] 1:1 Unidirectional (Aggregate) Relationship Problem

2003-12-23 Thread Alexey Loubyansky
It should work fine as it does for me. What JBoss version are you using? Do
you have a testcase?

 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf Of 
 Hanson, Matthew
 Sent: Tuesday, December 23, 2003 5:00 PM
 To: '[EMAIL PROTECTED]'
 Subject: [JBoss-user] 1:1 Unidirectional (Aggregate) 
 Relationship Problem
 
 Hi--
 
 We are storing the key from a reference table in another 
 table.  We would like to create a unidirectional, 1:1 
 relationship to allow the first bean to access information in 
 the reference table.  Here is basically how the table 
 relationship is setup:
 
 tableA
 id (integer primary key)
 ref_id (integer)
 
 tableB
 id (integer primary key)
 some data
 some data
 .
 .
 .
 
 I was assuming that I could create the relationship such that 
 the bean container could be configured to get information 
 from tableB based on the value in the ref_id column of 
 tableA.  However, the relationship seems to be drawing info 
 from tableB based upon the value in the primary key tableA.id 
 instead.  How do I change this?
 
 The following is the relationship configuration in ejb-jar.xml:
 
relationships 
   ejb-relation 
  ejb-relation-nameGrain-GrainReference/ejb-relation-name
 
  ejb-relationship-role 
  
 ejb-relationship-role-nameGrain-Has-Reference/ejb-relations
 hip-role-name
 multiplicityOne/multiplicity
 relationship-role-source 
ejb-nameRecipeGrainBean/ejb-name
 /relationship-role-source
 cmr-field 
cmr-field-namerefRecipeGrain/cmr-field-name
 /cmr-field
  /ejb-relationship-role
 
  ejb-relationship-role 
  
 ejb-relationship-role-nameReference-Of-Grain/ejb-relationsh
 ip-role-name
 multiplicityOne/multiplicity
 relationship-role-source 
ejb-nameRefRecipeGrainBean/ejb-name
 /relationship-role-source
  /ejb-relationship-role
 
   /ejb-relation
   .
   .
   .
 
 The following is the configuration from jbosscmp-jdbc.xml:
 
   relationships
 ejb-relation
   ejb-relation-nameGrain-GrainReference/ejb-relation-name
 
   ejb-relationship-role
  
 ejb-relationship-role-nameGrain-Has-Reference/ejb-relations
 hip-role-name
   key-fields
  key-field
field-namerecipeGrainId/field-name
column-namerecipe_grain_id/column-name
  /key-field
   /key-fields
 
   /ejb-relationship-role
   ejb-relationship-role
  
 ejb-relationship-role-nameReference-Of-Grain/ejb-relationsh
 ip-role-name
 key-fields/
 
   /ejb-relationship-role
 /ejb-relation
   .
   .
   .
 
 I am using the xdoclet ejb.relation and jboss.target-relation 
 to facilitate the relationship.  If anyone on the off chance 
 would know the attributes that help specify this type of 
 relationship, that would be amazing...
 Otherwise, knowing how the deployment files should look would 
 even help, a lot!
 
 Please help!
 
 Regards,
 Matt Hanson
 
 
 ---
 This SF.net email is sponsored by: IBM Linux Tutorials.
 Become an expert in LINUX or just sharpen your skills.  Sign 
 up for IBM's Free Linux Tutorials.  Learn everything from the 
 bash shell to sys admin.
 Click now! http://ads.osdn.com/?ad_id=1278alloc_id=3371op=click
 ___
 JBoss-user mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/jboss-user
 




---
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278alloc_id=3371op=click
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


RE: [JBoss-user] 1:1 Unidirectional (Aggregate) Relationship Problem

2003-12-23 Thread Alexey Loubyansky
Because you mapped the foreign key to the primary key field with this:
*   @jboss.target-relation fk-column=recipe_grain_id
*   related-pk-field=recipeGrainId 

Just removed it.




---
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278alloc_id=3371op=click
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


RE: [JBoss-user] JBoss 3.2.4 and Oracle9i: SQLException: Invalid conversion requested

2003-12-23 Thread Alexey Loubyansky
So it means ps.setObject(index, value, jdbcType) does not work with this
driver. It is definitely not JBoss' fault. To be sure, you could try the
previous JBoss with the new Oracle.

 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf Of 
 Frank Langelage
 Sent: Tuesday, December 23, 2003 11:52 PM
 To: [EMAIL PROTECTED]
 Subject: [JBoss-user] JBoss 3.2.4 and Oracle9i: SQLException: 
 Invalid conversion requested
 
 I recently update my software components:
 - Oracle from 9.2.0.1 to 9.2.0.4
 - JBoss to current Branch 3.2 (3.2.4RC1)
 - XDoclet from 1.2b3 to 1.2
 
 After that I tried to execute my ejb test-app and got this in 
 server.log:
 ERROR [org.jboss.ejb.plugins.LogInterceptor.handleException]
 TransactionRolledbackLocalException in method:
 public abstract ejb.common.entity.interfaces.CountryLocal
 ejb.common.entity.interfaces.CountryHomeLocal.create(java.lang
 .Short,java.
 lang.String,java.lang.String,java.lang.String) throws 
 javax.ejb.CreateException, causedBy:
 java.sql.SQLException: Invalid conversion requested
 at 
 oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
 at 
 oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
 at 
 oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:269)
 at
 oracle.jdbc.driver.OraclePreparedStatement.setObject(OraclePre
 paredStatement.java:2901)
 at
 org.jboss.resource.adapter.jdbc.CachedPreparedStatement.setObj
 ect(CachedPreparedStatement.java:158)
 at
 org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.setOb
 ject(WrappedPreparedStatement.java:604)
 at
 org.jboss.ejb.plugins.cmp.jdbc.JDBCUtil.setParameter(JDBCUtil.
 java:1267)
 at
 org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCAbstractCMPFieldBrid
 ge.setArgumentParameters(JDBCAbstractCMPFieldBridge.java:35
 4)
 at
 org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCAbstractCMPFieldBrid
 ge.setInstanceParameters(JDBCAbstractCMPFieldBridge.java:33
 6)
 at
 org.jboss.ejb.plugins.cmp.jdbc.JDBCAbstractCreateCommand.perfo
 rmInsert(JDBCAbstractCreateCommand.java:283)
 at
 org.jboss.ejb.plugins.cmp.jdbc.JDBCAbstractCreateCommand.execu
 te(JDBCAbstractCreateCommand.java:138)
 at
 org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.createEntity(J
 DBCStoreManager.java:554)
 at
 org.jboss.ejb.plugins.CMPPersistenceManager.createEntity(CMPPe
 rsistenceManager.java:208)
 at
 org.jboss.resource.connectionmanager.CachedConnectionIntercept
 or.createEntity(CachedConnectionInterceptor.java:269)
 at
 org.jboss.ejb.EntityContainer.createLocalHome(EntityContainer.
 java:581)
 
 All worked fine before the software updates.
 The exception is thrown when setting the value for a 
 EJB-Field of type Short.
 There is no jdbc- or sql-type in jbosscmp-jdbc.xml for this 
 field, so the dafault typemapping for Oracle9i is choosen 
 (NUMERIC/NUMBER(5)).
 
 Adding this
 1258a1259,1262
   else if(value instanceof Short)
   {
  ps.setShort(index, ((Short)value).shortValue());
   }
 to 
 server/src/main/org/jboss/ejb/plugins/cmp/jdbc/JDBCUtil.java 
 solved the problem.
 
 Has anybody else seen this problem ?
 Do you approve that this is probably a oracle-jdbc bug ?
 
 My datasource definition is like this
 datasources
   local-tx-datasource
 jndi-nameOracleDS/jndi-name
 connection-urljdbc:oracle:thin:@sb150:1521:PROD/connection-url
 driver-classoracle.jdbc.OracleDriver/driver-class
 user-namexxx/user-name
 passwordxxx/password
 
 exception-sorter-class-nameorg.jboss.resource.adapter.jdbc.v
endor.OracleExceptionSorter/exception-sorter-class-name
 
 prepared-statement-cache-size1000/prepared-statement-cache-size
   /local-tx-datasource
 /datasources
 
 and I use ojdbc14.jar.
 
 Regards
 Frank
 
 
 ---
 This SF.net email is sponsored by: IBM Linux Tutorials.
 Become an expert in LINUX or just sharpen your skills.  Sign 
 up for IBM's Free Linux Tutorials.  Learn everything from the 
 bash shell to sys admin.
 Click now! http://ads.osdn.com/?ad_id=1278alloc_id=3371op=click
 ___
 JBoss-user mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/jboss-user
 




---
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278alloc_id=3371op=click
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] problem with deploying EJB CMPs

2003-12-21 Thread Alexey Loubyansky
Can you package the failing bean separately and send it to me directly?

netanel weinberg wrote:

i'm getting that error on deploying:
I'm trying to use my EJB CMP and getting this error:
...
 Depends On Me: org.jboss.deployment.DeploymentException: Couldn't create
entity command: ; - nested throwable: (java.lang.NullPointerException)]
---
will u be able to send me your DD to compare? :)
10x ahead,
netanel.


---
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278alloc_id=3371op=click
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] how to implement inheritance between CMPs

2003-12-18 Thread Alexey Loubyansky
This is the problem on your side, probably. Can you check it with your 
admins?

Also, there are some searchable archives on the net, for example, 
mail-archive.com.

My answer was that there is no element in neither ejb-jar.xml nor 
jbossXXX.xml that configures inheritance. Your question for me is still 
not clear.

forge wrote:
Hello,



I asked this question second time here.

Alex and some other experts have given me some advice, much thanks.



But it's disturbed that I've only read the titles of most of these messages 

because some mails from this maillist corrupted when reaching my mailbox.



Will you please send your answers again?



My question is:



there are 2 CMPs, Person, Teacher and Student. Teache and Studen inherit

from Person.



In Websphere, there is a additional field in Person table to store the type,

e.g. teacher denotes the record is a Teacher and student for Student.

I'm using JBuilder9 + Jboss now, and don't know if they support CMP
inheritance.
If yes, how should I do in JBuilder?



BTW, I'm trying Eclipse + Jboss, and they seems work better than J + J.



Regards,

Forge





--http://www.eyou.com
--...
--http://vip.eyou.com
--VIP  


---
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278alloc_id=3371op=click
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



---
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278alloc_id=3371op=click
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] Jboss 3.2.2/EJB-QL with = or =?

2003-12-18 Thread Alexey Loubyansky
Sometimes, there is. Depends on the query.

Darren Hartford wrote:
Hey all,
Is there any reason why Jboss 3.2.2 throws an exception when an EJB-QL statement contains 
'=' or '='?
-D


---
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278alloc_id=3371op=click
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] problem with deploying EJB CMPs

2003-12-18 Thread Alexey Loubyansky
Somehow it works for me. I deployed an ejb-jar jar w/o jboss-specific 
deployment descriptors and w/o any changes to standardjbossXXX files in 
3.2.2 final.
Please, provide instructions how to reproduce your problem.

netanel weinberg wrote:

I haven't changed anything in the jboss's xmls files and i'm using JBOSS
3.2.2
- Original Message - 
From: Alexey Loubyansky [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, December 17, 2003 12:00 PM
Subject: Re: [JBoss-user] problem with deploying EJB CMPs



Have you changed the default entity-command in standardjbosscmp-jdbc.xml
or in jbosscmp-jdbc.xml?
What JBoss version are you using?
netanel weinberg wrote:


I'm deploying my jar file with some EJB CMPs and one session bean and
getting an error in my last EJB CMP deploying
i'm deploying in the jar file first all the cmps and then the session
bean

and getting an error about nullpointer in the last cmp deployement.
when i've tried to remove the last cmp from the jar file and from the
xml

file to check if it i still getting the error it gave me the same error
on

the current last cmp
ejb deployment (nullpointer) can it be 'cause i have defined well the
session bean after that cmps in the ejb-jar.xml?
here is the error i got:


---
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278alloc_id=3371op=click
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user




---
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278alloc_id=3371op=click
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



---
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278alloc_id=3371op=click
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] Jboss 3.2.2/EJB-QL with = or =?

2003-12-18 Thread Alexey Loubyansky
EJBQL does not allow =/=, for example, for strings, dates. This all 
works in JBossQL.

Darren Hartford wrote:

Hey all,
Is there any reason why Jboss 3.2.2 throws an exception when an EJB-QL statement contains 
'=' or '='?
-D

---
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id78alloc_id371op=click
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



---
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278alloc_id=3371op=click
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] MSSQL auto increment command

2003-12-17 Thread Alexey Loubyansky
Is mssql-fetch-key not there?

Ramrakhiani, Vikas wrote:
Hi,
I am looking for class which implements auto increment of PK in MSSQL. 
I saw that such a class is specified for MySql in standardjbosscmp-jdbc.xml
:-
  !-- this command requires auto-increment element for unknown-pk --
  entity-command name=mysql-get-generated-keys
 
class=org.jboss.ejb.plugins.cmp.jdbc.keygen.JDBCMySQLCreateCommand/ 

What would be the corresponding entry for MS SQL server ?

thanks,
vikas.


---
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278alloc_id=3371op=click
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] problem with deploying EJB CMPs

2003-12-17 Thread Alexey Loubyansky
Have you changed the default entity-command in standardjbosscmp-jdbc.xml 
or in jbosscmp-jdbc.xml?
What JBoss version are you using?

netanel weinberg wrote:

I'm deploying my jar file with some EJB CMPs and one session bean and
getting an error in my last EJB CMP deploying
i'm deploying in the jar file first all the cmps and then the session bean
and getting an error about nullpointer in the last cmp deployement.
when i've tried to remove the last cmp from the jar file and from the xml
file to check if it i still getting the error it gave me the same error on
the current last cmp
ejb deployment (nullpointer) can it be 'cause i have defined well the
session bean after that cmps in the ejb-jar.xml?
here is the error i got:


---
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278alloc_id=3371op=click
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] MSSQL auto increment command

2003-12-17 Thread Alexey Loubyansky
What is your JBoss version?

There is no mssql command in 3.2.0;

In 3.2.1 I can see
org.jboss.ejb.plugins.cmp.jdbc.mssql.JDBCMsSQLCreateCommand.java but it 
is not in standardjbosscmp-jdbc.xml. Here are the comments for it:
/**
 * JDBCMsSQLCreateCommand executes an codeINSERT INTO/code  SQL 
statement
 * using the Microsoft SQL Server codeSELECT @@IDENTITY/code method 
to fetch
 * the database-generated of the primary key.
 * p
 * Based on the Microsoft Knowledge Base article
 * a 
href=http://support.microsoft.com/default.aspx?scid=kb%3ben-us%3b313130;313130/a.
 * /p
 *
 * @author a href=mailto:[EMAIL PROTECTED]David 
Green/a

I believe you can use it declaring entity-command.

In 3.2.2, it turned into
org.jboss.ejb.plugins.cmp.jdbc.keygen.JDBCSQLServerCreateCommand
and appeared in standardjbosscmp-jdbc.xml as
  !-- retrieves generated key of the record inserted into 
SQLServer db --
  entity-command name=mssql-fetch-key

class=org.jboss.ejb.plugins.cmp.jdbc.keygen.JDBCSQLServerCreateCommand
 !-- uncomment for versions prior to SQL Server 2000
 attribute name=pk-sqlSELECT @@IDENTITY/attribute
 --
  /entity-command
Ramrakhiani, Vikas wrote:

I could not find mssql-fetch-key in standardjbosscmp-jdbc.xml.

thanks,
vikas.


---
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278alloc_id=3371op=click
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] CMR/CMP question

2003-12-17 Thread Alexey Loubyansky
This should work.

Gary S. Cuozzo wrote:

I have a many-many CMR (table mapped of course) between 2 entities and
would like to add some extra information that further describes the
relationship.
I was thinking of just adding the desired fields to the table that maps
the CMR and creating a CMP entity to get/set the fields.  In the
application, the CMP entity would never actually create/remove records,
only get/set the additional fields.
Is there any reason (technical or other) that this can't/shouldn't be
done?
Thanks in advance,
Gary.


---
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278alloc_id=3371op=click
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] JBoss 3.2.4 ...

2003-12-15 Thread Alexey Loubyansky
Pozhalusto!

Rafal Kedziorski wrote:

Privjet Alexey,

it's working. thx.

Rafal


---
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278alloc_id=3371op=click
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] Re: blob field in cmp

2003-12-15 Thread Alexey Loubyansky
Can you try with JBossCMP engine instead of JAWS?

Just use

persistence-managerorg.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager/persistence-manager

in jboss.xml

forge wrote:

Thanks, Alexey.

Do you mean I should modify standardjaws.xml?

No, I didn't modify it.



I found following settings in jaws.xml:



nameDB2/name

mapping

   java-typejava.lang.Object/java-type

   jdbc-typeJAVA_OBJECT/jdbc-type

   sql-typeBLOB(2000)/sql-type

/mapping



Need I modify it?



Regards,

Forge







Message: 8


Date: Fri, 12 Dec 2003 14:09:04 +0200


From: Alexey Loubyansky [EMAIL PROTECTED]


Organization: JBoss Group Europe


To: [EMAIL PROTECTED]


Subject: Re: [JBoss-user] blob field in cmp


Reply-To: [EMAIL PROTECTED]



It's absolutely ok. You just need to configure the mapping, i.e. 


jdbc-type and sql-type. Do you specify both yourself or use the defaults?








--http://www.eyou.com
--...
--http://vip.eyou.com
--VIP  


---
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278alloc_id=3371op=click
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



---
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278alloc_id=3371op=click
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] problem with EJB-QL

2003-12-15 Thread Alexey Loubyansky
EJBQL is introduced in CMP2.0. It means it won't work with 1.1.
jboss.xml and jbosscmp-jdbc.xml are optional.
The number of parameters are not limited.
netanel weinberg wrote:

Hi!
my application is deployed w/o any errors.
   my dtd is :
   ?xml version=1.0?
   !DOCTYPE ejb-jar PUBLIC -//Sun Microsystems, Inc.//DTD Enterprise
JavaBeans 1.1//EN
 http://java.sun.com/j2ee/dtds/ejb-jar_1_1.dtd;
  i don't know what is wrong! can it be that JBOSS doesn't support that kind
of EJB-QL methods?
10x ahead.


---
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278alloc_id=3371op=click
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] Does jboss support cmp inherit?

2003-12-15 Thread Alexey Loubyansky
First of all, what do you mean by iheritance in CMP?

forge wrote:

Hello, 



I have three entity beans, UserEB, AdvancedUserEB and AnonymouseUserEB.

Both AdvancedUserEB and AnonymouseUserEB inherit from UserEB.

I created them in WAS5 and they ran well.
Don't they run in JBoss? What is the problem?



Now I'm porting them to jboss3.2.3, but I cant find how to create

inheriting CMPs in jboss.



Can anyone give me some advice or where can I find docs about it?



Thanks.

Forge





--http://www.eyou.com
--...
--http://vip.eyou.com
--VIP  


---
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278alloc_id=3371op=click
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



---
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278alloc_id=3371op=click
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] question about ejb-ql

2003-12-15 Thread Alexey Loubyansky
You can but it is not required.

netanel weinberg wrote:

When im creating a CMP EJB with ejb-ql, should i define the ejb and/or the
ejb-ql methods in the JBOSS's xml files too
except for the ejb-jar.xml file?


---
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278alloc_id=3371op=click
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



---
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278alloc_id=3371op=click
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] problem with ejb-ql

2003-12-15 Thread Alexey Loubyansky
Why don't you try with

  !DOCTYPE ejb-jar PUBLIC
-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN
http://java.sun.com/dtd/ejb-jar_2_0.dtd;
?

netanel weinberg wrote:

I don't know what do about my problem with my ejb-ql finder method!
it giving me back a collection according to only one parameter and not
according to both of them.
plz look at the attached file and tell if if u can find a problem with the
ejb-ql finder method with the two parameters.
10x ahead,
 netanel


---
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278alloc_id=3371op=click
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] problem with ejb-ql

2003-12-15 Thread Alexey Loubyansky
Yes, since you're going to use CMP2.0

netanel weinberg wrote:

should i transfer all my classes and set/get methods to be abstract?
- Original Message - 
From: Alexey Loubyansky [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, December 15, 2003 4:38 PM
Subject: Re: [JBoss-user] problem with ejb-ql



Why don't you try with

  !DOCTYPE ejb-jar PUBLIC
-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN
http://java.sun.com/dtd/ejb-jar_2_0.dtd;
?

netanel weinberg wrote:


I don't know what do about my problem with my ejb-ql finder method!
it giving me back a collection according to only one parameter and not
according to both of them.
plz look at the attached file and tell if if u can find a problem with
the

ejb-ql finder method with the two parameters.
10x ahead,
netanel


---
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278alloc_id=3371op=click
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user




---
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278alloc_id=3371op=click
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user





---
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278alloc_id=3371op=click
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] problem with ejb-ql

2003-12-15 Thread Alexey Loubyansky
http://java.sun.com/dtd/ejb-jar_2_0.dtd
http://java.sun.com/products/ejb/docs.html
netanel weinberg wrote:

is there any spec. of something like that of ejb-jar.xml for cmp 2.0 so i
can look on 'cause i've tried once and JBOSS gave alot of erros about the
JDBC factory and something...




---
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278alloc_id=3371op=click
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] Re: blob field in cmp

2003-12-15 Thread Alexey Loubyansky
I thought you used jboss.xml.
Do you use CMP1.1? What is the exception?
PS: please, keep it on jboss-user

forge wrote:

Hello, Alex

I couldn't find jboss in server/default/conf directory,
but there is a standardjboss.xml.
And I found the following lines in it:
persistence-managerorg.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager/persiste
nce-manager
I created a sample project in jbuilder, containing a cmp with 2 fields:
an Integer field as id and a byte[] field as photo.
When called ejbcreate, jboss throws db2.jdbc exception: invalid data type,
SQL= HY004.
I don't know what error I made.

Regards,
Forge


---
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278alloc_id=3371op=click
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] Re: Does jboss support cmp inherit?

2003-12-15 Thread Alexey Loubyansky
I can't understand what you are trying to achieve. But there is nothing 
in ejb-jar.xml that configures inheritance.

forge wrote:

Thanks. Alex



I only don't know how to configure ejb-jar.xml to implement inherit.

Can you give me a sample?



Regards,

Forge


---
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278alloc_id=3371op=click
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] automatic primary key generation for CMP entityBeans?

2003-12-13 Thread Alexey Loubyansky
[EMAIL PROTECTED] wrote:
The generator I have in mind will increment the values.
Where do you plan to store the values? Database?

In the interfaces, I cant see some init(startValue) method or something
similar. This method should be there and should be called on initializing
the generator.
Couldn't you initialize the generator in 
KeyGeneratorFactory.getKeyGenerator()?

The UUIDGeneratorFactory returns a new instance of
the generator every time. This is no problem with random keys,
but for incrementing, I have to synchronize the multiple instances
of the keygenerator in some way.
Yes.

Does somebody have any comments on that or can point me in the
right direction ? Thanks in advance
Do you know how the HiLo generators work? It seems to me it is what you 
need.



---
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278alloc_id=3371op=click
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] RE: How to implement version control using Value Object Pattern in CMP 2.0

2003-12-13 Thread Alexey Loubyansky
Boulatian, Misak wrote:

Hi,

We have a big problem using EJB 2.0 with jboss. We use Updatable Value 
Object Pattern (currently, Transfer Object Pattern). This means we have 
individual get and set methods in entity bean's remote interface and 
also have setData methods to make changes in entity bean's attributes in 
one remote method call. As you know, this may introduce Stale Value 
Objects. Before considering using CMP 2.0 we were using CMP 1.1. We had 
version control attribute that was updated in every set method call of 
bean class. getData method copied the current value of version control 
in the Value Object and sent it to the client. When updated Value Object 
was sent back through setData, the implementation of setData within bean 
class compared version attribute value with the copy of the bean class 
and threw appropriate exception if they were not the same.

Using CMP 2.0 we can no longer update version control attribute since 
all set methods are abstract. We thought we can increment version 
control within ejbStore but jboss can call it without even any entity 
bean attribute change (very inpredictable). So, we thought we can use 
optimistic tag and specify version control attribute within 
jbosscmp-jdbc, but this doesn' t seem to be the case either.

I have the following questions:
1) When bean developer specifies version control attribute, does jboss 
update its value?
Yes.

2) If it does, then does jboss compare its value in Value Object Pattern 
scenario and throw any exception? If it does then what is the exception 
type?
On synchronization, the version field is added to the WHERE clause of 
the UPDATE statement. Like UPDATE  WHERE PK = ? AND VERSION = ?
If failed, TransactionRolledBack exception is thrown.

3) If jboss doesn't compare, is there a way that bean developer can 
compare to let client know of differences?
The version field can be implicit and explicit. Explicit means it is a 
real cmp-field that has CMP getter and setter and is declared in 
ejb-jar.xml. JBoss will update this field as above. And you still can 
use its getter to check the value.

4) If none of these applies then I would like to hear how this 
optimistic tag with version-control works so we can try to use jboss 
with CMP 2.0
Seems to be answered.

5) Is there any other way to do version control check in jboss using CMP 
2.0 to avoid stale objects problem (weblogic has similar version control 
and automatically checks and throws exception if versions do not match).
How does it work in weblogic?

It seems like with CMP 2.0 it is the container's responsibility to 
provide for this type of solution.
Yes. But this is not defined in the spec.

If jboss doesn't have this then how 
can we use jboss with CMP 2.0 in production.
I think, you can do it.

Or, because of this, we 
have to use CMP 1.1 only if we still want to stay on jboss.

I really appreciate the response.
Thanks,
Misak


This message and any attachments are intended only for the use of the 
addressee and may contain information that is privileged and 
confidential. If the reader of the message is not the intended recipient 
or an authorized representative of the intended recipient, you are 
hereby notified that any dissemination of this communication is strictly 
prohibited. If you have received this communication in error, please 
notify us immediately by e-mail and delete the message and any 
attachments from your system.



---
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278alloc_id=3371op=click
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] Sorting Entities

2003-12-13 Thread Alexey Loubyansky
You can fetch entities in a specific order using JBossQL and ORDER BY 
clause.
If you want to merge collections of entities, then you could use 
java.util.Comparator.

Gary S. Cuozzo wrote:

I'm interested in sorting a collection of entities that are retrieved
using multiple finders.  Any suggestions?
Thanks,
Gary.


---
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278alloc_id=3371op=click
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] Optimistic Locking Across Requests

2003-12-12 Thread Alexey Loubyansky
You could use stateful session bean for beginning/committing 
transactions and optimistic locking in entity beans.
The possible problem is the transaction timeouts.
Probably, you would like to use Instance Per Transaction container for 
this setup.
Alternatively, you have to use value objects are something like that for 
collecting form data.

Wax, Michael wrote:

What is the best way to implement an optimistic lock using EJB 2.0 CMP 
that spans multiple requests?  For example, we want to implement 
optimistic locking on a multipage form submission.



This message and any attachments are intended only for the use of the 
addressee and may contain information that is privileged and 
confidential. If the reader of the message is not the intended recipient 
or an authorized representative of the intended recipient, you are 
hereby notified that any dissemination of this communication is strictly 
prohibited. If you have received this communication in error, please 
notify us immediately by e-mail and delete the message and any 
attachments from your system.



---
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278alloc_id=3371op=click
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] problem with EJB-QL

2003-12-12 Thread Alexey Loubyansky
First of all, get your application deployed w/o errors. Perhaps, the DDs 
do not match their DTDs. What are the stacktraces?

netanel weinberg wrote:

Hello!

 i have a web application i built using EJB and i'm trying to make an ejb-ql
according to two parameters:
  query
query-method
  method-namefindByCompanycode/method-name
  method-params
method-paramjava.lang.String/method-param
method-paramjava.lang.String/method-param
  /method-params
/query-method
ejb-ql
  ![CDATA[SELECT OBJECT(a) FROM Supplier AS a WHERE (a.companycode
= ?1) AND (a.suppliertype = ?2)]]
/ejb-ql
  /query
but JBOSS 3.2.2 with Tomcat 4.1.27 embedded is returning me the collection
accoding to the first parameter only!
 what is wrong? is it a problem with the implemention in JBOSS?
And Something else i'm been trying to move to CMP 2.0 and changed all my
classes that been needed to abstract and changed my ejb-jar.xml to use the
dtd of cmp 2.0 but i get an error on deploying with JBOSS on deploy
something about the JDBC factory and i don't know what is it problem! it's
the same problem i got when i tried to use lomboz to generate an ejb  for
testing.
10x ahead,
 netanel.


---
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278alloc_id=3371op=click
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



---
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278alloc_id=3371op=click
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] blob field in cmp

2003-12-12 Thread Alexey Loubyansky
It's absolutely ok. You just need to configure the mapping, i.e. 
jdbc-type and sql-type. Do you specify both yourself or use the defaults?

forge wrote:

Hello,



One of my tables has a blob type column, and I created a byte[] type field 

in my CMP to map it. 

But when calling home.create(id), it reported db2 exception: invalid data
type.
Now the byte[] field was NULL.



Perhaps I cant map byte[] field to blob type column.

Does anyone know I should which type cmp field?



Thanks.

Forge





--http://www.eyou.com
--...
--http://vip.eyou.com
--VIP  


---
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278alloc_id=3371op=click
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



---
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278alloc_id=3371op=click
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] automatic primary key generation for CMP entityBeans?

2003-12-12 Thread Alexey Loubyansky
[EMAIL PROTECTED] wrote:

I have seen the UUIDKeyGeneratorFactory, where can I find information
about how to write my own factory ?
You need to implement two interfaces:
org.jboss.ejb.plugins.keygenerator.KeyGeneratorFactory and 
org.jboss.ejb.plugins.keygenerator.KeyGenerator.
Check the org.jboss.ejb.plugins.keygenerator.uuid for an example.
This is in the server module. Count on my guidance. We are interested in 
contributions.

I also need to know how to
use entity-commands/how to use the default keygenerator.
A field that should use a generator is marked with auto-increment/ in 
jbosscmp-jdbc.xml. And the entity that has an auto-incremented field 
should have an entity-command element that says what generation is used 
for that field. For example, the command that uses a key-generator is

!-- uses key generator to fetch the next key value --
entity-command
   name=key-generator 
class=org.jboss.ejb.plugins.cmp.jdbc.keygen.JDBCKeyGeneratorCreateCommand
   attribute
  name=key-generator-factoryUUIDKeyGeneratorFactory/attribute
/entity-command

The UUIDKeyGeneratorFactory is the JNDI name under which the key 
generator factory is bound.

The UUID key generator is an MBean that is bound into the JNDI on the 
start. It produces String values.

Thanks in advance,

Stefan


---
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278alloc_id=3371op=click
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] finder and two cmr-fields on same table problem

2003-12-12 Thread Alexey Loubyansky
Works for me. How do you configure the relationships? Do you have a 
testcase?

Heinz-Dieter Conradi wrote:
hi all,

i have just encountered the following problem, and i just don't know if i
am doing something really stupid or if i have run into a limitation of the
spec/jboss...
i have an entity bean which has two cmr-fields to the same table (bean):

public abstract class CrossingBean implements EntityBean {

[...]

  public abstract StreetLocal getStreet1();

  public abstract StreetLocal getStreet2();

[...]

}

where the StreetBean is another entity bean which has a 'street' property.

then i have defined a finder, whose xdoclet-tags looks as follows:

 * @ejb.finder
 *  signature=de.s_tec.vb2.server.beans.location.Crossing
 *  findByName(
 *  java.lang.String street1
 *  )
 *  query=SELECT OBJECT(o)
 * FROM Crossing AS o
 * WHERE o.street1.street = ?1
when deploying this bean i get an exception which says:

Unknown terminal field: at line 1, column 128.  Encountered: street
after: o.street1.)
however, when i remove the 'street2' property from my bean, everything
deploys fine.
what is going on here? am i just stupid?

tia, heinz-dieter conradi



---
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278alloc_id=3371op=click
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



---
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278alloc_id=3371op=click
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] JBoss 3.2.4 ...

2003-12-12 Thread Alexey Loubyansky
I fixed it in Branch_3_2. Now the row-locking-template is used instead 
of hardcoded FOR UPDATE OF.
Please, help me test it, so that you won't be disappointed with the next 
release.
Thanks.

Rafal Kedziorski wrote:

hi,

At 14:49 12.12.2003, you wrote:

Sorry, this is my fault.  row-locking = true and on-find will now 
spit out SQL that is SELECT


no problem.

...blah FOR UPDATE.  If the platform doesn't support FOR UPDATE 
then you are screwed.  I'll be fixing this for 3.2.4.

I'm guessing you're working with a DB other than Oracle, PostgreSQL, 
MySQL.  Probably MS SQLServer?


No, woth MySQL with InnoDB-Tables. We habe the problem, that the 
generated Queries has wrong syntax. This is the SELECT statement for MySQL:

SELECT [STRAIGHT_JOIN]
   [SQL_SMALL_RESULT] [SQL_BIG_RESULT] [SQL_BUFFER_RESULT]
   [SQL_CACHE | SQL_NO_CACHE] [SQL_CALC_FOUND_ROWS] [HIGH_PRIORITY]
   [DISTINCT | DISTINCTROW | ALL]
select_expression,...
[INTO {OUTFILE | DUMPFILE} 'file_name' export_options]
[FROM table_references
  [WHERE where_definition]
  [GROUP BY {unsigned_integer | col_name | formula} [ASC | DESC], ...
[WITH ROLLUP]]
  [HAVING where_definition]
  [ORDER BY {unsigned_integer | col_name | formula} [ASC | DESC] ,...]
  [LIMIT [offset,] row_count | row_count OFFSET offset]
  [PROCEDURE procedure_name(argument_list)]
  [FOR UPDATE | LOCK IN SHARE MODE]]
And the generated query has listed columns after FOR UPDATE ... . I get 
today with the actual sources from CVS (last update yesterday). This I 
posted today:

http://sourceforge.net/tracker/index.php?func=detailaid=858828group_id=22866atid=376685 



Regards,
Rafal

Bill

Rafal Kedziorski wrote:

At 12:08 12.12.2003, [EMAIL PROTECTED] wrote:

What is buggy about 3.2.3?


we have a problem with on-find strategy and row-locking = true. 
with on-load it's working without any problem.

Rafal

Regards,

Harm de Laat
Informatiefabriek
The Netherlands


Rafal Kedziorski [EMAIL PROTECTED]
Sent by: [EMAIL PROTECTED]
12/12/2003 11:53 AM
Please respond to
[EMAIL PROTECTED]
To
[EMAIL PROTECTED]
cc
Subject
Re: [JBoss-user] JBoss 3.2.4 ...




At 11:31 12.12.2003, Thomas Hentschel Lund wrote:

hehe

3.2.3 was just released 1-2 days ago. Talk about being impatient ;-)
no, but I will not work with buggy JBoss 3.2.3.

:) JBoss 3.2.2 was released on 1st december (I'm looking on ftp for
download), but I found some bugs, which is impossible for me to 
switch to
this version.

/rk

/Thomas

fre, 2003-12-12 kl. 11:18 skrev Rafal Kedziorski:
  Hi,
 
  when will be JBoss 3.2.4 released?
 
 
  Regards,
  Rafal
 
 
 
  ---
  This SF.net email is sponsored by: IBM Linux Tutorials.
  Become an expert in LINUX or just sharpen your skills.  Sign up for
IBM's
  Free Linux Tutorials.  Learn everything from the bash shell to sys
admin.
  Click now! http://ads.osdn.com/?ad_id=1278alloc_id=3371op=click
  ___
  JBoss-user mailing list
  [EMAIL PROTECTED]
  https://lists.sourceforge.net/lists/listinfo/jboss-user



---
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for 
IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys 
admin.
Click now! http://ads.osdn.com/?ad_id=1278alloc_id=3371op=click
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



---
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for 
IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys 
admin.
Click now! http://ads.osdn.com/?ad_id=1278alloc_id=3371op=click
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



---
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for 
IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys 
admin.
Click now! http://ads.osdn.com/?ad_id=1278alloc_id=3371op=click
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


---
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for 
IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys 
admin.
Click now! http://ads.osdn.com/?ad_id=1278alloc_id=3371op=click
___
JBoss-user mailing list
[EMAIL PROTECTED]

Re: [JBoss-user] JBoss 3.2.4 ...

2003-12-12 Thread Alexey Loubyansky
The fix is already committed.

Rafal Kedziorski wrote:

At 17:21 12.12.2003, Alexey Loubyansky wrote:

Ok. There is one more bug in this regard. It does not work with an 
empty WHERE clause. I am fixing it.


.. o.k. than monday.


---
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278alloc_id=3371op=click
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] JBoss 3.2.4 ...

2003-12-12 Thread Alexey Loubyansky
Rafal Kedziorski wrote:

At 17:30 12.12.2003, Alexey Loubyansky wrote:

Yes, I have.


I try on monday update or new check out.
It's absolutely ok.
I will test myself also. There is an issue with ORDER BY. Currently, it 
is added at the end of the statement, while, at least for MySql it 
should be before 'FOR UPDATE'.

I didn't see any updates and

http://sourceforge.net/mailarchive/forum.php?forum_id=8807
You can subscribe to jboss-cvs-commits mailing list. It is there.

And I guess, you won't be able to check out the changes with anonymous 
login immediately and might need to wait for 24 hours.

didn't show new commits.

Rafal


---
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278alloc_id=3371op=click
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] Commit type question

2003-12-11 Thread Alexey Loubyansky
If a bean/method has a read-only true in jboss.xml it is not 
participating in synchronizaion when the tx commits and remains in the 
cache.
This issue was reported recently and it seems to me Adrian fixed it. 
AFAIK, the instance will be evicted from the cache unless it configured 
option A. The nuance is that, if you try to access the instance again, 
it will be RELOADED from the database.

[EMAIL PROTECTED] wrote:

Hi all,

I have an EJB application. In this application some entity beans should 
use commit type 'A' (I own the database).
And some Entities should use commit type 'B'. (They can be modified using 
the database client, MySQL).

I have the following deployment descriptor (jboss.xml) snippet:

entity
 ejb-nameConfig/ejb-name
 local-jndi-nameConfig/local-jndi-name
method-attributes
method
  method-nameget*/method-name
  read-onlytrue/read-only
/method
/method-attributes
  /entity
  entity
 ejb-nameRelation/ejb-name
 local-jndi-nameRelation/local-jndi-name
 configuration-nameStandard CMP 2.x EntityBean and 
Cache/configuration-name

method-attributes
method
  method-nameget*/method-name
  read-onlytrue/read-only
/method
/method-attributes
  /entity

In standardjboss.xml I added:

container-configuration
 container-nameStandard CMP 2.x EntityBean and 
Cache/container-name
 call-loggingfalse/call-logging
 
invoker-proxy-binding-nameentity-rmi-invoker/invoker-proxy-binding-name
 sync-on-commit-onlyfalse/sync-on-commit-only
 insert-after-ejb-post-createfalse/insert-after-ejb-post-create
 container-interceptors
 
interceptororg.jboss.ejb.plugins.ProxyFactoryFinderInterceptor/interceptor
 interceptororg.jboss.ejb.plugins.LogInterceptor/interceptor
 interceptororg.jboss.ejb.plugins.SecurityInterceptor/interceptor
 interceptororg.jboss.ejb.plugins.TxInterceptorCMT/interceptor
interceptor 
metricsEnabled=trueorg.jboss.ejb.plugins.MetricsInterceptor/interceptor
 
interceptororg.jboss.ejb.plugins.EntityCreationInterceptor/interceptor
 interceptororg.jboss.ejb.plugins.EntityLockInterceptor/interceptor
 
interceptororg.jboss.ejb.plugins.EntityInstanceInterceptor/interceptor
 
interceptororg.jboss.ejb.plugins.EntityReentranceInterceptor/interceptor
 
interceptororg.jboss.resource.connectionmanager.CachedConnectionInterceptor/interceptor
 
interceptororg.jboss.ejb.plugins.EntitySynchronizationInterceptor/interceptor
 
interceptororg.jboss.ejb.plugins.cmp.jdbc.JDBCRelationInterceptor/interceptor
 /container-interceptors
 instance-poolorg.jboss.ejb.plugins.EntityInstancePool/instance-pool
 
instance-cacheorg.jboss.ejb.plugins.InvalidableEntityInstanceCache/instance-cache
 
persistence-managerorg.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager/persistence-manager
 
locking-policyorg.jboss.ejb.plugins.lock.QueuedPessimisticEJBLock/locking-policy
 container-cache-conf
 
cache-policyorg.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy/cache-policy
cache-policy-conf
   min-capacity50/min-capacity
   max-capacity100/max-capacity
   overager-period300/overager-period
   max-bean-age600/max-bean-age
   resizer-period400/resizer-period
   max-cache-miss-period60/max-cache-miss-period
   min-cache-miss-period1/min-cache-miss-period
   cache-load-factor0.75/cache-load-factor
/cache-policy-conf
 /container-cache-conf
 container-pool-conf
MaximumSize100/MaximumSize
 /container-pool-conf
 commit-optionA/commit-option
  /container-configuration

I would expect that the Config Entity bean now uses commit type 'B'. And 
the Relation Entity Bean now uses commit type 'A'.

The thruth however is that both entities now use commit type 'A'.

If I modify the Config entity values using the database client (mysql), I 
have to redeploy my application in order to see my changes in my EJB 
application.

Can somebody explain to me what it is that i'm doing wrong?

Thanks you very much,

Harm de Laat
Informatiefabriek


---
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278alloc_id=3371op=click
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



---
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys 

Re: [JBoss-user] Commit type question

2003-12-11 Thread Alexey Loubyansky
Sorry, editted version of my response...

If a bean/method has a read-only true in jboss.xml it is not associated 
with the transaction and is not participating in synchronizaion when the 
tx commits and remains in the cache.

This issue was reported recently and it seems to me Adrian fixed it.
AFAIK, the instance will be evicted from the cache at the end of the 
invocation unless
the container is configured with option A.

The nuance is that, if you try to access the instance again, in the same 
transaction it will be RELOADED from the database.

[EMAIL PROTECTED] wrote:

Hi all,

I have an EJB application. In this application some entity beans 
should use commit type 'A' (I own the database).
And some Entities should use commit type 'B'. (They can be modified 
using the database client, MySQL).

I have the following deployment descriptor (jboss.xml) snippet:

entity
 ejb-nameConfig/ejb-name
 local-jndi-nameConfig/local-jndi-name
method-attributes
method
  method-nameget*/method-name
  read-onlytrue/read-only
/method
/method-attributes
  /entity
  entity
 ejb-nameRelation/ejb-name
 local-jndi-nameRelation/local-jndi-name
 configuration-nameStandard CMP 2.x EntityBean and 
Cache/configuration-name

method-attributes
method
  method-nameget*/method-name
  read-onlytrue/read-only
/method
/method-attributes
  /entity

In standardjboss.xml I added:

container-configuration
 container-nameStandard CMP 2.x EntityBean and 
Cache/container-name
 call-loggingfalse/call-logging
 
invoker-proxy-binding-nameentity-rmi-invoker/invoker-proxy-binding-name 

 sync-on-commit-onlyfalse/sync-on-commit-only
 insert-after-ejb-post-createfalse/insert-after-ejb-post-create
 container-interceptors
 
interceptororg.jboss.ejb.plugins.ProxyFactoryFinderInterceptor/interceptor 

 interceptororg.jboss.ejb.plugins.LogInterceptor/interceptor
 interceptororg.jboss.ejb.plugins.SecurityInterceptor/interceptor
 interceptororg.jboss.ejb.plugins.TxInterceptorCMT/interceptor
interceptor 
metricsEnabled=trueorg.jboss.ejb.plugins.MetricsInterceptor/interceptor 

 
interceptororg.jboss.ejb.plugins.EntityCreationInterceptor/interceptor 

 interceptororg.jboss.ejb.plugins.EntityLockInterceptor/interceptor
 
interceptororg.jboss.ejb.plugins.EntityInstanceInterceptor/interceptor 

 
interceptororg.jboss.ejb.plugins.EntityReentranceInterceptor/interceptor 

 
interceptororg.jboss.resource.connectionmanager.CachedConnectionInterceptor/interceptor 

 
interceptororg.jboss.ejb.plugins.EntitySynchronizationInterceptor/interceptor 

 
interceptororg.jboss.ejb.plugins.cmp.jdbc.JDBCRelationInterceptor/interceptor 

 /container-interceptors
 instance-poolorg.jboss.ejb.plugins.EntityInstancePool/instance-pool
 
instance-cacheorg.jboss.ejb.plugins.InvalidableEntityInstanceCache/instance-cache 

 
persistence-managerorg.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager/persistence-manager 

 
locking-policyorg.jboss.ejb.plugins.lock.QueuedPessimisticEJBLock/locking-policy 

 container-cache-conf
 
cache-policyorg.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy/cache-policy 

cache-policy-conf
   min-capacity50/min-capacity
   max-capacity100/max-capacity
   overager-period300/overager-period
   max-bean-age600/max-bean-age
   resizer-period400/resizer-period
   max-cache-miss-period60/max-cache-miss-period
   min-cache-miss-period1/min-cache-miss-period
   cache-load-factor0.75/cache-load-factor
/cache-policy-conf
 /container-cache-conf
 container-pool-conf
MaximumSize100/MaximumSize
 /container-pool-conf
 commit-optionA/commit-option
  /container-configuration
I would expect that the Config Entity bean now uses commit type 'B'. 
And the Relation Entity Bean now uses commit type 'A'.

The thruth however is that both entities now use commit type 'A'.

If I modify the Config entity values using the database client 
(mysql), I have to redeploy my application in order to see my changes 
in my EJB application.

Can somebody explain to me what it is that i'm doing wrong?

Thanks you very much,

Harm de Laat
Informatiefabriek


---
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278alloc_id=3371op=click
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] Commit type question

2003-12-11 Thread Alexey Loubyansky
I think this is a bug that was fixed. I don't remember in which version, 
though.
To workaround the caching you should not set read-only to true for 
containers with commit option B and C.

[EMAIL PROTECTED] wrote:

Alexey,

Thank you for your reply. 

Does this mean that it is a bug in JBoss? I'm currently using JBoss 3.2.2.

Or do I have to configure my beans in some other way in jboss.xml?

Thanks, 

Harm de Laat
Informatiefabriek
The Netherlands


Alexey Loubyansky [EMAIL PROTECTED] 
Sent by: [EMAIL PROTECTED]
12/11/2003 02:28 PM
Please respond to
[EMAIL PROTECTED]

To
[EMAIL PROTECTED]
cc
Subject
Re: [JBoss-user] Commit type question




Sorry, editted version of my response...

If a bean/method has a read-only true in jboss.xml it is not associated 
with the transaction and is not participating in synchronizaion when the 
tx commits and remains in the cache.

This issue was reported recently and it seems to me Adrian fixed it.
AFAIK, the instance will be evicted from the cache at the end of the 
invocation unless
the container is configured with option A.

The nuance is that, if you try to access the instance again, in the same 
transaction it will be RELOADED from the database.


[EMAIL PROTECTED] wrote:


Hi all,

I have an EJB application. In this application some entity beans 
should use commit type 'A' (I own the database).
And some Entities should use commit type 'B'. (They can be modified 
using the database client, MySQL).

I have the following deployment descriptor (jboss.xml) snippet:

   entity
ejb-nameConfig/ejb-name
local-jndi-nameConfig/local-jndi-name
   method-attributes
   method
 method-nameget*/method-name
 read-onlytrue/read-only
   /method
   /method-attributes
 /entity
 entity
ejb-nameRelation/ejb-name
local-jndi-nameRelation/local-jndi-name
configuration-nameStandard CMP 2.x EntityBean and 
Cache/configuration-name

   method-attributes
   method
 method-nameget*/method-name
 read-onlytrue/read-only
   /method
   /method-attributes
 /entity

In standardjboss.xml I added:

container-configuration
container-nameStandard CMP 2.x EntityBean and 
Cache/container-name
call-loggingfalse/call-logging


invoker-proxy-binding-nameentity-rmi-invoker/invoker-proxy-binding-name 


sync-on-commit-onlyfalse/sync-on-commit-only
insert-after-ejb-post-createfalse/insert-after-ejb-post-create
container-interceptors

interceptororg.jboss.ejb.plugins.ProxyFactoryFinderInterceptor/interceptor 


interceptororg.jboss.ejb.plugins.LogInterceptor/interceptor
interceptororg.jboss.ejb.plugins.SecurityInterceptor/interceptor
interceptororg.jboss.ejb.plugins.TxInterceptorCMT/interceptor
   interceptor 

metricsEnabled=trueorg.jboss.ejb.plugins.MetricsInterceptor/interceptor 




interceptororg.jboss.ejb.plugins.EntityCreationInterceptor/interceptor 


interceptororg.jboss.ejb.plugins.EntityLockInterceptor/interceptor


interceptororg.jboss.ejb.plugins.EntityInstanceInterceptor/interceptor 




interceptororg.jboss.ejb.plugins.EntityReentranceInterceptor/interceptor 




interceptororg.jboss.resource.connectionmanager.CachedConnectionInterceptor/interceptor 




interceptororg.jboss.ejb.plugins.EntitySynchronizationInterceptor/interceptor 




interceptororg.jboss.ejb.plugins.cmp.jdbc.JDBCRelationInterceptor/interceptor 


/container-interceptors
instance-poolorg.jboss.ejb.plugins.EntityInstancePool/instance-pool

instance-cacheorg.jboss.ejb.plugins.InvalidableEntityInstanceCache/instance-cache 




persistence-managerorg.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager/persistence-manager 




locking-policyorg.jboss.ejb.plugins.lock.QueuedPessimisticEJBLock/locking-policy 


container-cache-conf


cache-policyorg.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy/cache-policy 


   cache-policy-conf
  min-capacity50/min-capacity
  max-capacity100/max-capacity
  overager-period300/overager-period
  max-bean-age600/max-bean-age
  resizer-period400/resizer-period
  max-cache-miss-period60/max-cache-miss-period
  min-cache-miss-period1/min-cache-miss-period
  cache-load-factor0.75/cache-load-factor
   /cache-policy-conf
/container-cache-conf
container-pool-conf
   MaximumSize100/MaximumSize
/container-pool-conf
commit-optionA/commit-option
 /container-configuration
I would expect that the Config Entity bean now uses commit type 'B'. 
And the Relation Entity Bean now uses commit type 'A'.

The thruth however is that both entities now use commit type 'A'.

If I modify the Config entity values using the database client 
(mysql), I have to redeploy my application in order to see my changes 
in my EJB application.

Can somebody explain to me what

Re: [JBoss-user] automatic primary key generation for CMP entityBeans ?

2003-12-11 Thread Alexey Loubyansky
select max() is not safe. Look at standardjbosscmp-jdbc.xml file for 
entity-commands for avaliable key generations.

[EMAIL PROTECTED] wrote:

Hello, everyone

I have a Entity Bean with a String as PK.
The String consists of the characters [0-9]and[A-Z].
My approach is to get the latest key from the DB
with an ejbSelect method(select MAX()). Is this
safe, or is it possible that I assign accidentially the same PK
to 2 entitys because the PK of the first one doenst show up
in the DB while generating the second key ?
Does JBoss have any sort of PK generator which I can
configure ? Or can I use the auto-increment function of the
Database (I want Jboss to create the tables).
Thanks for any suggestion,

Stefan

---
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278alloc_id=3371op=click
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



---
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278alloc_id=3371op=click
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] database schema error

2003-12-08 Thread Alexey Loubyansky
This is a known issue. No way, at the moment.

forge wrote:

Hello, everyone



I developed a J2EE project by jbuilder9 + jboss 3.2.2,

The deployment has succeeded but when I tested, 

it reported SQL: DB2ADMIN.user undefined name error.



The user table has been created but its schema name is employee,

I am using DB2 as my database and account is db2admin.

I think jboss use my login account as schema name.



I want to specify a different schema than the one that is defaulted 

to by my login.  I don't see any where that I am able to specify 

a different schema.  Any suggestions will help.



Thanks in advance

Forge





--http://www.eyou.com
--...
--http://vip.eyou.com
--VIP  


---
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278alloc_id=3371op=click
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



---
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278alloc_id=3371op=click
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] Container Responsibility for CMR Foreign Keys

2003-12-07 Thread Alexey Loubyansky
Unfortunately, you can't use this kind of key generation with 
insert-after-ejb-post-create.
[ 784322 ] INSERT after ejbPostCreate
http://sourceforge.net/tracker/?func=detailaid=784322group_id=22866atid=381174

By the spec (and current implementation), the primary key should be set 
in ejbCreate and available in ejbPostCreate. Which is impossible in the 
case there was no INSERT after ejbCreate.
The entity key generation commands that work with 
insert-after-ejb-post-create are pk-sql and key-generator.

Hanson, Matthew wrote:
Hi,

Per your request, I have tested a bean with auto-increment primary key
fields and without foreign-key mappings.
I created a mini-project for Jboss 3.2.2 comprised of only a single bean
class that should have Hypersonic auto-increment and create a primary key
for the bean.  The bean has no relationships at all and does have the
auto-increment tag.  Additionally, just for thoroughness, all of the
insert-after-ejb-post-create tags in standardjboss.xml are set to true.
The null primary key exception was thrown again.


---
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278alloc_id=3371op=click
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] cmp primary key fields

2003-12-04 Thread Alexey Loubyansky
The same way as non primary key fields.

Jeremy Rempel wrote:

Hi,

In jbosscmp-jdbc.xml how do I map primary key fields to a certain
database field? I can map the regular fields easily.
Thanks, Jeremy


---
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278alloc_id=3371op=click
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] Container Responsibility for CMR Foreign Keys

2003-12-04 Thread Alexey Loubyansky
Key generation commands in 3.2.1 are different from those in 3.2.2. In 
3.2.2 you should have auto-increment/ for generated fields.

Could check whether key generation work for you w/o mapping foreign key 
fields to the primary key fields?

Hanson, Matthew wrote:

Hi

Just another FYI on the null primary key for auto-increment primary key
problem in jboss-3.2.2.  Basically, the auto-increment keys don't seem to
generate, and I get a null primary key error on creation.  The suggestion
was to add auto-increment/ to jbosscmp-jdbc.xml for the key fields.  I did
that, and the failure still occurs.  Just to be sure, I simply deployed the
jar to 3.2.1.  With 3.2.1, the deployment failed with the following error:
2003-12-04 13:50:16,738 ERROR
[org.jboss.deployment.scanner.URLDeploymentScanner] MBeanException:
Exception in MBean operation 'checkIncompleteDeployments()'
Cause: Incomplete Deployment listing:
Packages waiting for a deployer:
  none
Incompletely deployed packages:
  none
MBeans waiting for classes:
  none
MBeans waiting for other MBeans:
[ObjectName:
jboss.j2ee:jndiName=homebrew/ejb/entity/accountHolderBean,service=EJB
 state: FAILED
 I Depend On: 
 Depends On Me: java.lang.IllegalStateException: auto-increment template not
found]

So, in 3.2.1, I removed the auto-increment/ tag from the beans, and the
app deploys and the bean works (i.e., auto-increment keys are generated
properly).
Can you tell me why the auto-increment tag was suggested for 3.2.2?  Are
there additional tags that must be included?
Please help!!!

Regards,
Matt Hanson


---
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278alloc_id=3371op=click
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] Beans not cached using A and read-only

2003-12-03 Thread Alexey Loubyansky
Yes, keep the custom container and just try a simple test.

Alwyn Schoeman wrote:

On Tue, Dec 02, 2003 at 10:02:58PM +0200, Alexey Loubyansky wrote:

Sorry, I was inattentive. Of course, it should work w/o read-only in 
jbosscmp-jdbc.xml.
Can you check whether commit option A works at all for you? Just a 
simple example. If so, under what config options it breaks?
Thanks.


In doing the test, must I keep the custom container config as is and just try
with read-only, not read-only and with findByPrimaryKey?
Sorry I'm very new to CMP.



---
This SF.net email is sponsored by OSDN's Audience Survey.
Help shape OSDN's sites and tell us what you think. Take this
five minute survey and you could win a $250 Gift Certificate.
http://www.wrgsurveys.com/2003/osdntech03.php?site=8
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] Oracle error

2003-12-03 Thread Alexey Loubyansky
AFAICT, it is either a driver problem or there is a bind variable in the 
statement which is a reserved word.
Could you try with another driver?

[EMAIL PROTECTED] wrote:

Hi all,
I have a CMP entity bean that access to oracle 9i database. When I
do the lookup it has no problem, but when I try to get some attribute (eg
getName()) it gives the following error:
org.jboss.tm.JBossTransactionRolledbackException: Load failed;
CausedByException is:
ORA-01745: invalid host/bind variable name
; CausedByException is:
Load failed; CausedByException is:
ORA-01745: invalid host/bind variable name
; nested exception is: 
javax.ejb.EJBException: Load failed; CausedByException is:
ORA-01745: invalid host/bind variable name
; - nested throwable: (javax.ejb.EJBException: Load failed;
CausedByException is:
ORA-01745: invalid host/bind variable name
)

I have found a solution to this error an it is to have less than 255
records in the table. When the returned collection has more than 255 CMP
object it breaks.
Does anyone know where should I change this configuration or what is wrong? 
I have looked in the conf dir but I did not found where...

Regards,
Hernán.
---
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



---
This SF.net email is sponsored by OSDN's Audience Survey.
Help shape OSDN's sites and tell us what you think. Take this
five minute survey and you could win a $250 Gift Certificate.
http://www.wrgsurveys.com/2003/osdntech03.php?site=8
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] Container Responsibility for CMR Foreign Keys

2003-12-03 Thread Alexey Loubyansky
How the beans is configured in ejb-jar.xml and jbosscmp-jdbc.xml?

Hanson, Matthew wrote:

Hi,

I have modified the reentrancy tags for my beans to false, deployed the
beans to binary download of Jboss 3.2.2 with insert-after-ejb-post-create,
and now I catch the following exception in ejbCreate of the n-side bean:
2003-12-03 09:15:53,858 ERROR [org.jboss.ejb.plugins.LogInterceptor]
TransactionRolledbackLocalException in method: public abstract void
homebrew.ejb.interfaces.accountHolderBeanLocal.setaccountHolderBeanValue(hom
ebrew.ejb.interfaces.accountHolderBeanValue), causedBy:
javax.ejb.CreateException: Primary key for created instance is null.
at
org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.createEntity(JDBCStoreManage
r.java:520)
at
org.jboss.ejb.plugins.CMPPersistenceManager.createEntity(CMPPersistenceManag
er.java:208)
at
org.jboss.resource.connectionmanager.CachedConnectionInterceptor.createEntit
y(CachedConnectionInterceptor.java:269)
at
org.jboss.ejb.EntityContainer.createLocalHome(EntityContainer.java:580)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
Is the entity-command name=hsqldb-fetch-key for the bean is being
ignored in Jboss 3.2.2?
Please advise!  Thanks!

Regards,
Matt Hanson
-Original Message-
From: Alexey Loubyansky [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 02, 2003 3:27 PM
To: [EMAIL PROTECTED]
Subject: Re: [JBoss-user] Container Responsibility for CMR Foreign Keys
By the spec, you may not establish relationships in ejbCreate but may in 
ejbPostCreate.
By default, INSERT is done after ejbCreate but before ejbPostCreate.
You can use insert-after-ejb-post-create to delay INSERT until after 
ejbPostCreate but this feature is available, AFAIR, since 3.2.2.

Hanson, Matthew wrote:


Hi,

I am using xdoclet 1.2b2 to generate deployment descriptors and classes,
including value objects, for two beans that I hope to write with support
for

CMR.  We also use Jboss 3.2.1 as my app server and hypersonic and/or mysql
as the db.
Basically, I just want to write a relatively ejb-standard foreign keyed
insert for 1:n-related beans that are both being creating together.
The bean class generated by xdoclet maintains vectors of added, removed,
and

updated value objects of the type that is the n-side of the 1:n
relationship

that I hope to support.  It also generates a set...BeanValue() method to
process the 1-side bean value object.  This set...BeanValue() methods
iterates across the n-side value objects and tries to create the n-siders
via the create followed by Collection.add methods.  The keys on the
1-side,

however, are not included in the value object, and the create fails the
non-null foreign key constraint.
Before posting to xdoclet, I stepped back and started to think that the
ejb

container (Jboss) should probably creating and assigning foreign keys to
the

n-side with the local interface set methods.  The ejb spec, however, does
not seem to support this thought, and I do see posts on the jboss site
that

say the setting of foreign keys of the n-side is generally done in the
ejbPostCreate method of the 1-side.  Well, I tried that, and I can output
the n-side value objects in the 1-side ejbPostCreate and see the updated
key

field, but the insert on the n-side still fails!?!?!?!?.

Now, I also see in the posts that Jboss 3.2.2 may offer a new tag
insert-after-ejb-post-create in standardjboss.xml that prompts the app
server to wait until after ejbPostCreate to try to write the n-side of the
datasource.
Before I spend another day on this, I am wondering if someone can just
tell

me:
(1)  Are these keyed inserts on related beans even possible?
(2)  What is the recommended way to do them?  (Code, new jboss version,
other?)
Wow - I hope that I am making some sense, because it seems like a very
common thing to do...
Any help would be great!

Regards,
Matt Hanson
---
This SF.net email is sponsored by OSDN's Audience Survey.
Help shape OSDN's sites and tell us what you think. Take this
five minute survey and you could win a $250 Gift Certificate.
http://www.wrgsurveys.com/2003/osdntech03.php?site=8
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user





---
This SF.net email is sponsored by OSDN's Audience Survey.
Help shape OSDN's sites and tell us what you think. Take this
five minute survey and you could win a $250 Gift Certificate.
http://www.wrgsurveys.com/2003/osdntech03.php?site=8
___
JBoss-user mailing list
[EMAIL PROTECTED]
https

Re: [JBoss-user] Container Responsibility for CMR Foreign Keys

2003-12-03 Thread Alexey Loubyansky
The auto incremented/generated field should have auto-increment/ in 
jbosscmp-jdbc.xml



---
This SF.net email is sponsored by OSDN's Audience Survey.
Help shape OSDN's sites and tell us what you think. Take this
five minute survey and you could win a $250 Gift Certificate.
http://www.wrgsurveys.com/2003/osdntech03.php?site=8
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] Container Responsibility for CMR Foreign Keys

2003-12-03 Thread Alexey Loubyansky
Is the column in the database was created with IDENTITY attribute?

Hanson, Matthew wrote:

Hi--

Well, I added the auto-increment tag to jbosscmp-jdbc.xml, and the null
primary key exception is still thrown:


---
This SF.net email is sponsored by OSDN's Audience Survey.
Help shape OSDN's sites and tell us what you think. Take this
five minute survey and you could win a $250 Gift Certificate.
http://www.wrgsurveys.com/2003/osdntech03.php?site=8
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] Foreign key issues when upgrading to JBoss 3.2.3RC1 (from 3.2.2RC 3)

2003-12-03 Thread Alexey Loubyansky
There was a bug in foreign key handling. When the relationship was 
modified on one side while the other side was not yet loaded, then when 
this other side was loaded from the database (already outdated) foreign 
keys where not properly handled. Perhaps, this could affect your 
application.
Unfortunately, I can't say what other side effects could occur in 3.2.2 
with your application not having the code and traces. The bug I fixed 
showed itself in some specific cascade-delete case.
If there are problems, please, let me know.

Gavin Matthews wrote:

All,
 I'm attempting to upgrade an app from JBoss 3.2.2RC3 to 3.2.3RC1. 
However I got a failure in a testcase that makes me wonder why this ever 
worked.

 I'm using SqlServer 2000 and the problem occurs with foreign key fields 
of type UniqueIdentifer which map to primary keys. I'm handling the 
guids as Strings and not byte[] as they're easier to work with and it 
allows me to do more with finders etc.

 The unique identifier I'm generating when creating the ejbs are upper 
case. However when the database is queried the unique identifier comes 
back as lower case (I'm assuming this is just the standard behaviour of 
the Sprinta JDBC driver). This causes a failure in 
JDBCCMRFieldBridge::load() - the issue is in 
JDBCCMP2xFieldBridge::setInstanceValue(), the test 
fieldState.isValueChanged(value) returns true (one string is upper case 
and one is lower), and because my foreign key maps to a primary key I 
get the exception:

throw new IllegalStateException(
   New value [ + value + ] of a foreign key field 
   + getFieldName()
   +  changed the value of a primary key field 
   + cmpFieldIAmMappedTo.getFieldName()
   + [ + fieldState.value + ]);
 The solution appears simple enough - generate guids in the same case 
that the database driver returns them in (i.e. lower).

 However my question is, why did this ever worked in 3.2.2? I'm guessing 
that 3.2.2 didn't reload the foreign keys from the database (so it 
didn't notice the case issue) and 3.2.3 does - however I'd appreciate if 
someone could fill in the blanks, what were the changes in 3.2.3 that 
exposed this failure? What side-effects could I see when running my app 
with this problem against 3.2.2?

thanks,
gavin



---
This SF.net email is sponsored by OSDN's Audience Survey.
Help shape OSDN's sites and tell us what you think. Take this
five minute survey and you could win a $250 Gift Certificate.
http://www.wrgsurveys.com/2003/osdntech03.php?site=8
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] Beans not cached using A and read-only

2003-12-02 Thread Alexey Loubyansky
Try with read-only=true in jbosscmp-jdbc.xml.

Alwyn Schoeman wrote:
Hi,

I am using 3.2.2.  When I look at the database logs I can see that the database is 
queried for
each access to the Bean. Also the console shows no entries in the cache.
I am accessing the Bean from a servlet. Also the bean is found by executing a custom finder.

The following is my deployment descriptor:

?xml version=1.0 encoding=UTF-8?
!DOCTYPE jboss PUBLIC -//JBoss//DTD JBOSS 3.2//EN 
http://www.jboss.org/j2ee/dtd/jboss_3_2.dtd;
jboss

   enterprise-beans

  entity
 ejb-nameU2TransactionPropertyBean/ejb-name
 local-jndi-nameu2/cmp/U2TransactionPropertyBeanLocal/local-jndi-name
 read-onlytrue/read-only
 configuration-nameCMP 2.x with cache/configuration-name
method-attributes
/method-attributes
  /entity

   /enterprise-beans

   resource-managers
   /resource-managers
container-configurations
container-configuration extends=Standard CMP 2.x EntityBean
  container-nameCMP 2.x with cache/container-name
  commit-optionA/commit-option
/container-configuration
  /container-configurations
/jboss

Kind regards,



---
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] Beans not cached using A and read-only

2003-12-02 Thread Alexey Loubyansky
Sorry, I was inattentive. Of course, it should work w/o read-only in 
jbosscmp-jdbc.xml.
Can you check whether commit option A works at all for you? Just a 
simple example. If so, under what config options it breaks?
Thanks.

Alwyn Schoeman wrote:

On Tue, Dec 02, 2003 at 10:11:27AM +0200, Alexey Loubyansky wrote:

Try with read-only=true in jbosscmp-jdbc.xml.

It seems to be set.  The following is my jbosscmp-jdbc.xml:


---
This SF.net email is sponsored by OSDN's Audience Survey.
Help shape OSDN's sites and tell us what you think. Take this
five minute survey and you could win a $250 Gift Certificate.
http://www.wrgsurveys.com/2003/osdntech03.php?site=8
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] Container Responsibility for CMR Foreign Keys

2003-12-02 Thread Alexey Loubyansky
By the spec, you may not establish relationships in ejbCreate but may in 
ejbPostCreate.
By default, INSERT is done after ejbCreate but before ejbPostCreate.
You can use insert-after-ejb-post-create to delay INSERT until after 
ejbPostCreate but this feature is available, AFAIR, since 3.2.2.

Hanson, Matthew wrote:

Hi,

I am using xdoclet 1.2b2 to generate deployment descriptors and classes,
including value objects, for two beans that I hope to write with support for
CMR.  We also use Jboss 3.2.1 as my app server and hypersonic and/or mysql
as the db.
Basically, I just want to write a relatively ejb-standard foreign keyed
insert for 1:n-related beans that are both being creating together.
The bean class generated by xdoclet maintains vectors of added, removed, and
updated value objects of the type that is the n-side of the 1:n relationship
that I hope to support.  It also generates a set...BeanValue() method to
process the 1-side bean value object.  This set...BeanValue() methods
iterates across the n-side value objects and tries to create the n-siders
via the create followed by Collection.add methods.  The keys on the 1-side,
however, are not included in the value object, and the create fails the
non-null foreign key constraint.
Before posting to xdoclet, I stepped back and started to think that the ejb
container (Jboss) should probably creating and assigning foreign keys to the
n-side with the local interface set methods.  The ejb spec, however, does
not seem to support this thought, and I do see posts on the jboss site that
say the setting of foreign keys of the n-side is generally done in the
ejbPostCreate method of the 1-side.  Well, I tried that, and I can output
the n-side value objects in the 1-side ejbPostCreate and see the updated key
field, but the insert on the n-side still fails!?!?!?!?.
Now, I also see in the posts that Jboss 3.2.2 may offer a new tag
insert-after-ejb-post-create in standardjboss.xml that prompts the app
server to wait until after ejbPostCreate to try to write the n-side of the
datasource.
Before I spend another day on this, I am wondering if someone can just tell
me:
(1)  Are these keyed inserts on related beans even possible?
(2)  What is the recommended way to do them?  (Code, new jboss version,
other?)
Wow - I hope that I am making some sense, because it seems like a very
common thing to do...
Any help would be great!

Regards,
Matt Hanson
---
This SF.net email is sponsored by OSDN's Audience Survey.
Help shape OSDN's sites and tell us what you think. Take this
five minute survey and you could win a $250 Gift Certificate.
http://www.wrgsurveys.com/2003/osdntech03.php?site=8
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



---
This SF.net email is sponsored by OSDN's Audience Survey.
Help shape OSDN's sites and tell us what you think. Take this
five minute survey and you could win a $250 Gift Certificate.
http://www.wrgsurveys.com/2003/osdntech03.php?site=8
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] JBoss 3.2.3

2003-12-01 Thread Alexey Loubyansky
Could you please increase the log level to trace for this same case?

   category name=org.jboss.ejb.plugins.cmp
 priority value=TRACE class=org.jboss.logging.XLevel/
   /category
Thank you.

Rafal Kedziorski wrote:

hi,

I downloaded the new JBoss 3.2.3 version. We are waiting for the Jetty 
archive, but I tested our application with Tomcat, which should work. We 
have an startup servlet, which should initialize some data. But we get 
exception:

2003-12-01 11:27:02,265 INFO  
[org.jboss.web.tomcat.tc4.EmbeddedTomcatService] deploy, ctxPath=, 
warUrl=file:/E:/jboss/jboss-3.2.3/server/oma/tmp/deploy/tmp6695oma.ear-contents/oma.war/ 

2003-12-01 11:27:02,781 INFO  [org.jboss.web.localhost.Engine] 
SingleSignOnContextConfig[]: Added certificates - request attribute Valve
2003-12-01 11:27:02,812 WARN  
[org.jboss.web.tomcat.tc4.EmbeddedTomcatService] Unable to invoke 
setDelegate on class 
loader:[EMAIL PROTECTED]
2003-12-01 11:27:02,812 INFO  [org.jboss.web.localhost.Engine] 
StandardManager[]: Seeding random number generator class 
java.security.SecureRandom
2003-12-01 11:27:02,812 INFO  [org.jboss.web.localhost.Engine] 
StandardManager[]: Seeding of random number generator has been completed
2003-12-01 11:27:02,906 INFO  [org.jboss.web.localhost.Engine] 
StandardWrapper[:default]: Loading container servlet default
2003-12-01 11:27:03,062 DEBUG 
[org.jboss.ejb.plugins.cmp.jdbc.JDBCEJBQLQuery.CodecBean#findAll] 
Executing SQL: SELECT t0_o.codec_id FROM codec t0_o
2003-12-01 11:27:03,140 ERROR [org.jboss.ejb.plugins.LogInterceptor] 
TransactionRolledbackLocalException in method: public abstract 
java.lang.String 
net.magix.ejb.media.entitybeans.CodecBeanLocal.getName(), causedBy:
javax.ejb.EJBException: Could not load field value: name
at 
org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMP2xFieldBridge.getInstanceValue(JDBCCMP2xFieldBridge.java:180) 

at 
org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCAbstractCMPFieldBridge.getValue(JDBCAbstractCMPFieldBridge.java:202) 

at 
org.jboss.ejb.plugins.cmp.bridge.EntityBridgeInvocationHandler.invoke(EntityBridgeInvocationHandler.java:119) 

at org.jboss.proxy.compiler.Runtime.invoke(Runtime.java:59)
at net.magix.ejb.media.entitybeans.CodecBean$Proxy.getName(generated)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 

at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 

at java.lang.reflect.Method.invoke(Method.java:324)
at 
org.jboss.ejb.EntityContainer$ContainerInterceptor.invoke(EntityContainer.java:1096) 

at 
org.jboss.ejb.plugins.cmp.jdbc.JDBCRelationInterceptor.invoke(JDBCRelationInterceptor.java:72) 

at 
org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invoke(EntitySynchronizationInterceptor.java:282) 

at 
org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:185) 

at 
org.jboss.ejb.plugins.EntityReentranceInterceptor.invoke(EntityReentranceInterceptor.java:114) 

at 
org.jboss.ejb.plugins.EntityInstanceInterceptor.invoke(EntityInstanceInterceptor.java:163) 

at 
org.jboss.ejb.plugins.EntityLockInterceptor.invoke(EntityLockInterceptor.java:89) 

at 
org.jboss.ejb.plugins.EntityCreationInterceptor.invoke(EntityCreationInterceptor.java:54) 

at 
org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:84) 

at 
org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:349) 

at 
org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:128)
at 
org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:118) 

at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191)
at 
org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122) 

at 
org.jboss.ejb.EntityContainer.internalInvoke(EntityContainer.java:489)
at org.jboss.ejb.Container.invoke(Container.java:700)
at 
org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invoke(BaseLocalProxyFactory.java:375) 

at org.jboss.ejb.plugins.local.EntityProxy.invoke(EntityProxy.java:38)
at $Proxy193.getName(Unknown Source)
at 
net.magix.valueobject.helper.media.CodecVOHelper.getVO(CodecVOHelper.java:66) 

at 
net.magix.ejb.media.sessionbeans.MediaBean.getAllCodecVO(MediaBean.java:1001) 

I added

   category name=org.jboss.ejb.plugins.cmp
 priority value=DEBUG/
   /category
for more debug print out.

Regards,
Rafal


---
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
___
JBoss-user mailing list
[EMAIL PROTECTED]

Re: [JBoss-user] JBoss 3.2.3

2003-12-01 Thread Alexey Loubyansky
Unfortunately, I still can't reproduce it. Could you please provide me 
with the DDs and instructions to reproduce this? Thank you.

Rafal Kedziorski wrote:
At 12:28 01.12.2003, Alexey Loubyansky wrote:

Could you please increase the log level to trace for this same case?

   category name=org.jboss.ejb.plugins.cmp
 priority value=TRACE class=org.jboss.logging.XLevel/
   /category
Thank you.


no problem.

and this is the result:

2003-12-01 13:45:42,625 INFO  
[org.jboss.web.tomcat.tc4.EmbeddedTomcatService] deploy, ctxPath=, 
warUrl=file:/E:/jboss/jboss-3.2.3/server/oma/tmp/deploy/tmp36875oma.ear-contents/oma.war/ 

2003-12-01 13:45:42,843 INFO  [org.jboss.web.localhost.Engine] 
SingleSignOnContextConfig[]: Added certificates - request attribute Valve
2003-12-01 13:45:42,890 WARN  
[org.jboss.web.tomcat.tc4.EmbeddedTomcatService] Unable to invoke 
setDelegate on class 
loader:[EMAIL PROTECTED]
2003-12-01 13:45:42,890 INFO  [org.jboss.web.localhost.Engine] 
StandardManager[]: Seeding random number generator class 
java.security.SecureRandom
2003-12-01 13:45:42,890 INFO  [org.jboss.web.localhost.Engine] 
StandardManager[]: Seeding of random number generator has been completed
2003-12-01 13:45:42,968 INFO  [org.jboss.web.localhost.Engine] 
StandardWrapper[:default]: Loading container servlet default
2003-12-01 13:45:43,234 DEBUG 
[org.jboss.ejb.plugins.cmp.jdbc.JDBCEJBQLQuery.CodecBean#findAll] 
Executing SQL: SELECT t0_o.codec_id FROM codec t0_o
2003-12-01 13:45:43,265 TRACE 
[org.jboss.ejb.plugins.cmp.jdbc.ReadAheadCache.CodecBean] Add finder 
results: entity=CodecBean results=[1, 2, 3, 4, 5, 100, 101, 102, 103, 
104, 105, 200, 201, 202, 203, 204] readahead=[JDBCReadAheadMetaData : 
strategy=on-load, pageSize=4, eagerLoadGroup=*]
2003-12-01 13:45:43,296 TRACE 
[org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.CodecBean] RESET 
PERSISTENCE CONTEXT: id=1
2003-12-01 13:45:43,296 TRACE 
[org.jboss.ejb.plugins.cmp.jdbc.ReadAheadCache.CodecBean] load data: 
entity=CodecBean pk=1
2003-12-01 13:45:43,296 TRACE 
[org.jboss.ejb.plugins.cmp.jdbc.ReadAheadCache.CodecBean] No preload 
data found: entity=CodecBean pk=1
2003-12-01 13:45:43,296 TRACE 
[org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCEntityBridge.CodecBean] 
Eager-load for entity: readahead=[JDBCReadAheadMetaData : 
strategy=on-load, pageSize=4, eagerLoadGroup=*]
2003-12-01 13:45:43,296 TRACE 
[org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.CodecBean] RESET 
PERSISTENCE CONTEXT: id=1
2003-12-01 13:45:43,296 TRACE 
[org.jboss.ejb.plugins.cmp.jdbc.ReadAheadCache.CodecBean] load data: 
entity=CodecBean pk=1
2003-12-01 13:45:43,296 TRACE 
[org.jboss.ejb.plugins.cmp.jdbc.ReadAheadCache.CodecBean] No preload 
data found: entity=CodecBean pk=1
2003-12-01 13:45:43,296 TRACE 
[org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCEntityBridge.CodecBean] 
Eager-load for entity: readahead=[JDBCReadAheadMetaData : 
strategy=on-load, pageSize=4, eagerLoadGroup=*]
2003-12-01 13:45:43,296 TRACE 
[org.jboss.ejb.plugins.cmp.jdbc.ReadAheadCache.CodecBean] load data: 
entity=CodecBean pk=1
2003-12-01 13:45:43,296 TRACE 
[org.jboss.ejb.plugins.cmp.jdbc.ReadAheadCache.CodecBean] No preload 
data found: entity=CodecBean pk=1
2003-12-01 13:45:43,296 ERROR [org.jboss.ejb.plugins.LogInterceptor] 
TransactionRolledbackLocalException in method: public abstract 
java.lang.String 
net.magix.ejb.media.entitybeans.CodecBeanLocal.getName(), causedBy:
javax.ejb.EJBException: Could not load field value: name
at 
org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMP2xFieldBridge.getInstanceValue(JDBCCMP2xFieldBridge.java:180) 

at 
org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCAbstractCMPFieldBridge.getValue(JDBCAbstractCMPFieldBridge.java:202) 

at 
org.jboss.ejb.plugins.cmp.bridge.EntityBridgeInvocationHandler.invoke(EntityBridgeInvocationHandler.java:119) 

at org.jboss.proxy.compiler.Runtime.invoke(Runtime.java:59)
at 
net.magix.ejb.media.entitybeans.CodecBean$Proxy.getName(generated)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 

at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 

at java.lang.reflect.Method.invoke(Method.java:324)
at 
org.jboss.ejb.EntityContainer$ContainerInterceptor.invoke(EntityContainer.java:1096) 

at 
org.jboss.ejb.plugins.cmp.jdbc.JDBCRelationInterceptor.invoke(JDBCRelationInterceptor.java:72) 

at 
org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invoke(EntitySynchronizationInterceptor.java:282) 

at 
org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:185) 

at 
org.jboss.ejb.plugins.EntityReentranceInterceptor.invoke(EntityReentranceInterceptor.java:114) 

at 
org.jboss.ejb.plugins.EntityInstanceInterceptor.invoke(EntityInstanceInterceptor.java:163

  1   2   3   4   5   >