[jboss-cvs] JBossAS SVN: r65695 - in branches/Branch_4_2/ejb3/src/test/org/jboss/ejb3/test/webservices: unit and 1 other directory.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Fri Sep 28 14:36:26 EDT 2007
Author: wolfc
Date: 2007-09-28 14:36:26 -0400 (Fri, 28 Sep 2007)
New Revision: 65695
Added:
branches/Branch_4_2/ejb3/src/test/org/jboss/ejb3/test/webservices/jsr181/NarrowableEJB3RemoteHomeInterface.java
Modified:
branches/Branch_4_2/ejb3/src/test/org/jboss/ejb3/test/webservices/jsr181/NarrowableEJB3Bean.java
branches/Branch_4_2/ejb3/src/test/org/jboss/ejb3/test/webservices/unit/JSR181TestCase.java
Log:
Fixed class cast exception
Modified: branches/Branch_4_2/ejb3/src/test/org/jboss/ejb3/test/webservices/jsr181/NarrowableEJB3Bean.java
===================================================================
--- branches/Branch_4_2/ejb3/src/test/org/jboss/ejb3/test/webservices/jsr181/NarrowableEJB3Bean.java 2007-09-28 17:20:09 UTC (rev 65694)
+++ branches/Branch_4_2/ejb3/src/test/org/jboss/ejb3/test/webservices/jsr181/NarrowableEJB3Bean.java 2007-09-28 18:36:26 UTC (rev 65695)
@@ -21,9 +21,6 @@
*/
package org.jboss.ejb3.test.webservices.jsr181;
-import org.jboss.annotation.ejb.RemoteBinding;
-import org.jboss.ws.annotation.WebContext;
-
import java.rmi.RemoteException;
import javax.ejb.Remote;
@@ -33,7 +30,7 @@
import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;
-import org.jboss.ejb3.iiop.IORFactory;
+import org.jboss.ws.annotation.WebContext;
/**
* @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
@@ -43,8 +40,7 @@
@WebContext(contextRoot="jsr181", urlPattern="/Narrowable*")
@SOAPBinding(style = SOAPBinding.Style.RPC)
@Remote(NarrowableEJB3RemoteInterface.class)
- at RemoteHome(RemoteHomeInterface.class)
- at RemoteBinding(factory=IORFactory.class)
+ at RemoteHome(NarrowableEJB3RemoteHomeInterface.class)
@Stateless
public class NarrowableEJB3Bean
{
Added: branches/Branch_4_2/ejb3/src/test/org/jboss/ejb3/test/webservices/jsr181/NarrowableEJB3RemoteHomeInterface.java
===================================================================
--- branches/Branch_4_2/ejb3/src/test/org/jboss/ejb3/test/webservices/jsr181/NarrowableEJB3RemoteHomeInterface.java (rev 0)
+++ branches/Branch_4_2/ejb3/src/test/org/jboss/ejb3/test/webservices/jsr181/NarrowableEJB3RemoteHomeInterface.java 2007-09-28 18:36:26 UTC (rev 65695)
@@ -0,0 +1,33 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2007, Red Hat Middleware LLC, and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ejb3.test.webservices.jsr181;
+
+import javax.ejb.EJBHome;
+
+/**
+ * @author carlo
+ *
+ */
+public interface NarrowableEJB3RemoteHomeInterface extends EJBHome
+{
+ NarrowableEJB3RemoteInterface create() throws java.rmi.RemoteException, javax.ejb.CreateException;
+}
Property changes on: branches/Branch_4_2/ejb3/src/test/org/jboss/ejb3/test/webservices/jsr181/NarrowableEJB3RemoteHomeInterface.java
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Modified: branches/Branch_4_2/ejb3/src/test/org/jboss/ejb3/test/webservices/unit/JSR181TestCase.java
===================================================================
--- branches/Branch_4_2/ejb3/src/test/org/jboss/ejb3/test/webservices/unit/JSR181TestCase.java 2007-09-28 17:20:09 UTC (rev 65694)
+++ branches/Branch_4_2/ejb3/src/test/org/jboss/ejb3/test/webservices/unit/JSR181TestCase.java 2007-09-28 18:36:26 UTC (rev 65695)
@@ -24,6 +24,8 @@
import junit.framework.Test;
import org.jboss.ejb3.test.webservices.jsr181.EJB3RemoteInterface;
import org.jboss.ejb3.test.webservices.jsr181.EndpointInterface;
+import org.jboss.ejb3.test.webservices.jsr181.NarrowableEJB3RemoteHomeInterface;
+import org.jboss.ejb3.test.webservices.jsr181.NarrowableEJB3RemoteInterface;
import org.jboss.ejb3.test.webservices.jsr181.RemoteHomeInterface;
import org.jboss.ejb3.test.webservices.jsr181.StatelessRemote;
import org.jboss.test.JBossTestCase;
@@ -72,21 +74,16 @@
public void testNarrowedHomeRemoteAccess() throws Exception
{
- Properties props = new Properties();
- props.put("java.naming.factory.initial", "com.sun.jndi.cosnaming.CNCtxFactory");
- props.put("java.naming.provider.url", "corbaloc::localhost:3528/NameService");
- props.put("java.naming.factory.object", "org.jboss.tm.iiop.client.IIOPClientUserTransactionObjectFactory");
- props.put(Context.URL_PKG_PREFIXES, "org.jboss.naming.client:org.jnp.interfaces");
- props.put("j2ee.clientName", "jbossws-client");
-
- InitialContext jndiContext = new InitialContext(props);
+ InitialContext jndiContext = getInitialContext();
Object proxy = jndiContext.lookup("NarrowableEJB3Bean/home");
assertNotNull(proxy);
- RemoteHomeInterface home = (RemoteHomeInterface)PortableRemoteObject.narrow(proxy, RemoteHomeInterface.class);
+ NarrowableEJB3RemoteHomeInterface home = (NarrowableEJB3RemoteHomeInterface)PortableRemoteObject.narrow(proxy, NarrowableEJB3RemoteHomeInterface.class);
assertNotNull(home);
- EJB3RemoteInterface ejb3Remote = home.create();
+ Object obj = home.create();
+ System.out.println(obj);
+ NarrowableEJB3RemoteInterface ejb3Remote = home.create();
String helloWorld = "Hello world!";
Object retObj = ejb3Remote.echo(helloWorld);
More information about the jboss-cvs-commits
mailing list