You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by an...@apache.org on 2014/04/30 12:28:13 UTC

svn commit: r1591234 - in /tomee/site/trunk/content: documentation.mdtext weblogic.mdtext

Author: andygumbrecht
Date: Wed Apr 30 10:28:13 2014
New Revision: 1591234

URL: http://svn.apache.org/r1591234
Log:
WebLogic tip

Added:
    tomee/site/trunk/content/weblogic.mdtext
Modified:
    tomee/site/trunk/content/documentation.mdtext

Modified: tomee/site/trunk/content/documentation.mdtext
URL: http://svn.apache.org/viewvc/tomee/site/trunk/content/documentation.mdtext?rev=1591234&r1=1591233&r2=1591234&view=diff
==============================================================================
--- tomee/site/trunk/content/documentation.mdtext (original)
+++ tomee/site/trunk/content/documentation.mdtext Wed Apr 30 10:28:13 2014
@@ -21,7 +21,7 @@ See also the [examples page](examples-tr
 }
 
 {span-one-third
-###  Configuration
+### Configuration
 - [System Properties](system-properties.html)
 - [Deployments](deployments.html)
 - [Containers and Resources](containers-and-resources.html)
@@ -37,7 +37,7 @@ See also the [examples page](examples-tr
 }
 
 {span-one-third
-###  Testing Techniques
+### Testing Techniques
 - [Application discovery via the classpath](application-discovery-via-the-classpath.html)
 - [Embedded Configuration](embedded-configuration.html)
 - [Configuring DataSources in Tests](configuring-datasources-in-tests.html)
@@ -82,7 +82,7 @@ See also the [examples page](examples-tr
 }
 
 {span-one-third
-###  Spring
+### Spring
 - [Spring and OpenEJB 3.0](spring-and-openejb-3.0.html)
 - [Spring and OpenEJB 3.1 and later](spring.html)
 - [Spring, EJB and JPA example](spring-ejb-and-jpa.html)
@@ -108,4 +108,9 @@ See also the [examples page](examples-tr
 - [TomEE simple webapp archetype documentation](tomee-mp-getting-started.mdtext.html)
 }
 
+{span-one-third
+### Tips and Tricks
+- [WebLogic Lookup](weblogic.html)
+}
+
 }
\ No newline at end of file

Added: tomee/site/trunk/content/weblogic.mdtext
URL: http://svn.apache.org/viewvc/tomee/site/trunk/content/weblogic.mdtext?rev=1591234&view=auto
==============================================================================
--- tomee/site/trunk/content/weblogic.mdtext (added)
+++ tomee/site/trunk/content/weblogic.mdtext Wed Apr 30 10:28:13 2014
@@ -0,0 +1,13 @@
+Title: WebLogic Lookup
+
+How to lookup WebLogic Objects from within a TomEE context:
+
+	Hashtable<String, String> props = new Hashtable<String, String>();
+	props.put(javax.naming.Context.INITIAL_CONTEXT_FACTORY, **"weblogic.jndi.WLInitialContextFactory"**);
+	props.put(javax.naming.Context.URL_PKG_PREFIXES, **"weblogic.jndi.factories"**); 
+	props.put("java.naming.provider.url", "t3://your.host.name:7023");
+	Context ctx = new InitialContext(props);
+
+	IService s = (IService) ctx.lookup("java:global.com.test.ServiceImpl!com.test.IService");
+	
+Obviously you will need to change the actual lookup to your specific object, but you get the idea.	
\ No newline at end of file