[jboss-cvs] JBossAS SVN: r84777 - projects/docs/enterprise/4.3.3/Server_Configuration_Guide/pt-BR.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Thu Feb 26 00:10:21 EST 2009
Author: ldelima at redhat.com
Date: 2009-02-26 00:10:20 -0500 (Thu, 26 Feb 2009)
New Revision: 84777
Modified:
projects/docs/enterprise/4.3.3/Server_Configuration_Guide/pt-BR/J2EE_Reference_Introduction.po
Log:
translation ongoing
Modified: projects/docs/enterprise/4.3.3/Server_Configuration_Guide/pt-BR/J2EE_Reference_Introduction.po
===================================================================
--- projects/docs/enterprise/4.3.3/Server_Configuration_Guide/pt-BR/J2EE_Reference_Introduction.po 2009-02-26 05:09:24 UTC (rev 84776)
+++ projects/docs/enterprise/4.3.3/Server_Configuration_Guide/pt-BR/J2EE_Reference_Introduction.po 2009-02-26 05:10:20 UTC (rev 84777)
@@ -9,7 +9,7 @@
"Project-Id-Version: J2EE_Reference_Introduction\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2009-01-20 02:37+0000\n"
-"PO-Revision-Date: 2009-02-26 15:09+1000\n"
+"PO-Revision-Date: 2009-02-26 15:10+1000\n"
"Last-Translator: Leticia de Lima <ldelima at redhat.com>\n"
"Language-Team: Brazilian Portuguese <en at li.org>\n"
"MIME-Version: 1.0\n"
@@ -6436,6 +6436,18 @@
" public void stop() throws Exception;\n"
"}"
msgstr ""
+"package org.jboss.book.jmx.ex1;\n"
+" \n"
+"// The JNDIMap MBean interface\n"
+"import javax.naming.NamingException;\n"
+" \n"
+"public interface JNDIMapMBean\n"
+"{\n"
+" public String getJndiName();\n"
+" public void setJndiName(String jndiName) throws NamingException;\n"
+" public void start() throws Exception;\n"
+" public void stop() throws Exception;\n"
+"}"
#. Tag: programlisting
#: J2EE_Reference_Introduction.xml:1733
@@ -6509,6 +6521,73 @@
" }\n"
"}"
msgstr ""
+"package org.jboss.book.jmx.ex1;\n"
+"\n"
+"// The JNDIMap MBean implementation\n"
+"import java.util.HashMap;\n"
+"import javax.naming.InitialContext;\n"
+"import javax.naming.Name;\n"
+"import javax.naming.NamingException;\n"
+"import org.jboss.naming.NonSerializableFactory;\n"
+"\n"
+"public class JNDIMap implements JNDIMapMBean\n"
+"{\n"
+" private String jndiName;\n"
+" private HashMap contextMap = new HashMap();\n"
+" private boolean started;\n"
+" \n"
+" public String getJndiName()\n"
+" {\n"
+" return jndiName;\n"
+" }\n"
+" public void setJndiName(String jndiName) throws NamingException\n"
+" {\n"
+" String oldName = this.jndiName;\n"
+" this.jndiName = jndiName;\n"
+" if (started) {\n"
+" unbind(oldName);\n"
+" try {\n"
+" rebind();\n"
+" } catch(Exception e) {\n"
+" NamingException ne = new NamingException(\"Failedto update "
+"jndiName\");\n"
+" ne.setRootCause(e);\n"
+" throw ne;\n"
+" }\n"
+" }\n"
+" }\n"
+"\n"
+" public void start() throws Exception\n"
+" {\n"
+" started = true;\n"
+" rebind();\n"
+" }\n"
+" \n"
+" public void stop()\n"
+" {\n"
+" started = false;\n"
+" unbind(jndiName);\n"
+" }\n"
+" \n"
+" private void rebind() throws NamingException\n"
+" {\n"
+" InitialContext rootCtx = new InitialContext();\n"
+" Name fullName = rootCtx.getNameParser(\"\").parse(jndiName);\n"
+" System.out.println(\"fullName=\"+fullName);\n"
+" NonSerializableFactory.rebind(fullName, contextMap, true);\n"
+" }\n"
+"\n"
+" private void unbind(String jndiName)\n"
+" {\n"
+" try {\n"
+" InitialContext rootCtx = new InitialContext();\n"
+" rootCtx.unbind(jndiName);\n"
+" NonSerializableFactory.unbind(jndiName);\n"
+" } catch(NamingException e) {\n"
+" e.printStackTrace();\n"
+" }\n"
+" }\n"
+"}"
#. Tag: para
#: J2EE_Reference_Introduction.xml:1734
More information about the jboss-cvs-commits
mailing list