people, i need help to install XA in my datasources, using Oracle. can anyone help me? Does anyone have a datasource example? Do I need change some parameter on oracle instance? I'm using jboss 3.0.8.
thanks, mateus -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of monocongo Sent: segunda-feira, 14 de junho de 2004 15:34 To: [EMAIL PROTECTED] Subject: [JBoss-user] [Management, JMX/JBoss] - Re: How to bind an MBean to JNDI, then access from within ap In my MBean class, which extends ServiceMBeanSupport, I do the following in the startService() method: | protected void startService () | { | // create a HashTable of environment properties for the InitialContext | Hashtable environment = new Hashtable(); | environment.put(Context.INITIAL_CONTEXT_FACTORY, | "org.jnp.interfaces.NamingContextFactory"); | environment.put(Context.PROVIDER_URL, "localhost:1099"); | environment.put("java.naming.factory.url.pkgs", | "org.jboss.naming:org.jnp.interfaces"); | | try | { | // bind to JNDI | Context context = new InitialContext(environment); | Name fullName = context.getNameParser("").parse(m_jndiName); | NonSerializableFactory.rebind(fullName, this, true); | } | catch (NamingException e) | { | System.out.println("Unable to bind UserManager MBean"); | } | } | I have a variable m_jndiName which I set before this method is called (right now it is hard-coded, but later I will hopefully be able to pull it from a configuration file of some sort. In my EJB and servlet code I just do a lookup and cast of the object at that name: | // lookup and cast the user manager MBean | UserManager userManager; | try | { | // get the InitialContext and lookup the home interface | Context context = new InitialContext(environment); | userManager = (UserManager) context.lookup("mbean/UserManager"); | } | catch (NameNotFoundException e) | { | // throw an UnavailableException so this servlet can never be called | throw new UnavailableException("Lookup of UserManager MBean failed: " + e); | } | catch (NamingException e) | { | // log the error | //m_logger.error("Lookup of the IOIManagerHome interface failed", e); | | // throw an UnavailableException so this servlet can never be called | throw new UnavailableException("Lookup of UserManager MBean failed: " + e); | } | I hope this is helpful for you. -James View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3838688#3838688 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3838688 ------------------------------------------------------- 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 ------------------------------------------------------- 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