<?xml version="1.0"?>
<!DOCTYPE application-client PUBLIC "-//Sun Microsystems,Inc.//DTD J2EE Application Client 1.2//EN" "http://java.sun.com/j2ee/dtds/application-client_1_2.dtd">
<application-client>
<display-name>Foo</display-name>
<ejb-ref>
<ejb-ref-name>com.foo.ejb.FooHome</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<home>com.foo.ejb.FooHome</home>
<remote>com.foo.ejb.Foo</remote>
</ejb-ref>
</application-client>
After I defined those files, I created a jython script "ejbtest.jy"
from java.util import Hashtable
from javax.naming import *
from javax.rmi import *
from com.acc.treasury.fundraising.drawdown.ejb import *
class FooEjb:
def __init__(self):
print "Initializing Context.."
self.context=InitialContext()
print "Getting EJB: com.acc.foo.ejb.FooHome.."
self.ejb= self.context.lookup("com.acc.foo.ejb.FooHome").create()
def print(self):
print self.ejb
FooObject=FooEjb()
FooObject.print()
It's that simple..yea! I had tested it in OC4j but for JBoss, WebLogic or WebSphere might seemed not much different .
12/26/2004 - 01/02/2005 01/02/2005 - 01/09/2005 02/20/2005 - 02/27/2005 08/28/2005 - 09/04/2005 09/04/2005 - 09/11/2005 09/25/2005 - 10/02/2005 10/02/2005 - 10/09/2005 10/23/2005 - 10/30/2005 11/06/2005 - 11/13/2005 11/13/2005 - 11/20/2005 12/04/2005 - 12/11/2005 12/11/2005 - 12/18/2005 12/18/2005 - 12/25/2005 12/25/2005 - 01/01/2006 01/01/2006 - 01/08/2006 01/08/2006 - 01/15/2006 01/22/2006 - 01/29/2006 01/29/2006 - 02/05/2006 02/05/2006 - 02/12/2006 02/26/2006 - 03/05/2006 03/05/2006 - 03/12/2006 07/09/2006 - 07/16/2006 09/23/2007 - 09/30/2007