When I run jboss ejb 3.0 tutorial,there is a java file like this:

package org.jboss.tutorial.extended.bean;

import javax.ejb.EJB;
import javax.ejb.Remote;
import javax.ejb.Remove;
import javax.ejb.*;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import javax.persistence.PersistenceContextType;

/**
 * comment
 *
 * @author Bill Burke
 */
@Stateful
@Remote(ShoppingCart.class)
public class ShoppingCartBean implements ShoppingCart
{
   @PersistenceContext(type=PersistenceContextType.EXTENDED) EntityManager em;

   @EJB StatelessLocal stateless;

   private Customer customer;

   public long createCustomer()
   {
      customer = new Customer();
      customer.setName("William");
      em.persist(customer);
      return customer.getId();
   }

   public void update()
   {
      customer.setName("Bill");
   }
   public void update2()
   {
      customer.setName("Billy");
   }

   public void update3()
   {
      stateless.update(customer);
   }

   public Customer find(long id)
   {
      return em.find(Customer.class, id);
   }

   @TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)
   public void never()
   {
      customer.setName("Bob");
   }

   

   @Remove
   public void checkout()
   {
   }
}
 
i can not compile this file ,the error message is can not find symbol
[javac] symbol? class  EJB

jboss-ejb3x.jar in the classpath 

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3963719#3963719

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3963719
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to