Re: [JBoss-user] RE: Clarification about the User Defined Prmary key class

2001-07-15 Thread Burkhard Vogel


- Original Message -
From: "Sanjeev.Srinivas" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, July 13, 2001 5:47 PM
Subject: [JBoss-user] RE: Clarification about the User Defined Prmary key
class


> My question is :
> can we use the user defined primary class for ex. UserPK instead of
> java.lang.Integer, if yes can someone tell weather the ejb-jar.xml file
> should have entries for both the primark-key-class and primary-key-field ?
>
> thanks in advance.
>
[SNIP]
HEY, almost 900 lines posted to ask 3 LINES OF QUESTION THIS _MUST_ BE
RECORD
To your question:
Yes you can use your own PK-calls.
You usually have to give the class for BMP and CMP.
If you use _SIMPLE_ (java.lang.*) type PK-classes you can use primkey-field
tags for CMP.
So, in short: usually class, eventually field, but than without class.
Burkhard



___
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user



[JBoss-user] RE: Clarification about the User Defined Prmary key class

2001-07-13 Thread Sanjeev.Srinivas

My question is :
can we use the user defined primary class for ex. UserPK instead of
java.lang.Integer, if yes can someone tell weather the ejb-jar.xml file
should have entries for both the primark-key-class and primary-key-field ?

thanks in advance.

> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of
> [EMAIL PROTECTED]
> Sent: Friday, July 13, 2001 10:29 AM
> To: [EMAIL PROTECTED]
> Subject: JBoss-user digest, Vol 1 # - 12 msgs
>
>
> Send JBoss-user mailing list submissions to
>   [EMAIL PROTECTED]
>
> To subscribe or unsubscribe via the World Wide Web, visit
>   http://lists.sourceforge.net/lists/listinfo/jboss-user
> or, via email, send a message with subject or body 'help' to
>   [EMAIL PROTECTED]
>
> You can reach the person managing the list at
>   [EMAIL PROTECTED]
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of JBoss-user digest..."
>
>
> Today's Topics:
>
>1. NOT NULL constraint (Ludovic Orban)
>2. BUG: custom SecurityManager (Oleg Orlov)
>3. Re: 2 WEEKS EVICTION NOTICE (Peter Fagerlund)
>4. SV: [JBoss-user] NOT NULL constraint (Lennart Petersson)
>5. Re: NOT NULL constraint (Burkhard Vogel)
>6. Re: NOT NULL constraint (Tristan Donaldson)
>7. Re: SV: [JBoss-user] NOT NULL constraint (Ludovic Orban)
>8. UserTransaction in servlets using EJB (Tomasz Skutnik)
>9. Re: isModified Method ([EMAIL PROTECTED])
>   10. Re: UserTransaction in servlets using EJB (Tomasz Skutnik)
>   11. O/R mapping for an Array (Anthony IVETAC)
>   12. Re: Problems accessing an ejb from a servlet. (Allan Kamau)
>
> --__--__--
>
> Message: 1
> Date: Fri, 13 Jul 2001 14:33:01 +0200
> From: Ludovic Orban <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: [JBoss-user] NOT NULL constraint
> Reply-To: [EMAIL PROTECTED]
>
> Hi,
>
> If I've got a table like this one, in an Oracle repository:
>
>
> create table DEVICES (
>   ID  NUMBER(32) not null,
>   NAMEVARCHAR2(255) not null
> );
> alter table DEVICES add constraint DEVICES_PK primary key(ID);
>
>
> Then I created an EJB that maps this table, but I'm hitting this
> problem: because of the NOT NULL constraint on the
> NAME field, when I instanciate the bean I get this error:
>
> javax.ejb.CreateException: Could not create
> entity:java.sql.SQLException: ORA-01400: cannot insert NULL into
> ("LORBAN"."DEVICES"."NAME")
>
> which sounds logical since when the EJB is created only the
> primary key is inserted in the database. But the real
> question is: how to do to properly fix this issue ?
>
>
> I know that I could easily workaround this problem either by
> removing the NOT NULL constraint of the NAME field or by
> including the two fields in the primary key. What I need to know
> is if there is a way to handle this condition or is
> that impossible ?
>
> thanks,
> Ludovic
>
>
>
> --__--__--
>
> Message: 2
> From: "Oleg Orlov" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Date: Fri, 13 Jul 2001 16:43:46 +0400
> Subject: [JBoss-user] BUG: custom SecurityManager
> Reply-To: [EMAIL PROTECTED]
>
> Hello!
> Does anybody tried to set custom security manager?
> I use JBoss-2.2.2_Tomcat-3.2.2 and edit jboss.jcml :
>
>name="Security:name=JaasSecurityManager">
> 
>  name="SecurityManagerClassName">my.CustomSecurityManager
>   
>
> But after deployment security manager remains
> org.jboss.security.plugins.JaasSecurityManager.
>
> After some investigations i catch the source of the problem.
> Constructor JaasSecurityManagerService() sets
> org.jboss.security.plugins.JaasSecurityManager as default.
> Next time, while reading jboss.jcml, container sets
> my.CustomSecurityManager
> and register self as
> the security manager factory.
> While deployng, container make lookup(securityManagerJNDIName). Lookup
> instantiates security
> manager factory, ie JaasSecurityManagerService, and in the
> constructor sets
> default security
> manager again!
> This prevent me from replacing the security manager untill replacing
> JaasSecurityManagerService or correcting
> it code.
>
> Thanks, Oleg.
>
>
>
>
> --__--__--
>
> Message: 3
> Date: Fri, 13 Jul 2001 15:02:41 +0200
> Subject: Re: [JBoss-user] 2 WEEKS EVICTION NOTICE
> From: Peter Fagerlund <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Reply-To: [EMAIL PROTECTED]
>
> And for those who would like to read the forum on mobile devices
> supporting
> WAP can call me ... ;-)
>
> /peter
>
>
>
> --__--__--
>
> Message: 4
> From: "Lennart Petersson" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Subject: SV: [JBoss-user] NOT NULL constraint
> Date: Fri, 13 Jul 2001 15:09:55 +0200
> Reply-To: [EMAIL PROTECTED]
>
> nah, that has to be some other problem. i've lot of CMP entity beans =
> with NOT NULL constraints in db on non pk fields - no problems. Please =
> turn on sql debugging in jboss and see what are happening.
> /L
>
> - Original Message -=20