[JBoss-user] CMP Deployment with create-table/

2002-07-28 Thread Brian Topping

Hi,

Is there any way to trigger a user script after create-table/ is complete?
I'm thinking this would be good for early testing purposes, I'd like to add a
superuser entry to the generated users tables after they are deployed.  This
would be ideal for Ant to do, but Ant can't tell when the deployer is done
with the tables, so it doesn't work.  

More from a process and testing standpoint, I want to be able to do a
complete automated build and deployment; without the ability to add a
superuser as a part of deployment I either have to hand-edit the user in or
have a special case routine in my business methods that allows the user to be
created before there are any users that are added to the database.  Allowing
me to add a superuser as a part of the deployment mirrors a typical OS
installation process.

thanks in advance,

-b

_ 
Freedom is tyranny as a happy lamb.
Terrorism is freedom as a hungry wolf.
 - Gene Kan



---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



RE: [JBoss-user] Deleting all records

2002-07-28 Thread Sacha Labourey

No, but you can clear the cache with an appropriate call to the container
MBean.

 -Message d'origine-
 De : [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED]]De la part de Dain
 Sundstrom
 Envoye : dimanche, 28 juillet 2002 02:02
 A : [EMAIL PROTECTED]
 Objet : Re: [JBoss-user] Deleting all records


 I don't think you can change the commit option of a running entity.

 -dain

 Boris Tamarkin wrote:
  In this case can we change commit option on the fly in run time.
  I.E. before command delete all make commit option B, at the end
  change back to A?
  Otherwise it makes option A not usable in production environment
 
  Boris
 
 
  Date: Wed, 24 Jul 2002 12:25:38 -0500
  From: Dan Christopherson [EMAIL PROTECTED]
  To:  [EMAIL PROTECTED]
  Subject: Re: [JBoss-user] Deleting all records
  Reply-To: [EMAIL PROTECTED]
 
  You'll have ghosts in the cache.
 
  Boris Tamarkin wrote:
Dain,
Could You please explain why You don't recommend to delete all with
option A?
   
Thanks,
 Boris
   
Date: Tue, 23 Jul 2002 23:06:08 -0500
From: Dain Sundstrom [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: Re: [JBoss-user] Deleting all records
Reply-To: [EMAIL PROTECTED]
   
I don't know of any other way then executing DELETE FROM BLAH.  I
don't recomend you try this in commit option A.
   
-dain
   
Dimitri PISSARENKO wrote:
  Hello!
 
  How can one delete all records of a certain table (when using CMP
  beans) ?
 
  Is calling findAll and then remove for each record the only
  choice? Isn't there a more elegant solution?
 
  Thanks
 
  Dimitri Pissarenko
 
   
 


 --
 
 Dain Sundstrom
 Chief Architect JBossCMP
 JBoss Group, LLC
 




 ---
 This sf.net email is sponsored by:ThinkGeek
 Welcome to geek heaven.
 http://thinkgeek.com/sf
 ___
 JBoss-user mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/jboss-user




---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



Re: [JBoss-user] FireBird JBoss

2002-07-28 Thread Stephen Davidson

Hi David.

Would that be in the MCF or in the FirebirdManager, or both?

-Steve

David Jencks wrote:

 When will I learn to be neater and not leave junk lying around???
 
 I didn't implement the server and port attributes in the mcf.  You have to
 specify them so:
 
 server/port:/path/to/mydb.gdb
 
 which is undeniably unusual nonstandard and confusing syntax, but matches
 the native C connection string for firebird.
 
 david jencks
 
 On 2002.07.27 15:36:52 -0400 Stephen Davidson wrote:
 
Greetings.

I am trying to set up a Firebird database.  It is not on the same box as
I am developing on.

When I try to uncomment the Server Block in the firebird-service.xml
file, I get the attached error.

Please help?

-Steve


[snip to save bandwidth]
-- 
Java Developer
Looking for a new job opportunity
214-724-7741



---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



Re: [JBoss-user] FireBird JBoss

2002-07-28 Thread David Jencks

On 2002.07.28 09:03:59 -0400 Stephen Davidson wrote:
 Hi David.
 
 Would that be in the MCF or in the FirebirdManager, or both?

More inconsistent programming!!

MCF needs host/3050:/wherever.gdb

FirebirdManager has properties for (badly named) URL (host) and port , and
the FileName is just the file name.

david
 
 -Steve
 
 David Jencks wrote:
 
  When will I learn to be neater and not leave junk lying around???
  
  I didn't implement the server and port attributes in the mcf.  You have
 to
  specify them so:
  
  server/port:/path/to/mydb.gdb
  
  which is undeniably unusual nonstandard and confusing syntax, but
 matches
  the native C connection string for firebird.
  
  david jencks
  
  On 2002.07.27 15:36:52 -0400 Stephen Davidson wrote:
  
 Greetings.
 
 I am trying to set up a Firebird database.  It is not on the same box
 as
 I am developing on.
 
 When I try to uncomment the Server Block in the firebird-service.xml
 file, I get the attached error.
 
 Please help?
 
 -Steve
 
 
 [snip to save bandwidth]
 -- 
 Java Developer
 Looking for a new job opportunity
 214-724-7741
 
 
 
 ---
 This sf.net email is sponsored by:ThinkGeek
 Welcome to geek heaven.
 http://thinkgeek.com/sf
 ___
 JBoss-user mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/jboss-user
 
 


---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



Re: [JBoss-user] Howto handle Alternate keys in EJB 2.0 CMP

2002-07-28 Thread Asif Ahmed

Dain:
First of all thanks for your interest, its an Honor.
Well, Alternate key is like a primary key, its just another key. For example if we use a surrogate key (generated artificial keys) for people/person then Social security number would become an alternate key or if we have Userid as unique key it would also be an Alternate key. Anything that is candidate for a primary but is not chosen to be PK becomes an alternate key and thus can also be NULL/changeable over time but UNIQUE. 
The situation I have is of a Unique Key. When I call the set method on the CMP field with a non-unique I get javax.ejb.EJBException: Store failed; CausedByException is:
Invalid argument value: Duplicate entry 'test' for key 2, which actually is thrown to the container not to the caller on the method so it can not be trapped and processed or even interpreted.
What I have done is made custom method over the CMP filed so I can check if the new value is unique or not before actually calling the CMP set method. It does work but it has to make two trips to the DB when it could be done with one the other major problem is that while I check and set the filed/column some other instance can take/use the checked unique value as there is no lock on the table and the caller would not know as the javax.ejb.EJBException is not thrown to the caller but to the container. DB’s typically use indexes and lock the full index as to prevent this. 
I think we need to some how or the other have to indicate to the persistent manager in the jbosscmp-jdbc.xml the fileds which are unique similar to not-null and also tell the container in the mapping that which actual SQLExceptions are thrown to be mapped to these conditions so the solution is independent of a DB provider and then proper Exception should be throws when set methods are called on these fields.
Let me know of your thoughts on this and also how I can help in implementing this. 
-Asif Rafiq Ahmed.

Example code:
public void setFullURL(String newFullURL) throws UniqueKeyException {
if(newFullURL!=null  !newFullURL.equals("")){
try{
((LocalOrganizationHome)this.entityContext.getEJBLocalHome()).findByFullURLIgnoreSelf(newFullURL,(LocalOrganization)this.entityContext.getEJBLocalObject());
throw new UniqueKeyException("URL already used");
}
catch(FinderException fe){
this.setFullURLCmp(newFullURL);
}
}
}



.









*** 

Asif R. Ahmed. 





2954 WEALD WAY# 2721

SACRAMENTO, CA 95833

Day Phone: (916) 730-6831 



Even Phone:(916) 924-8786 



*** 





From: Dain Sundstrom <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED] 
To: [EMAIL PROTECTED] 
Subject: Re: [JBoss-user] Howto handle Alternate keys in EJB 2.0 CMP 
Date: Sat, 27 Jul 2002 18:59:29 -0500 

What is an Alternate key? 

-dain 

Asif R. Ahmed wrote: 
All: 
 Has anybody an Idea how to handle the Alternate keys elegantly as 
the Primary Keys are handles in ejb2.0. 
 What is an elegant solution to handle alternate keys in ejb2.0 
using cmp. When I set a CMP field which represents an alternate key 
to a already existing value I get javax.ejb.EJBException which has 
source exception of java.sql.SQLException which can be any db error. 
 I would appreciate an Idea or even an Hint. 
 Thanks in Advance, 
 -Asif Rafiq Ahmed 
 




--- 
This sf.net email is sponsored by:ThinkGeek 
Welcome to geek heaven. 
http://thinkgeek.com/sf 
___ 
JBoss-user mailing list 
[EMAIL PROTECTED] 
https://lists.sourceforge.net/lists/listinfo/jboss-user 
Chat with friends online, try MSN Messenger: Click Here


---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] JBoss - Forte EE plugin

2002-07-28 Thread Binil Thomas

Hi Toby,
vendor
You can try NbJBoss plugin from SIPTech. See http://www.siptech.com/. It
integrates with NetBeans IDE.
/vendor
HTH,
Binil

On Fri, 26 Jul 2002, Toby J Anderson wrote:

 Does anyone know of a good Forte Enterprise Edition plugin that will
 allow you to edit the jboss.xml file in the ejb modules and applications
 that are created by Forte?

 I've been using the plugin from LogicFlow, and it's pretty good; but, it
 doesn't allow to edit the jboss.xml and jaws.xml files (unless you use
 LogicFlow's templates). I need a plugin that will allow editing of Forte
 EE's templates. Can anyone help me out on this?

 Thanks,
 Toby



 ---
 This sf.net email is sponsored by:ThinkGeek
 Welcome to geek heaven.
 http://thinkgeek.com/sf
 ___
 JBoss-user mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/jboss-user


-- 
And did they get you to trade your heroes for ghosts?  Hot ashes for
trees? Hot air for a cool breeze?  Cold comfort for change? And did you
exchange a walk on part in the war for a lead role in a cage? - PF



---
This sf.net email is sponsored by: Dice - The leading online job board
for high-tech professionals. Search and apply for tech jobs today!
http://seeker.dice.com/seeker.epl?rel_code=31
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user