I am still getting the error.  I am recompiling correctly, and to deploy I
am just copying the jar file to the {jrunserver} directory and the
{servers}/lib directory.  I noticed that in the servers lib directory the
jar file cannot be deleted because of a sharing violation (some other
process is using it).  Could that file be cached or something and JRun is
using and old jar file?

-----Original Message-----
From: John Zhao [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 19, 2002 12:21 PM
To: JRun-Talk
Subject: RE: JRun 4 Bean Deployment


Check the error stack trace to see if you still got getEnvironment there.
If it is, it probably means you haven't recompiled or redeployed the bean
properly.  I really doubt JRun would call that method by itself.

-----Original Message-----
From: Robert Jacobs [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 19, 2002 12:12 PM
To: JRun-Talk
Subject: RE: JRun 4 Bean Deployment


I removed the line
props = ctx.getEnvironment();
from setSessionContext and redeployed the bean, and I am still getting the
same error, and it looks like it is still calling the getEnvironment method.
I deployed the bean by autodeploy.


-----Original Message-----
From: Robert Jacobs [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 19, 2002 11:46 AM
To: JRun-Talk
Subject: RE: JRun 4 Bean Deployment


Also the code of the bean's implementation is the following

package ejbtest;

/**
 * <p>Title: </p>
 * <p>Description: </p>
 * <p>Copyright: Copyright (c) 2002</p>
 * <p>Company: </p>
 * @author unascribed
 * @version 1.0
 */

import javax.ejb.*;
import java.io.Serializable;
import java.util.*;
import java.rmi.*;

public class DemoBean implements SessionBean {
  static final boolean verbose = true;

  private transient SessionContext ctx;
  private transient Properties props;

  // Implement the methods in the SessionBean
  // interface
  public void ejbActivate() {
    if (verbose)
      System.out.println("ejbActivate called");
  }

  public void ejbRemove() {
    if (verbose)
      System.out.println("ejbRemove called");
  }

  public void ejbPassivate() {
    if (verbose)
      System.out.println("ejbPassivate called");
  }

    /**
     * Sets the session context.
     *
     * @param SessionContext
     */
  public void setSessionContext(SessionContext ctx) {
    if (verbose)
      System.out.println("setSessionContext called");
    this.ctx = ctx;
    props = ctx.getEnvironment();
  }

     /**
     * This method corresponds to the create method in
     * the home interface DemoHome.java.
     * The parameter sets of the two methods are
     * identical. When the client calls
     * DemoHome.create(), the container allocates an
     * instance of the EJBean and calls ejbCreate().
     */
  public void ejbCreate () {
    if (verbose)
      System.out.println("ejbCreate called");
  }

    /**
     * **** HERE IS THE BUSINESS LOGIC *****
     * Do the demoSelect() but don't even go to
     * the database in this eg but instead just
     * return a String.
     * The really BIG thing to notice here is that
     * this is the only code we have invented at all
     * the rest of the code has been declarations
     * or simply implementing methods which are
     * part of the EJB interfaces and in this example
     * are not even used.
     */
  public String demoSelect()
    throws RemoteException
  {
    return("hello world");
  }

  public int getInt()
    throws RemoteException
  {
    return 1;
  }

}

Thanks,
Bob

-----Original Message-----
From: John Zhao [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 19, 2002 11:36 AM
To: JRun-Talk
Subject: RE: JRun 4 Bean Deployment


The message means that EJBContext.getEnvironment() is deprecated in the
latest EJB spec.  Use JNDI lookup instead in your code.  

Regards,
John

-----Original Message-----
From: Robert Jacobs [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 19, 2002 11:25 AM
To: JRun-Talk
Subject: JRun 4 Bean Deployment


I deployed a Bean in JRun 4 and when I tried to create an instance of it I
recieved a CastException.  I found out that there was a problem in JRun 3.1
where you needed to have the ejb's jar file in the {servers}/lib directory
or else it threw that exception.
I put the bean's jar file in the {servers}/lib directory now in JRun 4 and I
am getting the following exception

java.rmi.RemoteException: Deprecated and unsupported.; nested exception is: 
javax.ejb.EJBException: Deprecated and unsupported.
at jrunx.cluster.ClusterAlgorithm.invokeService(ClusterAlgorithm.java:112)
at jrunx.cluster.ClusterAlgorithm.invokeService(ClusterAlgorithm.java:70)
at jrunx.rmi.Invocation.invoke(Invocation.java:289)
at
jrunx.rmi.RemoteInvocationHandler.invoke(RemoteInvocationHandler.java:133)
at
jrun.ejb.invocation.ClientInvocationHandlerImpl.invoke(ClientInvocationHandl
erImpl.java:221)
at $Proxy6.getInt(Unknown Source)
at jruntest.Servlet1.doGet(Servlet1.java:43)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106)
at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:241)
at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:527)
at jrun.servlet.http.WebService.invokeRunnable(WebService.java:172)
at
jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPool.java:
348)
at
jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:451
)
at
jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool.java:29
4)
at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)
Caused by: javax.ejb.EJBException: Deprecated and unsupported.
at jrun.ejb.InstanceContext.getEnvironment(InstanceContext.java:80)
at ejbtest.DemoBean.setSessionContext(DemoBean.java:49)
at
jrun.ejb.StatelessSessionInstanceFactory.createInstance(StatelessSessionInst
anceFactory.java:125)
at
jrun.ejb.interceptors.StatelessSessionInstanceInterceptor.invokeObjectMethod
(StatelessSessionInstanceInterceptor.java:75)
at
jrun.ejb.interceptors.EJBSecurityInterceptor.invokeObjectMethod(EJBSecurityI
nterceptor.java:81)
at jrun.ejb.EJBContainer.invokeObjectMethod(EJBContainer.java:111)
at
jrun.ejb.invocation.RemoteInvocationProxyImpl.invoke(RemoteInvocationProxyIm
pl.java:89)
at jrunx.rmi.RMIBroker.invokeEJB(RMIBroker.java:225)
at jrunx.rmi.RMIBroker.invoke(RMIBroker.java:135)
at sun.reflect.GeneratedMethodAccessor47.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
java:28)
at java.lang.reflect.Method.invoke(Method.java:313)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:256)
at sun.rmi.transport.Transport$1.run(Transport.java:151)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:147)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:463)
at
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:7
04)
at java.lang.Thread.run(Thread.java:539)

Any help would be most appeciated.  
Thanks,
Bob






______________________________________________________________________
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to