[prev in list] [next in list] [prev in thread] [next in thread]
List: jboss-cvs-commits
Subject: [jboss-cvs] jboss-ejb3/docs/tutorial/ejb21_client_adaptors/src/org/jboss/tutorial/ejb21_client_adapt
From: Bill DeCoste <bdecoste () jboss ! com>
Date: 2005-09-30 17:27:01
Message-ID: E1ELOez-0000HI-SR () committer01 ! frg ! pub ! inap ! atl ! jboss ! com
[Download RAW message or body]
User: bdecoste
Date: 05/09/30 13:27:01
Added: docs/tutorial/ejb21_client_adaptors/src/org/jboss/tutorial/ejb21_client_adaptors/client \
Client.java
Log:
tutorial for ejb21 client adaptors (i.e. @RemoteHome, @LocalHome, @Init)
Revision Changes Path
1.1 date: 2005/09/30 17:27:01; author: bdecoste; state: \
Exp;jboss-ejb3/docs/tutorial/ejb21_client_adaptors/src/org/jboss/tutorial/ejb21_client_adaptors/client/Client.java
Index: Client.java
===================================================================
/*
* JBoss, the OpenSource J2EE webOS
*
* Distributable under LGPL license.
* See terms of license at gnu.org.
*/
package org.jboss.tutorial.ejb21_client_adaptors.client;
import org.jboss.tutorial.ejb21_client_adaptors.bean.Session1RemoteHome;
import org.jboss.tutorial.ejb21_client_adaptors.bean.Session1Remote;
import javax.naming.InitialContext;
public class Client
{
public static void main(String[] args) throws Exception
{
accessHomes();
accessDeploymentDescriptorHomes();
}
public static void accessHomes() throws Exception
{
InitialContext jndiContext = new InitialContext();
Session1RemoteHome home = \
(Session1RemoteHome)jndiContext.lookup("Session1Remote"); Session1Remote session1 = \
home.create(); String initValue1 = session1.getInitValue();
System.out.println("Session1 init value is " + initValue1);
String initValue2 = session1.getLocalSession2InitValue();
System.out.println("Session2 init value is " + initValue2);
}
public static void accessDeploymentDescriptorHomes() throws Exception
{
InitialContext jndiContext = new InitialContext();
Session1RemoteHome home = \
(Session1RemoteHome)jndiContext.lookup("DeploymentDescriptorSession1Remote"); \
Session1Remote session1 = home.create(); String initValue1 = \
session1.getInitValue();
System.out.println("DeploymentDescriptor Session1 init value is " + \
initValue1);
String initValue2 = session1.getLocalSession2InitValue();
System.out.println("DeploymentDescriptor Session2 init value is " + \
initValue2); }
}
-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
jboss-cvs-commits mailing list
jboss-cvs-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-cvs-commits
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic