Note that there are some explanatory texts on larger screens.

plurals
  1. POCall an ejb entity class from an independent web application (netbeans)
    primarykey
    data
    text
    <p>I'm making a small webshop application for school in Netbeans. I have a Customer entity class in an EJB module together with a local session bean and a remote session bean. </p> <p>Next I have an independent web application, which can of course call the remote session bean. </p> <p>From the application I can call a method in the remote session bean to give me all customers. But what should the session bean return? </p> <ul> <li>It can return a list of Customers but my application does not know the customer class. Should I add a jar of my ejb module in the application?</li> <li>I could return a list of lists with all information of the customers but this is not very nice. </li> <li>I have read something <a href="http://www.stackoverflow.com/questions/7588804/java-ee-ejb-entity-web-standalone">here</a> about having a Customer interface in the web application but I don't understand how this works. </li> <li>Would it help making a Enterprise application and adding both the jar of the ejb module and the war of the web application?</li> </ul> <p>What's the best choice?</p> <p>(Oh and I'm using wicket as framework, if that has anything to do with this)</p> <p>EDIT:</p> <p>So my setup is like this :</p> <ul> <li>a library containing the entity class and the interface of the remote bean</li> <li>a ejb module containing the remote bean and a facade of the entity class, it also has the library above</li> <li>a web application: also has the library</li> <li>a enterprise application containing the ejb-jar and the war. </li> </ul> <p>It's not working though. When I deploy the ear, I get this error:</p> <pre><code>Error in annotation processing: java.lang.NoClassDefFoundError: shop2/database/customer/CustomerBeanRemote </code></pre> <p>I'm not sure where to put the persistence file. Now it is in the ejb module. But I don't think this is actually the problem. </p> <p>Can you maybe guide me through how to make the project. It is the first time I work with EJB and Java EE. </p> <p>Thanks!</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload