ear containing war and ejb jar will do it
I did a test and the result shows that ear containing war and jar doesn't work.
I suspected that it is due to the context root confliction, because there is a jboss-app.xml and context.xml in the jbossportal core already.
What i did was to deploy jar file directly. Portlets in war use jndi lookup by using local-ejb-ref tag in the jboss-web.xml. It works. But there is a strange problem related to the classloader:
If the war file includes the interface classes of the ejbs in its lib directory, there will be a classloader exception. But if i remove the ejbs interfaces from its lib directory, it works.
In my understanding, i expected that the ejb interfaces should be included in the lib directory. Is this true?