[JBoss-user] Calling UUIDKeyGeneratorFactoryService from EJB

2003-11-18 Thread Ricardo Argüello
How can I invoke an MBean from a Session or Entity Bean?

I want to call the UUIDKeyGeneratorFactoryService to generate primary 
keys for Entity Media Beans.

Thanks,

Ricardo Argüello



---
This SF. Net email is sponsored by: GoToMyPC
GoToMyPC is the fast, easy and secure way to access your computer from
any Web browser or wireless device. Click here to Try it Free!
https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/g22lp.tmpl
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] Calling UUIDKeyGeneratorFactoryService from EJB

2003-11-18 Thread Alexey Loubyansky
This is from JDBCKeyGeneratorCreateCommand:

  try {
 KeyGeneratorFactory keyGeneratorFactory = 
(KeyGeneratorFactory) new InitialContext().lookup(factoryName);
 keyGenerator = keyGeneratorFactory.getKeyGenerator();
  } catch (NamingException e) {
 throw new DeploymentException(Error: can't find key generator 
factory:  + factoryName, e);
  } catch (Exception e) {
 throw new DeploymentException(Error: can't create key 
generator instance; key generator factory:  + factoryName, e);
  }

Ricardo Argüello wrote:

How can I invoke an MBean from a Session or Entity Bean?

I want to call the UUIDKeyGeneratorFactoryService to generate primary 
keys for Entity Media Beans.

Thanks,

Ricardo Argüello



---
This SF. Net email is sponsored by: GoToMyPC
GoToMyPC is the fast, easy and secure way to access your computer from
any Web browser or wireless device. Click here to Try it Free!
https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=/g22lp.tmpl
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user





---
This SF. Net email is sponsored by: GoToMyPC
GoToMyPC is the fast, easy and secure way to access your computer from
any Web browser or wireless device. Click here to Try it Free!
https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/g22lp.tmpl
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


RE: [JBoss-user] Calling UUIDKeyGeneratorFactoryService from EJB

2003-11-18 Thread Barlow, Dustin
This is how I've called it from an EJB.

import org.jboss.ejb.plugins.keygenerator.KeyGenerator;
import org.jboss.ejb.plugins.keygenerator.KeyGeneratorFactory;

// get generator factory from JNDI
KeyGeneratorFactory keyGeneratorFactory =
(KeyGeneratorFactory) ctx.lookup(UUIDKeyGeneratorFactory);

KeyGenerator idGenerator = keyGeneratorFactory.getKeyGenerator();

String key (String) idGenerator.generateKey();


 -Original Message-
 From: Ricardo Argüello [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, November 18, 2003 10:18 AM
 To: [EMAIL PROTECTED]
 Subject: [JBoss-user] Calling UUIDKeyGeneratorFactoryService from EJB
 
 
 How can I invoke an MBean from a Session or Entity Bean?
 
 I want to call the UUIDKeyGeneratorFactoryService to generate primary 
 keys for Entity Media Beans.
 
 Thanks,
 
 Ricardo Argüello
 
 
 
 
 ---
 This SF. Net email is sponsored by: GoToMyPC
 GoToMyPC is the fast, easy and secure way to access your computer from
 any Web browser or wireless device. Click here to Try it Free!
 https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/
 g22lp.tmpl
 ___
 JBoss-user mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/jboss-user
 


---
This SF. Net email is sponsored by: GoToMyPC
GoToMyPC is the fast, easy and secure way to access your computer from
any Web browser or wireless device. Click here to Try it Free!
https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/g22lp.tmpl
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] Calling UUIDKeyGeneratorFactoryService from EJB

2003-11-18 Thread Ricardo Argüello
Thanks!

Ricardo Argüello

Alexey Loubyansky wrote:
This is from JDBCKeyGeneratorCreateCommand:

  try {
 KeyGeneratorFactory keyGeneratorFactory = (KeyGeneratorFactory) 
new InitialContext().lookup(factoryName);
 keyGenerator = keyGeneratorFactory.getKeyGenerator();
  } catch (NamingException e) {
 throw new DeploymentException(Error: can't find key generator 
factory:  + factoryName, e);
  } catch (Exception e) {
 throw new DeploymentException(Error: can't create key 
generator instance; key generator factory:  + factoryName, e);
  }

Ricardo Argüello wrote:

How can I invoke an MBean from a Session or Entity Bean?

I want to call the UUIDKeyGeneratorFactoryService to generate primary 
keys for Entity Media Beans.

Thanks,

Ricardo Argüello




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