there is a problem with the testcase on my Windows xp laptop.
I did a fresh checkout and ran the test...
I ran the tests 4 times..
the 1th time I got a error.. (wasn't a SSL test)
the 2-3 test, I got a SSL test failed
the now.. they all passed.
I was trying to do a test coverage with junit report and send it here.. but
when it work's something it's not fun.
Will retry tomorrow.
2008/9/29 Jeanfrancois Arcand <Jeanfrancois.Arcand_at_sun.com>
> Salut,
>
> quende wrote:
>
>> I've just checked that test unit running on Linux Mint 5 with the same
>> build
>> of JDK, and it works like a charm. No problems there.
>>
>
> Hum I guess we need to investigate Win32.
>
>
>
>> Anyway, it's the first time I use SSL, and there is something
>> disappointing
>> me. I have a Callable class on the server-side, that has a stack of
>> messages
>> it should send to client, specified by clientSelectionKey. If I write
>> something like
>>
>> @Override
>> public Object call()
>> {
>> try
>> {
>> for(Message message : _messages)
>> {
>> if (clientSelectionKey.isValid())
>> {
>>
>> SSLOutputWriter.flushChannel(clientSelectionKey.channel(),
>> message.getByteBuffer());
>> }
>> ...
>>
>> I get
>>
>> Sep 30, 2008 12:10:10 AM com.sun.grizzly.Controller returnContext
>> FINE: returnContext() Context : com.sun.grizzly.Context_at_b82368
>>
>> java.lang.NullPointerException
>> at com.sun.grizzly.util.SSLUtils.wrap(SSLUtils.java:290)
>> at
>> com.sun.grizzly.util.SSLOutputWriter.flushChannel(SSLOutputWriter.java:87)
>> at
>> com.sun.grizzly.util.SSLOutputWriter.flushChannel(SSLOutputWriter.java:69)
>> at TestSSLPrj.Client.call(Client.java:137)
>> at
>>
>> com.sun.grizzly.util.WorkerThreadImpl.processTask(WorkerThreadImpl.java:309)
>> at
>> com.sun.grizzly.util.WorkerThreadImpl.run(WorkerThreadImpl.java:168)
>>
>> The ByteBuffer of "message" is not null, the SelectionKey is valid, so I
>> wonder, why I can't send data to client. Have I missed something, or is
>> there a better practice to send data from server to client with SSL?
>>
>
> Are you spawning you own thread? In Grizzly, we have "special" Thread that
> have some attribute. From you code snipped it is hard to diagnose, but I
> suspect the caller thread is not an instance of WorkerThread. Could it be
> the issue? Make sure when you creates a Thread you create it using:
>
>
> https://grizzly.dev.java.net/nonav/apidocs/com/sun/grizzly/util/WorkerThreadFactory.html
>
> https://grizzly.dev.java.net/nonav/xref/com/sun/grizzly/util/WorkerThreadFactory.html
>
>
> Thanks
>
> -- Jeanfrancois
>
>
>
>
>
>
> Thanks in advance,
>> -- Quende
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_grizzly.dev.java.net
> For additional commands, e-mail: users-help_at_grizzly.dev.java.net
>
>