Author: dblevins
Date: Sun Sep 16 17:17:39 2012
New Revision: 1385321

URL: http://svn.apache.org/viewvc?rev=1385321&view=rev
Log:
note on deleting the tomee webapp

Added:
    openejb/site/trunk/content/tomee-webapp.mdtext   (with props)

Added: openejb/site/trunk/content/tomee-webapp.mdtext
URL: 
http://svn.apache.org/viewvc/openejb/site/trunk/content/tomee-webapp.mdtext?rev=1385321&view=auto
==============================================================================
--- openejb/site/trunk/content/tomee-webapp.mdtext (added)
+++ openejb/site/trunk/content/tomee-webapp.mdtext Sun Sep 16 17:17:39 2012
@@ -0,0 +1,46 @@
+Title: About the 'tomee' webapp
+Notice:    Licensed to the Apache Software Foundation (ASF) under one
+           or more contributor license agreements.  See the NOTICE file
+           distributed with this work for additional information
+           regarding copyright ownership.  The ASF licenses this file
+           to you under the Apache License, Version 2.0 (the
+           "License"); you may not use this file except in compliance
+           with the License.  You may obtain a copy of the License at
+           .
+             http://www.apache.org/licenses/LICENSE-2.0
+           .
+           Unless required by applicable law or agreed to in writing,
+           software distributed under the License is distributed on an
+           "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+           KIND, either express or implied.  See the License for the
+           specific language governing permissions and limitations
+           under the License.
+
+## Can I delete the 'tomee' webapp?
+
+The only loss of functionality would be the ability to remotely execute EJBs 
over HTTP.  However this can easily be added to a different webapp like so:
+
+    <servlet>
+      <servlet-name>ServerServlet</servlet-name>
+      
<servlet-class>org.apache.openejb.server.httpd.ServerServlet</servlet-class>
+    </servlet>
+     
+    <servlet-mapping>
+      <servlet-name>ServerServlet</servlet-name>
+      <url-pattern>/myejbs/*</url-pattern>
+    </servlet-mapping>
+
+  
+Then you can create an `InitialContext` that points to that webapp like so:
+
+    Properties p = new Properties();
+    p.put("java.naming.factory.initial", 
"org.apache.openejb.client.RemoteInitialContextFactory");
+    p.put("java.naming.provider.url", "http://127.0.0.1:8080/mywebapp/myejbs";);
+    // user and pass optional
+    p.put("java.naming.security.principal", "myuser");
+    p.put("java.naming.security.credentials", "mypass");
+    
+    InitialContext ctx = new InitialContext(p);
+    
+    MyBean myBean = (MyBean) ctx.lookup("MyBeanRemote");
+

Propchange: openejb/site/trunk/content/tomee-webapp.mdtext
------------------------------------------------------------------------------
    svn:eol-style = native


Reply via email to