JMS ConnectionFactory

2008-11-20 Thread Oliver Günther
Hi,

if OpenEJB running in embedded and remoteable mode are there any JMS
ConnectionFactory's via JINI requestable and what are the default names.

-
Olli


Re: JUnit question

2008-11-20 Thread ericp56

I'll give it a whirl...:)

David Blevins wrote:
> 
> 
> On Nov 19, 2008, at 6:32 AM, ericp56 wrote:
> 
>>
>> I wasn't paying attention to the package, only the class name.   
>> Thanks for
>> the clarification:)
> 
> No worries.  I've often thought it would be neat to add some  
> functionality that would catch ClassNotFoundExceptions and print the  
> name of the jar that should be added to the classpath.  Wouldn't be  
> too hard as all we'd have to do is create a maven plugin (or any plain  
> java code we can run via the maven-ant-plugin at build time) that  
> squirted the indexes of each jar we depend on into a file that we  
> include in the openejb-core jar.  Then it'd simply be a quick read  
> through that file to find the jar name to add to the error message.
> 
> Would be a cool contribution if you felt like giving it a whirl :)
> 
> -David
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/JUnit-question-tp20306283p20606400.html
Sent from the OpenEJB User mailing list archive at Nabble.com.



Get current SessionContext

2008-11-20 Thread Martin Vysny
Hi guys,
  perhaps a strange question: is there an OpenEJB-specific way to detect
if my code is currently being executed in a stateless session bean
context (and get its SessionContext)? In pure J2EE this is not possible
(unless you remember the SessionContext and store it into let's say
ThreadLocal), however, I cannot do that.
Thanks!
Martin



signature.asc
Description: This is a digitally signed message part


Re: Error connecting OpenEJB3.0 client to OpenEJB 3.1 server.

2008-11-20 Thread Paul Spencer

David,
The incompatibility between 3.0 and 3.1 is not mentioned on the release 
announcement[1] or on the download page[2].  Although I understand the 
need to "break some eggs", at a bare minimum please document it in the 
release notes.


Also, thanks to the OpenEJB team for their work on the code, 
documentation, mailing list, ...


Paul Spencer

[1]http://openejb.apache.org/2008/11/05/apache-openejb-31-released.html
[2]http://openejb.apache.org/download.html
[3]http://openejb.apache.org/remote-server.html

David Blevins wrote:

Hi Paul,

The client and server versions have to match.  We did a major overhaul 
of the client/server communication between 3.0 and 3.1.  The remote 
client/server performance of 3.1 is many times faster than 3.0 and I'd 
definitely recommend switching all clients over.  We *try* to keep the 
client/server protocol and connection management stable between 
versions, but to get the improvements in we had to break some eggs.


-David

On Nov 18, 2008, at 5:35 AM, Paul Spencer wrote:

I am getting the following exception when connecting a OpenEJB 3.0 
remote client to an OpenEJB 3.1 standalone server.  The exception is 
thrown when the client is getting the IntialContext.


***
* Code that does gets the initial context
* Note: This was copied from OpenEJB's remote client example
***
Properties p = new Properties();
p.put("java.naming.factory.initial", 
"org.apache.openejb.client.RemoteInitialContextFactory");

p.put("java.naming.provider.url", "ejbd://localhost:4201");
p.put("java.naming.security.principal", "");
p.put("java.naming.security.credentials", "");

InitialContext ctx = new InitialContext(p);


***
* Exception on OpenEJB 3.0 remote Client end
***
javax.naming.AuthenticationException: Cannot open object output stream 
to server: ;

 nested exception is:
java.net.SocketException: Broken pipe
at 
org.apache.openejb.client.JNDIContext.authenticate(JNDIContext.java:176)
at 
org.apache.openejb.client.JNDIContext.getInitialContext(JNDIContext.java:129) 

at 
javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
at 
javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247)

at javax.naming.InitialContext.init(InitialContext.java:223)
at javax.naming.InitialContext.(InitialContext.java:197)

***
* Exception on OpenEJB 3.1 Server End
***
java.io.IOException: Unexpected byte 79
at 
org.apache.openejb.server.ejbd.KeepAliveServer$Session.service(KeepAliveServer.java:221) 

at 
org.apache.openejb.server.ejbd.KeepAliveServer.service(KeepAliveServer.java:233) 

at 
org.apache.openejb.server.ejbd.EjbServer.service(EjbServer.java:66)

at org.apache.openejb.server.ServicePool$2.run(ServicePool.java:91)
at org.apache.openejb.server.ServicePool$3.run(ServicePool.java:120)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650) 

at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675) 


at java.lang.Thread.run(Thread.java:613)

When I change openejb-client version from 3.0 to 3.1, the client 
successfully get the initial context and connects to the server.


Is this a bug in 3.1, 3.0, or both?

Paul Spencer