[JBoss Seam] - Re: Anybody got Seam 2.0.0 working with WebSphere 6.1 and EJ
by nandhusriram
Jay
Thanks for your reply.
I was just looking into the dw forums and I found the same link. I even changed the server class loader from multiple to single and made parent last, still no luck.
BTW I am just running the sample booking jpa example that came with jboss seam 2.0.1. One more note I am running this on a windows , that should n't matter anyway. Here are few snippets from my systemout.log
[2/6/08 10:22:11:812 CST] 0000000a JPAComponentI I CWWJP0026I: The Java
Persistence API (JPA) component is initializing.
[2/6/08 10:22:11:843 CST] 0000000a JPAComponentI I CWWJP0006I: The
com.ibm.websphere.persistence.PersistenceProviderImpl class is loaded as
the default Java Persistence API (JPA) provider.
[2/6/08 10:22:11:843 CST] 0000000a JPAComponentI I CWWJP0027I: The Java
Persistence API (JPA) component has initialized.
[2/6/08 10:28:31:640 CST] 0000000a JPAComponentI I CWWJP0028I: The Java
Persistence API (JPA) component is starting.
[2/6/08 10:28:31:671 CST] 0000000a JPAComponentI I CWWJP0017I: The Java
Persistence API (JPA) component has started.
[2/6/08 10:28:38:125 CST] 00000016 Initializatio I
org.jboss.seam.init.Initialization addComponentDescriptor two components
with same name, higher precedence wins:
org.jboss.seam.persistence.persistenceProvider
org.jboss.seam.Component Component: bookingDatabase, scope:
APPLICATION, type: JAVA_BEAN, class:
org.jboss.seam.persistence.EntityManagerFactory
[2/6/08 10:28:39:234 CST] 00000016 Component I
org.jboss.seam.Component Component:
org.jboss.seam.persistence.persistenceProvider, scope: STATELESS, type:
JAVA_BEAN, class: org.jboss.seam.persistence.HibernatePersistenceProvider
[2/6/08 10:28:39:703 CST] 00000016 WebApp E Exception caught
while initializing context
java.lang.ClassCastException:
org.apache.openjpa.persistence.PersistenceProviderImpl incompatible with
javax.persistence.spi.PersistenceProvider
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4127084#4127084
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4127084
18 years, 2 months
[EJB 3.0] - Re: Deployment error using IIOP+EJB3+Jboss 4.05
by olro
No, it seems there is no way to do it the EJB3 way.
My solution was to make some pseudo EJB2.
I made an interface extendending EJBObject and dummy implementations of the EJBObject methods in the beans:
| @Remote
| public interface TestRemoteIF extends EJBObject
| {
| public String sayName( String p_Name ) throws RemoteException
| {
|
| return "Name";
|
| }
| }
|
|
| @Stateless
| @RemoteBinding(factory=org.jboss.ejb3.iiop.IORFactory.class)
| public class TestBean extends AbstractEJBBean implements TestRemoteIF
| {
| private static final long serialVersionUID = -486897890441660788L;
|
| public String sayName( String p_Name ) throws RemoteException
| {
|
| return "Name";
|
| }
| }
|
| public abstract class AbstractEJBBean
| {
|
| /**
| * Konstruktor
| */
| public AbstractEJBBean()
| {
| }
|
| /**
| * getEJBHome-Dummy
| *
| * @return EJBHome
| * @throws RemoteException RemoteException
| */
| public EJBHome getEJBHome() throws RemoteException
| {
| return null;
| }
|
| /**
| * getHandle-Dummy
| *
| * @return Handle
| * @throws RemoteException RemoteException
| */
| public Handle getHandle() throws RemoteException
| {
| return null;
| }
|
| /**
| * getPrimaryKey-Dummy
| *
| * @return Object
| * @throws RemoteException RemoteException
| */
| public Object getPrimaryKey() throws RemoteException
| {
| return null;
| }
|
| /**
| * isIdentical-Dummy
| *
| * @param p_EJBObject EJBObject
| * @return boolean
| * @throws RemoteException RemoteException
| */
| public boolean isIdentical( EJBObject p_EJBObject ) throws RemoteException
| {
| return false;
| }
|
| /**
| * remove-Dummy
| *
| * @throws RemoteException RemoteException
| * @throws RemoveException RemoveException
| */
| public void remove() throws RemoteException, RemoveException
| {
| }
|
| }
|
|
At least it worked.
I can't give more help on this topic as I am using glassfish at the moment.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4127080#4127080
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4127080
18 years, 2 months
[Remoting] - Re: JBREM-877: New Socket Connection is being Created for Ev
by DarrenGJones
I am finding the same behaviour - every call to an EJB3 stateless session bean appears to be creating a new client socket. I have been running through the source in the debugger and it seems to be due to this code (snipped in places):
public class InvokeRemoteInterceptor ...
{
public Object invoke(org.jboss.aop.joinpoint.Invocation invocation) throws Throwable
{
Client client = new Client(locator, subsystem);
try
{
client.connect();
org.jboss.aop.joinpoint.InvocationResponse response = (org.jboss.aop.joinpoint.InvocationResponse)client.invoke(invocation, null);
invocation.setResponseContextInfo(response.getContextInfo());
return response.getResponse();
}
catch (Exception e)
{
}
finally
{
client.disconnect();
}
}
So, from the bold lines it seems to create a new Client Object for every remote call. This in turn creates a new SocketClientInvoker which then creates a new Socket pool rather than reusing an existing Socket pool.
Client.connect() does store the client invoker in the InvokerRegistry but the disconnect() then causes the Invoker to be removed from the InvokerRegistry (via destroyClientInvoker). This may explain why the Invoker (and its pool) is not being reused.
I am using JBoss 4.2.1GA (JBoss Remoting 2.2.1). FYI - The source above is from 2.2.0 since that is the latest downloadable version I could find.
Any help on a potential fix appreciated.
Thanks,
Darren.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4127075#4127075
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4127075
18 years, 2 months