Re: [JBoss-dev] JNDI view of java:comp context from Jetty broken

2001-12-02 Thread Julian Gosnell

Sorry guys,

Somehow the code that sets up the ENC stuff move places during a reshuffle.

I've put it back now. Please let me know if you still have problems.

Apologies for taking so long to sort this out - i haven't been at my machine
for a couple of days.

Jules


P.S.

Thanks also to those concerned for the fixURL() 'fix' - I should have called
mine ' breakURL' !

Scott M Stark wrote:

 No, I don't see the java:comp context for this standalone war. The
 AbstractWebContainer.parseWebAppDescriptors is not being called
 as part of the deploy so the ENC is not getting created. There is some
 integration problem between Jetty and the AbstractWebContainer for
 a single war I'll look into.

 
 Scott Stark
 Chief Technology Officer
 JBoss Group, LLC
 
 - Original Message -
 From: Peter Levart [EMAIL PROTECTED]
 To: Scott M Stark [EMAIL PROTECTED]; Scott M Stark
 [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Sent: Friday, November 30, 2001 8:42 AM
 Subject: Re: [JBoss-dev] JNDI view of java:comp context from Jetty broken

  On Friday 30 November 2001 12:38, Scott M Stark wrote:
   I just looked at the latest build with the jbosstest.ear from the
 testsuite
   module
   and the DebugServlet http://localhost:8080/jbosstest/DebugServlet
   is displaying the full java:comp context correctly:
  
 
  I tried that too and it is displaying it correctly for me too. I don't
 know
  why it is working for that particular test app and why not for my app. So
 I
  did a fresh checkout of jboss-all and I created a minimal jbosstest.war
  composed of only the:
 
  DebugServlet.java, Util.java  web.xml.
 
  Attached to the message you will find it. Not displaying java:comp.
 
  Please, can you try it? Am I missing something? Can you make it display
 the
  java:comp/env/Strings/s1 ?
 
 
  Peter
 

 ___
 Jboss-development mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/jboss-development


_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


___
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development



Re: [JBoss-dev] JNDI view of java:comp context from Jetty broken

2001-12-02 Thread Julian Gosnell

I'm still not happy about this - there is still something broken in my build.

If you guys can survive another 24 hours, i shall try to sort it out tomorrow.

Apologies to anyone I am holding up - I know how frustrating it can be.


Jules

Julian Gosnell wrote:

 Sorry guys,

 Somehow the code that sets up the ENC stuff move places during a reshuffle.

 I've put it back now. Please let me know if you still have problems.

 Apologies for taking so long to sort this out - i haven't been at my machine
 for a couple of days.

 Jules

 P.S.

 Thanks also to those concerned for the fixURL() 'fix' - I should have called
 mine ' breakURL' !

 Scott M Stark wrote:

  No, I don't see the java:comp context for this standalone war. The
  AbstractWebContainer.parseWebAppDescriptors is not being called
  as part of the deploy so the ENC is not getting created. There is some
  integration problem between Jetty and the AbstractWebContainer for
  a single war I'll look into.
 
  
  Scott Stark
  Chief Technology Officer
  JBoss Group, LLC
  
  - Original Message -
  From: Peter Levart [EMAIL PROTECTED]
  To: Scott M Stark [EMAIL PROTECTED]; Scott M Stark
  [EMAIL PROTECTED]; [EMAIL PROTECTED]
  Sent: Friday, November 30, 2001 8:42 AM
  Subject: Re: [JBoss-dev] JNDI view of java:comp context from Jetty broken
 
   On Friday 30 November 2001 12:38, Scott M Stark wrote:
I just looked at the latest build with the jbosstest.ear from the
  testsuite
module
and the DebugServlet http://localhost:8080/jbosstest/DebugServlet
is displaying the full java:comp context correctly:
   
  
   I tried that too and it is displaying it correctly for me too. I don't
  know
   why it is working for that particular test app and why not for my app. So
  I
   did a fresh checkout of jboss-all and I created a minimal jbosstest.war
   composed of only the:
  
   DebugServlet.java, Util.java  web.xml.
  
   Attached to the message you will find it. Not displaying java:comp.
  
   Please, can you try it? Am I missing something? Can you make it display
  the
   java:comp/env/Strings/s1 ?
  
  
   Peter
  
 
  ___
  Jboss-development mailing list
  [EMAIL PROTECTED]
  https://lists.sourceforge.net/lists/listinfo/jboss-development

 _
 Do You Yahoo!?
 Get your free @yahoo.com address at http://mail.yahoo.com

 ___
 Jboss-development mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/jboss-development


_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


___
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development



Re: [JBoss-dev] JNDI view of java:comp context from Jetty broken

2001-12-02 Thread Scott M Stark


I just took a look at this and it has been fixed by Jules.

- Original Message -
From: Peter Levart [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: Jules Gosnell [EMAIL PROTECTED]
Sent: Saturday, December 01, 2001 7:47 AM
Subject: Re: [JBoss-dev] JNDI view of java:comp context from Jetty broken


 On Saturday 01 December 2001 04:20, Scott M Stark wrote:
  No, I don't see the java:comp context for this standalone war. The
  AbstractWebContainer.parseWebAppDescriptors is not being called
  as part of the deploy so the ENC is not getting created. There is some
  integration problem between Jetty and the AbstractWebContainer for
  a single war I'll look into.
 

 I dit some traceback and it appears that AbstractWebContainer subclass
 (org.jboss.jetty.JettyService) is not calling
 WebDescriptorParser.parseWebAppDescriptors().

 The call to parseWebAppDescriptors() is being made from within
 org.jboss.jetty.JBossWebApplicationContext.JBossSXSecurityHandler.start()
 method, which is not called since no JBossSXSecurityHandler instance is
ever
 created. The JBossWebApplicationContext.getSecurityHandler() is never
called.

 It's true. I have not yet configured the security in my app. But it should
 work nevertheless.

 Why is parsing done in JBossSXSecurityHandler's start() method? Because
the
 start() method is called with the correct thread's contextClassLoader? If
it
 is different than thread's contextClassLoader when performDeploy is called
 then it should be the child of it as it is asserted in the sanity check
 being made in JBossSXSecurityHandler.start() method.

 So I made a test and moved the parseWebAppDescriptors() call from the
 JBossSXSecurityHandler.start() method to the
org.jboss.jetty.Jetty.deploy()
 method, just before JBossWebApplicationContext.start() method is called.

 It works.


 Peter




___
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development



Re: [JBoss-dev] JNDI view of java:comp context from Jetty broken

2001-12-01 Thread Peter Levart

On Saturday 01 December 2001 04:20, Scott M Stark wrote:
 No, I don't see the java:comp context for this standalone war. The
 AbstractWebContainer.parseWebAppDescriptors is not being called
 as part of the deploy so the ENC is not getting created. There is some
 integration problem between Jetty and the AbstractWebContainer for
 a single war I'll look into.


I also have the same problem with my bigger app that is a complete ear with 
ejb-jar  war. I'm only using standard J2EE deployment descriptors + 
jbosscmp-jdbc.xml (no jboss-web.xml or jboss.xml).

This was working some couple of days ago, but stopped recently.

Peter



___
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development



Re: [JBoss-dev] JNDI view of java:comp context from Jetty broken

2001-12-01 Thread Peter Levart

On Saturday 01 December 2001 04:20, Scott M Stark wrote:
 No, I don't see the java:comp context for this standalone war. The
 AbstractWebContainer.parseWebAppDescriptors is not being called
 as part of the deploy so the ENC is not getting created. There is some
 integration problem between Jetty and the AbstractWebContainer for
 a single war I'll look into.


I dit some traceback and it appears that AbstractWebContainer subclass 
(org.jboss.jetty.JettyService) is not calling 
WebDescriptorParser.parseWebAppDescriptors().

The call to parseWebAppDescriptors() is being made from within 
org.jboss.jetty.JBossWebApplicationContext.JBossSXSecurityHandler.start() 
method, which is not called since no JBossSXSecurityHandler instance is ever 
created. The JBossWebApplicationContext.getSecurityHandler() is never called.

It's true. I have not yet configured the security in my app. But it should 
work nevertheless.

Why is parsing done in JBossSXSecurityHandler's start() method? Because the 
start() method is called with the correct thread's contextClassLoader? If it 
is different than thread's contextClassLoader when performDeploy is called 
then it should be the child of it as it is asserted in the sanity check 
being made in JBossSXSecurityHandler.start() method.

So I made a test and moved the parseWebAppDescriptors() call from the 
JBossSXSecurityHandler.start() method to the org.jboss.jetty.Jetty.deploy() 
method, just before JBossWebApplicationContext.start() method is called.

It works.


Peter


Here are the diffs:

Index: JBossWebApplicationContext.java
===
RCS file: 
/cvsroot/jboss/contrib/jetty/src/main/org/jboss/jetty/JBossWebApplicationContext.java,v
retrieving revision 1.4
diff -c -r1.4 JBossWebApplicationContext.java
*** JBossWebApplicationContext.java 2001/11/28 01:22:25 1.4
--- JBossWebApplicationContext.java 2001/12/01 15:46:02
***
*** 117,125 
  }

  // Parse descriptors and set up the JNDI environment
! Element webAppDD = _webApp.getWebApp();
! Element jbossDD  = _webApp.getJbossWeb();
! _descriptorParser.parseWebAppDescriptors(loader, webAppDD, jbossDD);

  // Add the JBoss security realm
  String realmName = getRealm();
--- 117,125 
  }

  // Parse descriptors and set up the JNDI environment
! // Element webAppDD = _webApp.getWebApp();
! // Element jbossDD  = _webApp.getJbossWeb();
! // _descriptorParser.parseWebAppDescriptors(loader, webAppDD, 
jbossDD);

  // Add the JBoss security realm
  String realmName = getRealm();
***
*** 246,248 
--- 246,249 
return 
path.substring(jar:file:.length(),path.length()-(resource.length()+2));
  }
  }
+
Index: Jetty.java
===
RCS file: /cvsroot/jboss/contrib/jetty/src/main/org/jboss/jetty/Jetty.java,v
retrieving revision 1.24
diff -c -r1.24 Jetty.java
*** Jetty.java  2001/11/29 01:21:29 1.24
--- Jetty.java  2001/12/01 15:46:02
***
*** 204,209 
--- 204,213 
_log.info(no jboss-web.xml found);
}

+   //
+   // delegate parsing of some elements to descriptorParser
+   descriptorParser.parseWebAppDescriptors(cl, wa.getWebApp(), 
wa.getJbossWeb());
+
// finally start the app
app.start();

***
*** 287,289 
--- 291,294 
url.substring(index, url.length());
}
  }
+

___
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development



Re: [JBoss-dev] JNDI view of java:comp context from Jetty broken

2001-11-30 Thread Scott M Stark

I just looked at the latest build with the jbosstest.ear from the testsuite
module
and the DebugServlet http://localhost:8080/jbosstest/DebugServlet
is displaying the full java:comp context correctly:

java:comp
  +- UserTransaction[link - UserTransaction]
  +- env
  |   +- mail
  |   |   +- DefaultMail[link - java:/Mail]
  |   +- jdbc
  |   |   +- DefaultDS[link - java:/DefaultDS]
  |   +- ejb
  |   |   +- OptimizedEJB[link - OptimizedEJB]
  |   |   +- bean2[link - ENCBean1]
  |   |   +- bean1[link - ENCBean1]
  |   |   +- catalog
  |   |   |   +- CatalogDAOClass
  |   |   +- bean0[link - ENCBean0]
  |   |   +- CtsBmp[link - ejbcts/BMPBean]
  |   |   +- SecuredEJB[link - jbosstest/ejbs/SecuredEJB]
  |   |   +- UnsecuredEJB[link - jbosstest/ejbs/UnsecuredEJB]
  |   +- Floats
  |   |   +- f1
  |   |   +- f0
  |   +- Strings
  |   |   +- s1
  |   |   +- s0
  |   +- Ints
  |   |   +- i1
  |   |   +- i0
  |   +- security
  |   |   +- realmMapping[link - java:/jaas/other]
  |   |   +- securityMgr[link - java:/jaas/other]
  |   +- jms
  |   |   +- QueFactory[link - ConnectionFactory]



Scott Stark
Chief Technology Officer
JBoss Group, LLC

- Original Message -
From: Peter Levart [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, November 30, 2001 1:18 AM
Subject: [JBoss-dev] JNDI view of java:comp context from Jetty broken


 Hello!

 There seems to be something wrong with java:comp naming context as seen
from
 within Jetty in the latest CVS sources.

 That's what a servlet sees when the app is run in a JBoss/Jetty from a
couple
 of days ago:

   +- jaas
   +- TransactionPropagationContextImporter
   +- JmsXA
   +- MinervaSharedLocalCMFactory
   +- DefaultDS
   +- StdJMSPool
   +- MinervaXACMFactory
   +- TransactionManager
   +- TransactionPropagationContextExporter
   +- ConnectionFactory
   +- DefaultJMSProvider
   +- XAConnectionFactory
   +- Mail
   +- NoTransDS
   +- SecurityProxyFactory
   +- comp
   |   +- UserTransaction[link - UserTransaction]
   |   +- env
   |   |   +- ejb
   |   |   |   +- CustomersSessionRemote[link - CustomersSessionBean]
   |   |   +- security
   |   |   |   +- realmMapping
   |   |   |   +- securityMgr
   +- MinervaNoTransCMFactory
   +- Sybase_J2EETEST


 And that's the same app run in todays build:

   +- jaas
   +- TransactionPropagationContextImporter
   +- JmsXA
   +- MinervaSharedLocalCMFactory
   +- DefaultDS
   +- StdJMSPool
   +- MinervaXACMFactory
   +- TransactionManager
   +- TransactionPropagationContextExporter
   +- ConnectionFactory
   +- DefaultJMSProvider
   +- XAConnectionFactory
   +- Mail
   +- NoTransDS
   +- SecurityProxyFactory
   +- comp
   +- MinervaNoTransCMFactory
   +- Sybase_J2EETEST


 Notice that java:comp context is empty.

 Has anybody else noticed that?


 Peter

 ___
 Jboss-development mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/jboss-development



___
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development



Re: [JBoss-dev] JNDI view of java:comp context from Jetty broken

2001-11-30 Thread Peter Levart

On Friday 30 November 2001 12:38, Scott M Stark wrote:
 I just looked at the latest build with the jbosstest.ear from the testsuite
 module
 and the DebugServlet http://localhost:8080/jbosstest/DebugServlet
 is displaying the full java:comp context correctly:


I tried that too and it is displaying it correctly for me too. I don't know 
why it is working for that particular test app and why not for my app. So I 
did a fresh checkout of jboss-all and I created a minimal jbosstest.war 
composed of only the:

 DebugServlet.java, Util.java  web.xml.

Attached to the message you will find it. Not displaying java:comp.

Please, can you try it? Am I missing something? Can you make it display the 
java:comp/env/Strings/s1 ?


Peter



jbosstest.war
Description: Zip archive


Re: [JBoss-dev] JNDI view of java:comp context from Jetty broken

2001-11-30 Thread Adrian Brock

Peter,

Have a look at
https://sourceforge.net/tracker/index.php?func=detailaid=482875group_id=22866atid=376685

I think this fix might have broken your app.

The code in org.jboss.naming.ENCFactory does a

synchronized(encs)

when manipulating the cache, but I don't think the garbage collector will 
respect this?

I suspect the WeakHashMap might be broken because of concurrent access.

I'll do some more testing when I've had some sleep.

Regards,
Adrian


From: Peter Levart [EMAIL PROTECTED]
To: Scott M Stark [EMAIL PROTECTED],   Scott M Stark 
[EMAIL PROTECTED],   [EMAIL PROTECTED]
Subject: Re: [JBoss-dev] JNDI view of java:comp context from Jetty broken
Date: Fri, 30 Nov 2001 17:42:33 +0100

On Friday 30 November 2001 12:38, Scott M Stark wrote:
  I just looked at the latest build with the jbosstest.ear from the 
testsuite
  module
  and the DebugServlet http://localhost:8080/jbosstest/DebugServlet
  is displaying the full java:comp context correctly:
 

I tried that too and it is displaying it correctly for me too. I don't know
why it is working for that particular test app and why not for my app. So I
did a fresh checkout of jboss-all and I created a minimal jbosstest.war
composed of only the:

DebugServlet.java, Util.java  web.xml.

Attached to the message you will find it. Not displaying java:comp.

Please, can you try it? Am I missing something? Can you make it display the
java:comp/env/Strings/s1 ?


Peter
 jbosstest.war 


_
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp


___
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development



Re: [JBoss-dev] JNDI view of java:comp context from Jetty broken

2001-11-30 Thread Scott M Stark


That is not the issue. The problem exists with the standalone war env
if ENCFactory is switched back to use HashMap instead of WeakHashMap.

- Original Message -
From: Adrian Brock [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Friday, November 30, 2001 4:36 PM
Subject: Re: [JBoss-dev] JNDI view of java:comp context from Jetty broken


 Peter,

 Have a look at

https://sourceforge.net/tracker/index.php?func=detailaid=482875group_id=22
866atid=376685

 I think this fix might have broken your app.

 The code in org.jboss.naming.ENCFactory does a

 synchronized(encs)

 when manipulating the cache, but I don't think the garbage collector will
 respect this?

 I suspect the WeakHashMap might be broken because of concurrent access.

 I'll do some more testing when I've had some sleep.

 Regards,
 Adrian


 From: Peter Levart [EMAIL PROTECTED]
 To: Scott M Stark [EMAIL PROTECTED],   Scott M Stark
 [EMAIL PROTECTED],   [EMAIL PROTECTED]
 Subject: Re: [JBoss-dev] JNDI view of java:comp context from Jetty broken
 Date: Fri, 30 Nov 2001 17:42:33 +0100
 
 On Friday 30 November 2001 12:38, Scott M Stark wrote:
   I just looked at the latest build with the jbosstest.ear from the
 testsuite
   module
   and the DebugServlet http://localhost:8080/jbosstest/DebugServlet
   is displaying the full java:comp context correctly:
  
 
 I tried that too and it is displaying it correctly for me too. I don't
know
 why it is working for that particular test app and why not for my app. So
I
 did a fresh checkout of jboss-all and I created a minimal jbosstest.war
 composed of only the:
 
  DebugServlet.java, Util.java  web.xml.
 
 Attached to the message you will find it. Not displaying java:comp.
 
 Please, can you try it? Am I missing something? Can you make it display
the
 java:comp/env/Strings/s1 ?
 
 
 Peter
  jbosstest.war 


 _
 Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp


 ___
 Jboss-development mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/jboss-development



___
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development



Re: [JBoss-dev] JNDI view of java:comp context from Jetty broken

2001-11-30 Thread Scott M Stark

No, I don't see the java:comp context for this standalone war. The
AbstractWebContainer.parseWebAppDescriptors is not being called
as part of the deploy so the ENC is not getting created. There is some
integration problem between Jetty and the AbstractWebContainer for
a single war I'll look into.


Scott Stark
Chief Technology Officer
JBoss Group, LLC

- Original Message -
From: Peter Levart [EMAIL PROTECTED]
To: Scott M Stark [EMAIL PROTECTED]; Scott M Stark
[EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Friday, November 30, 2001 8:42 AM
Subject: Re: [JBoss-dev] JNDI view of java:comp context from Jetty broken


 On Friday 30 November 2001 12:38, Scott M Stark wrote:
  I just looked at the latest build with the jbosstest.ear from the
testsuite
  module
  and the DebugServlet http://localhost:8080/jbosstest/DebugServlet
  is displaying the full java:comp context correctly:
 

 I tried that too and it is displaying it correctly for me too. I don't
know
 why it is working for that particular test app and why not for my app. So
I
 did a fresh checkout of jboss-all and I created a minimal jbosstest.war
 composed of only the:

 DebugServlet.java, Util.java  web.xml.

 Attached to the message you will find it. Not displaying java:comp.

 Please, can you try it? Am I missing something? Can you make it display
the
 java:comp/env/Strings/s1 ?


 Peter



___
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development