RE: 2nd Try(PLS...) Re: [JBoss-user] Service startup

2003-02-25 Thread saroj kumar
Title: Message



Hey 
Murali,

It is 
very easy. Just write a MBean and your app-name-service.xml. Drop these 
in deploy folder.

You 
can have a look at JNDIMap example in paydocs.

It is 
very simple to understand. 

-Saroj

  
  -Original Message-From: 
  [EMAIL PROTECTED] 
  [mailto:[EMAIL PROTECTED] On Behalf Of Muraly 
  RSent: Tuesday, February 25, 2003 12:58 PMTo: 
  [EMAIL PROTECTED]Subject: 2nd Try(PLS...) Re: 
  [JBoss-user] Service startupHi 
  GURUS,Please 
  Help!!!RegardsMuralyAt 11:53 24/02/2003 +0530, Muraly R 
  wrote:
  Hi,Currently 
I am working on the project of migrating an existing application from JOnAs 
to JBoss3.0.4 . The migration resulted for two reasons:1. Multi-context 
support(at EAR level).2. Performance results statistics.Coming 
to the query, the current application has some services which will get 
started when the JOnAs server is started. This achieved by implementing 
org.objectweb.jonas.service.Service inetrface in the class.In JBoss, 
how can this be achieved?I have the paid docs, but from that what I 
understand is the service is dependent on one of the JBoss service(JNDI 
example).Can I know, if there is an independent class which can be 
used to start the service classes, during JBoss startup, which the 
application already has.A detailed example would help, 
:-).RegardsMuraly---This 
SF.net email is sponsored by: SlickEdit Inc. Develop an edge.The most 
comprehensive and flexible code editor you can use.Code faster. C/C++, 
C#, Java, HTML, XML, many more. FREE 30-Day Trial.www.slickedit.com/sourceforge___JBoss-user 
mailing list[EMAIL PROTECTED]https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] Programmatic access to Form-based authenticated URL resources

2003-02-25 Thread Achilleus Mantzios

Hi,

My question is somewhat general.

BASIC authentication is well supported on web browsers, but it is
not session based and there is no simple way to implement logout.
However it is great for program clients (like servlets).

Form authentication looks fancier, is based on sessions, therefore
a logout is simply a Session.invalidate(), but it is not easy
for program clients to handle.

Suppose some wants to write a simple servlet that mails another URL
to the client.

One way to do so is to use javax.activation.URLDataSource.
However, because it works as a plain HTTP Conversation with the server
(that is with itself!!), there is no way to bypass the securitiy issues
invlolved.

Has anyone any ideas on the matter??


==
Achilleus Mantzios
S/W Engineer
IT dept
Dynacom Tankers Mngmt
Nikis 4, Glyfada
Athens 16610
Greece
tel:+30-10-8981112
fax:+30-10-8981877
email:  [EMAIL PROTECTED]
[EMAIL PROTECTED]



---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] Jboss new bie startup Problem

2003-02-25 Thread John Kunchandy
Hi Rod

I have re-installed the jboss-3.0.6_tomcat-4.1.18 bundle in my PC.

Now I am able to start both servers without an error being thrown up
regarding the Context but when I try to access http://localhost:8080/or
http://192.168.10.28:8080/  192.168.10.28 being my PC's IP I am thrown this
eror by Tomcat.

Error:

type:  Status report

message :  No Context configured to process this request

message :  The server encountered an internal error (No Context configured
to process this request) that prevented it from fulfilling this request.

I have checked the server.xml file(JBOSS_HOME/tomcat-4.1.x/conf/server.xml)
of tomcat and by default it is set to the tomcat\webapps\ROOT folder .This
is proved because when I start  tomcat alone I am able to see the default
Tomcat page at the URL mentioned above but Jboss says :

14:49:52,323 INFO  [Engine] StandardHost[localhost]: MAPPING configuration
error
 for request URI /

How is it possible that Jboss is starting tomcat but it does not find the
folder to which the context has been set in the server.xml file of
tomcat(jboss_home/tomcat-4.1.x/conf/server.xml) .If not there when where is
it looking for the context ?If I were running tomcat alone then I would have
needed to only modify server.xml in  Tomcat.But when JBOSS starts Tomcat it
sems not to be able to find the server.xml file  of Tomcat to set the
COntext ... or else it seems to be looking in a different file for the
Context  . I do not know which of these is true.Could you please guide me as
to which xml  file I should modify to be able to get the Tomcat server to
lookup the right context.By altering the server.xml in Tomcat it seems to be
having no effect since Jboss still does not find the index.jsp file in the
context set.

I hope I have been able to bring forth my difficulty clearly and I am
thankful to all who are reading my mails and trying to help me out
especially Rod   and Eric.Kindly point me in the right direction.

Thanks and Best Regards

John Kunchandy

- Original Message -
From: Rod Macpherson [EMAIL PROTECTED]
To: John Kunchandy [EMAIL PROTECTED]
Sent: Tuesday, February 25, 2003 1:36 PM
Subject: Re: [JBoss-user] Jboss new bie startup Problem


: Not sure where you are getting the advice on setting classpath and path
: environment variables. I would not mess with either of those except to
: remove CLASSPATH completely since it is problematic. Unzip JBoss and set
you
: JDK_HOME and JBOSS_HOME. The only thing you might want to add to your path
: is the JDK bin directory. Make sure you have driver letters where
: appropriate.
:



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.456 / Virus Database: 256 - Release Date: 2/18/2003



---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] Complex configuration jboss+tomcat+apache+mod_jk2

2003-02-25 Thread Nadim Bitar
I am looking for pointers to install JBoss3.2 + Tomcat4.1 +Apache2.0 +
mod_jk2
Any pointers or links highly appreciated. I have the docs but they
discuss mod_jk not mod_jk2 which i want to use.
thanks in advance.





---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] classpath for JSP compiling

2003-02-25 Thread Jules Gosnell
Guys,

I understand that it would be nice for you not to have to worry about 
when/how your JSPs get compiled.

This fn-ality should be a part of Jasper. I only do the Jetty/JBoss 
integration.

If you really want it, and I am always dealing with traffic on this 
subject - so many people do, then you should find the Jasper project at 
jakarta.apache.org and suggest it to them.

Good luck,

Jules

Thorbjørn Ravn Andersen wrote:

Jules Gosnell wrote:

This step is problematic to perform in an automated manner, due to 
the need for development time knowledge (which jsps are servlets and 
which are just included, etc...).


I understand there is a problem detecting this automatically, but 
would it be hard to implement given a configuration file snippet 
saying exactly which files to compile? 
I read the FAQ and found that there is a convoluted code sample which 
apparently maintains such a snippet (it is not easy to understand 
without running it).This may be adapted to provide such a list.

My current approach is to use the ?jsp_precompile feature, but that is 
also hard to automate as it is difficult to estimate when the 
asynchronic deployment with JBoss is finished so Jetty is ready to 
serve pages.

I understand that the Trifork J2EE server can do this.  Perhaps it is 
a nice feature to have?






This email has been scanned for all viruses by the MessageLabs SkyScan
service. For more information on a proactive anti-virus service working
around the clock, around the globe, visit http://www.messagelabs.com

---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] Service starts after my app is deployed

2003-02-25 Thread Brian McSweeney




Hi all,
it has probably been answered many times before, but I couldn't find it.
I want a service to start once my ear is deployed. In the paydocs examples 

I know you can run a service based on whether a different jboss service is up 

and running by using:
 dependsjboss:service=Naming/depends
in the -service.xml file. So here the service wont start until the 
jboss:service 
"Naming" is up and running. I want to start my service once an application 
ear 
is deployed. Is this possible?
thanks,
Brian


Re: [JBoss-user] Unremoved DB locks on JBoss Stop

2003-02-25 Thread Peter Fagerlund

tisdagen den 25 februari 2003 kl 00.33 skrev Brian Taylor:

Shutdown is performed by closing the console window. Is this not a good idea? Should I be using 'shutdown 127.0.0.1 8080'?

We're using 3.0.4 on MS SQL Server 2000.

Use ctrl c, a shutdown script or the jmx-console -to execute the shutdownhook.

Do not know if Your operating systems console is performing a ctrl c on processes active when closing the window of the CLI.

There seem to been some problem regarding the shutdownhook in 3.0.6 ... for 3.0.4 I do not know - check the bug db at sf.net

[JBoss-user] Orkestra kuculdu ve cebinize girdi!

2003-02-25 Thread Melodi Grafik Hizmetleri
Title: SMSNET MELODI GRAFIK HABERLER
 24 Þubat 2003www.melodilerim.com / www.grafiklerim.com Allý Turnam  Gülpembe - Barýþ Manço  Arap Saçý - Erkin Koray  Bir Kulunu Çok Sevdim - Ýbrahim Tatlýses  Alyazmalým - Cahit Berkay  Kum Gibi - Ahmet Kaya  Düþler Sokaðý -Ezginin Günlüðü  Whenever Wherever - Shakira  Mezdeke  Mission Impossible   Ve daha niceleri Melodilerim.com' daORKESTRA küçüldü, küçüldü, küçüldü... CEBÝNÝZE GÝRDÝ !Polifonik melodiler, GPRS veya WAP yoluyla polifonik özelliði olan cep telefonunuza indirebileceðiniz, þimdiye kadar alýþýk olduðunuz melodilerden farklý olarak birden fazla enstrümanýn kullanýldýðý çok sesli melodilerdir. En önemli özellikleri, orijinal hallerine daha çok benzemeleridir.Polifonik melodilerimizi dinlemek, hangi telefon modellerine gönderilebildiðini öðrenmek ve telefonunuza transfer etmek için týklayýnýz...Sayfalarýmýzdaki yeniliklerimizi göremiyorsanýz, lütfen melodilerim.com sayfamýzý bir kaç kez üstüste yeniden yükleyiniz  (Tazele / Refresh) ya da CTRL ve F5 tuþuna ayný anda basarak sayfamýzýn yeniden yüklenmesini saðlayýnýz.Melodi isteðinde  bulunmak istiyorum!Resmimi telefonumda görmek istiyorum!Þifremi unuttumHaber listenizden  çýkmak istiyorum Yardým hattýmýz: 0 312 2865891 (her gün 9.00 - 20.00 arasý)  



---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] Service starts after my app is deployed

2003-02-25 Thread Brian McSweeney
thanks Torsten!


- Original Message -
From: Torsten Terp [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, February 25, 2003 12:43 PM
Subject: RE: [JBoss-user] Service starts after my app is deployed


 Hi

 You can do it the way you describe, just replace
 jboss:service=Naming
 with the name of each of your EJBs in the ear file..
 you can see the correct name in the jndi view in the
 jmx-console under the jboss.j2ee section

 example:

 depends-list

depends-list-elementjboss.j2ee:jndiName=ejb/xxx/yyy,service=EJB/depends-l
 ist-element
 ...
 /depends-list

 I dont know if its possible to just spaeciy the ear file
 instead, that would be easier?!?!

 BR
 Terp


 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] Behalf Of Brian
McSweeney
 Sent: 25. februar 2003 12:46
 To: [EMAIL PROTECTED]
 Subject: [JBoss-user] Service starts after my app is deployed


 Hi all,
 it has probably been answered many times before, but I couldn't find it.
 I want a service to start once my ear is deployed. In the paydocs examples
 I know you can run a service based on whether a different jboss service is
 up
 and running by using:
 dependsjboss:service=Naming/depends
 in the -service.xml file. So here the service wont start until the
 jboss:service
 Naming is up and running. I want to start my service once an application
 ear
 is deployed. Is this possible?
 thanks,
 Brian




 ---
 This sf.net email is sponsored by:ThinkGeek
 Welcome to geek heaven.
 http://thinkgeek.com/sf
 ___
 JBoss-user mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/jboss-user





---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] TOP like functionality for jboss

2003-02-25 Thread David Klimek
Hi,

information provided by java profiler interface (JVMPI)

http://java.sun.com/j2se/1.4/docs/guide/jvmpi/index.html

are sufficient to write TOP like tool for jboss, but i have
read that using JVMPI will cause JVM to run 2-10 times slower
so it would not be acceptable in prodution environment.
Have you got any experience with JVMPI slowdown, is that true?

Maybe intercepting method calls in jboss and measuring time can be 
another way how to collect information about deployed apps behavior for 
TOP like tool.

David

Aleksandr Shneyderman wrote:
There is also JDJ article in Feb. 2003 Vol 8, Issue 2
on profiling.
It seems from the article that the code will be platform
dependent, cause you would need to write some C/C++
libs.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of
[EMAIL PROTECTED]
Sent: Monday, February 24, 2003 3:36 PM
To: [EMAIL PROTECTED]
Subject: Re: [JBoss-user] TOP like functionality for jboss


måndagen den 24 februari 2003 kl 20.56 skrev Bill Burke:


That WOULD be cool.  Write it! Write it!  But is it even possible to
write
in Java?
Maybe this could be a good starting point :
http://www.yoda.arachsys.com/java/jbench/docs/cputimer.html
I also recall Stefan-A had some thoughts here ...
-


--
http://www.sweb.cz/david.klimek


---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] accessing classes in a .war from classes in a .jar

2003-02-25 Thread SainTiss
Hi,

it seems like accessing classes in a .jar from classes in a .war is
possible if the .jar and .war are in a .ear together.

The other way round however (accessing classes in a .war from classes in
a .jar) seems to be impossible whatsoever. The obvious reason probably
being that the .jar doesn't know it should be looking in
WEB-INF/classes.

Is this correct?

And if so, what does one need to do if one needs to access classes in a
.war from classes in a .jar?

Thanks

Hans


-- 
In a world without walls and fences, who needs windows and gates?

Hans Schippers
1LIC INF
UIA 2002-2003


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


Re: [JBoss-user] Web Services in JBoss 3.2.0RC1

2003-02-25 Thread Neal Sanche
On Tuesday 25 February 2003 03:14 am, jK.MkIII wrote:
 Neal Sanche wrote:
 Hi All,
 
 I've been trying to make a small test web service with JBoss
  3.2.0RC1 and am running into a problem. I've created a .wsr and
  added it to my ear with a web-service.xml that contains the
  following service section:
 
 service name=TestService provider=Handler
 parameter name=handlerClass
 value=org.jboss.net.axis.server.EJBProvider/
 parameter name=beanJndiName
 value=tvtracker/TestSessionLocal/
 parameter name=allowedMethods value=*/
 requestFlow name=TestRequest
 handler
 type=java:org.jboss.net.axis.server.TransactionRequestHandler/
 /requestFlow
 responseFlow name=TestResponse
 handler
 type=java:org.jboss.net.axis.server.SerialisationResponseHandler
 / handler
 type=java:org.jboss.net.axis.server.TransactionResponseHandler/
 /responseFlow
 /service

 Hi,

 I am trying to get my Robocop/repository/Repository bean to be
 visible for SOAP clients but so far I haven't been able to make
 webservices visible, axis servlet doesn't list them or anything.

 I am using 3.2RC1 and I am running out of ideas, or have already
 run out of them several days ago :( I attached my web-service.xml,
 for which I used stuff in this post as example. Those type mappings
 are from our previous prototype that didn't use EJBs, just simple
 java classes.

 Does there exist any usable documentation for Jboss.net? I haven't
 been able to find anything, just couple examples how to make
 webservices ...but they were for jboss 4.0 or 3.0.4 and I couldn't
 make things work following them.

 So if anyone could help me I would be very thankfull, and propably
 guys I should demo our system tomorrow too :P

 I have bean deployed to Robocop/repository/Repository, it has local
 interfaces and 4 methods that I would like to turn into
 webservices. Beans are deployed in EAR and then I have this xml
 file and classes for those types listed in typemappings in WSR.
 JBoss says it deployed package Roborepo.wsr but I can't find
 anything about services said anywhere.

 Should I put WSR into EAR? If so what should I remember to check?
 Does it work same way if WSR is in deploy dir next to EAR?

 Is there something wrong in my xml file?

 Anything?

I'm still somewhat mystified myself about how web services work, but 
every example I've seen adds the .WSR to the .EAR file, and then adds 
a

modulejavayour.wsr/java/module

to the application.xml file. I believe this type of configuration may 
give clues to the classloaders about where to find the classes 
involved, but am unsure about that. Just following the examples that 
I've seen so far.

More definitely needs to be written for people to follow this stuff, I 
agree. Perhaps when I've figured out the details, I'll post something 
up on my website explaining it to any interested parties.

The main thing that I've noticed so far, is that when a service is 
first deployed, it won't be listed by the AxisServlet, but if you try 
and access that service through it's ?wsdl address, and build a 
client for the service (I've tried using Microsoft .NET to create a 
simple client which worked very well for testing) the service is 
actually there and usable. But prior to that first access, the 
AxisServlet will throw and exception when it tries to generate the 
list of available services.

I'm currently using JBoss 3.2.0RC2 which contains Axis 1.0. 

Cheers.

-Neal


---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


RE: [JBoss-user] Web Services in JBoss 3.2.0RC1

2003-02-25 Thread Bill Burke
The only hint I can give you is to look in the jboss testsuite.  Run the
webservices tests.  Do they work?  If so, take a look on how he does things.

Bill

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] Behalf Of jK.MkIII
 Sent: Tuesday, February 25, 2003 3:14 AM
 To: [EMAIL PROTECTED]
 Subject: Re: [JBoss-user] Web Services in JBoss 3.2.0RC1


 Neal Sanche wrote:

 Hi All,
 
 I've been trying to make a small test web service with JBoss 3.2.0RC1
 and am running into a problem. I've created a .wsr and added it to my
 ear with a web-service.xml that contains the following service
 section:
 
 service name=TestService provider=Handler
 parameter name=handlerClass
 value=org.jboss.net.axis.server.EJBProvider/
 parameter name=beanJndiName
 value=tvtracker/TestSessionLocal/
 parameter name=allowedMethods value=*/
 requestFlow name=TestRequest
 handler
 type=java:org.jboss.net.axis.server.TransactionRequestHandler/
 /requestFlow
 responseFlow name=TestResponse
 handler
 type=java:org.jboss.net.axis.server.SerialisationResponseHandler/
 handler
 type=java:org.jboss.net.axis.server.TransactionResponseHandler/
 /responseFlow
 /service
 
 
 Hi,

 I am trying to get my Robocop/repository/Repository bean to be visible
 for SOAP clients but so far I haven't been able to make webservices
 visible, axis servlet doesn't list them or anything.

 I am using 3.2RC1 and I am running out of ideas, or have already run out
 of them several days ago :( I attached my web-service.xml, for which I
 used stuff in this post as example. Those type mappings are from our
 previous prototype that didn't use EJBs, just simple java classes.

 Does there exist any usable documentation for Jboss.net? I haven't been
 able to find anything, just couple examples how to make webservices
 ...but they were for jboss 4.0 or 3.0.4 and I couldn't make things work
 following them.

 So if anyone could help me I would be very thankfull, and propably guys
 I should demo our system tomorrow too :P

 I have bean deployed to Robocop/repository/Repository, it has local
 interfaces and 4 methods that I would like to turn into webservices.
 Beans are deployed in EAR and then I have this xml file and classes for
 those types listed in typemappings in WSR. JBoss says it deployed
 package Roborepo.wsr but I can't find anything about services said
 anywhere.

 Should I put WSR into EAR? If so what should I remember to check? Does
 it work same way if WSR is in deploy dir next to EAR?

 Is there something wrong in my xml file?

 Anything?

 --
   jK.MkIII






---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


RE: [JBoss-user] login-config.xml

2003-02-25 Thread Sonnek, Ryan
could you please provide details on how you package your .sar together?
what do you put in your jboss-service.xml to have it load your embedded
login-config.xml?  if you dynamically deploy this configuration, can a
seperate application (ear file) reference it?

i would love to get this to work for my application.  sounds like it works
great.
Ryan

-Original Message-
From: Torsten Terp [mailto:[EMAIL PROTECTED]
Sent: Tuesday, February 25, 2003 4:36 AM
To: [EMAIL PROTECTED]
Subject: RE: [JBoss-user] login-config.xml


Hi,

Yes you can include the security setup in you ear.

We do it in a sar file contained in the ear, works well!

You could also define your security constraints in server/default/conf,
its really just a question if you need to be able to dynamically deploy 
security configs or a static config is ok for you!

BR
Terp




 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] Behalf Of
 [EMAIL PROTECTED]
 Sent: 25. februar 2003 10:57
 To: [EMAIL PROTECTED]
 Subject: [JBoss-user] login-config.xml
 
 
 Hi all,
 
 I would like to define a security domain for my application using a 
 'login-config.xml' file.
 JMX and JAAS are still not fully clear to me.
 
 Can I directly include that file into my EAR meta-inf ?
 Do I need to create a jboss service (just like in the examples of 
 documentation chap. 8) as a SAR archive ?
 Should I just put my file in server/default/conf ?
 
 Regards,
 
 --
 --
 Sebastien Petrucci
 Java Technology Consultant - Altran Europe
 Philips Remote Control Systems
 Interleuvenlaan 74-76, B-3001 Leuven (Belgium)
 M +32(0)497502521T  +32(0)16394 598
 --
 --
 
 
 ---
 This sf.net email is sponsored by:ThinkGeek
 Welcome to geek heaven.
 http://thinkgeek.com/sf
 ___
 JBoss-user mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/jboss-user
 



---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] Jboss new bie startup Problem

2003-02-25 Thread Rod Macpherson
There's no default application so try http://localhost:8080/jmx-console
(jboss, um, console) or create a .war directory in deploy and throw an
html or jsp file in there: HTML yo! /HTML.

.../deploy/john.war/test.html




- Original Message -
From: John Kunchandy [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: Rod Macpherson [EMAIL PROTECTED]
Sent: Tuesday, February 25, 2003 1:41 AM
Subject: Re: [JBoss-user] Jboss new bie startup Problem


 Hi Rod

 I have re-installed the jboss-3.0.6_tomcat-4.1.18 bundle in my PC.

 Now I am able to start both servers without an error being thrown up
 regarding the Context but when I try to access http://localhost:8080/
or
 http://192.168.10.28:8080/  192.168.10.28 being my PC's IP I am thrown
this
 eror by Tomcat.

 Error:

 type:  Status report

 message :  No Context configured to process this request

 message :  The server encountered an internal error (No Context configured
 to process this request) that prevented it from fulfilling this request.

 I have checked the server.xml
file(JBOSS_HOME/tomcat-4.1.x/conf/server.xml)
 of tomcat and by default it is set to the tomcat\webapps\ROOT folder .This
 is proved because when I start  tomcat alone I am able to see the default
 Tomcat page at the URL mentioned above but Jboss says :

 14:49:52,323 INFO  [Engine] StandardHost[localhost]: MAPPING configuration
 error
  for request URI /

 How is it possible that Jboss is starting tomcat but it does not find the
 folder to which the context has been set in the server.xml file of
 tomcat(jboss_home/tomcat-4.1.x/conf/server.xml) .If not there when where
is
 it looking for the context ?If I were running tomcat alone then I would
have
 needed to only modify server.xml in  Tomcat.But when JBOSS starts Tomcat
it
 sems not to be able to find the server.xml file  of Tomcat to set the
 COntext ... or else it seems to be looking in a different file for the
 Context  . I do not know which of these is true.Could you please guide me
as
 to which xml  file I should modify to be able to get the Tomcat server to
 lookup the right context.By altering the server.xml in Tomcat it seems to
be
 having no effect since Jboss still does not find the index.jsp file in the
 context set.

 I hope I have been able to bring forth my difficulty clearly and I am
 thankful to all who are reading my mails and trying to help me out
 especially Rod   and Eric.Kindly point me in the right direction.

 Thanks and Best Regards

 John Kunchandy

 - Original Message -
 From: Rod Macpherson [EMAIL PROTECTED]
 To: John Kunchandy [EMAIL PROTECTED]
 Sent: Tuesday, February 25, 2003 1:36 PM
 Subject: Re: [JBoss-user] Jboss new bie startup Problem


 : Not sure where you are getting the advice on setting classpath and path
 : environment variables. I would not mess with either of those except to
 : remove CLASSPATH completely since it is problematic. Unzip JBoss and set
 you
 : JDK_HOME and JBOSS_HOME. The only thing you might want to add to your
path
 : is the JDK bin directory. Make sure you have driver letters where
 : appropriate.
 :



 ---
 Outgoing mail is certified Virus Free.
 Checked by AVG anti-virus system (http://www.grisoft.com).
 Version: 6.0.456 / Virus Database: 256 - Release Date: 2/18/2003



 ---
 This sf.net email is sponsored by:ThinkGeek
 Welcome to geek heaven.
 http://thinkgeek.com/sf
 ___
 JBoss-user mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/jboss-user



---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] JBOSS Exception Clarification

2003-02-25 Thread David Jencks
Exactly which 3.2 and can you provide more stack trace and the context of
code that produces it?

If 3.2RC2 could you try 3.2 from cvs?  There were a couple of problems with
RC2 I fixed.

thanks
david jencks


On 2003.02.25 11:01 Corbin, James wrote:
 Hello,
 
  
 
 With 3.2 I started receiving this error and am curious what this error is
 implying so I can clean up my code.
 
 I realize it is an informational message.  Is it saying that it is trying
 to
 grab an invalid connection from the pool?
 
  
 
 09:01:05,749 INFO  [TxConnectionManager$TxConnectionEventListener]
 throwable
 from unregister connection
 
 java.lang.IllegalStateException: Trying to return an unknown connection2!
 [EMAIL PROTECTED]
 
 at
 org.jboss.resource.connectionmanager.CachedConnectionManager.unregisterConne
 ction(CachedConnectionManager.java:274)
 
  
 
 TIA
 
 
 This electronic message transmission contains information from the
 Company that may be proprietary, confidential and/or privileged.
 The information is intended only for the use of the individual(s) or
 entity named above.  If you are not the intended recipient, be
 aware that any disclosure, copying or distribution or use of the contents
 of this information is prohibited.  If you have received
 this electronic transmission in error, please notify the sender
 immediately by replying to the address listed in the From: field.
 
 
 html
 
 head
 META HTTP-EQUIV=Content-Type CONTENT=text/html; charset=us-ascii
 
 
 meta name=Generator content=Microsoft Word 10 (filtered)
 
 style
 !--
  /* Style Definitions */
  p.MsoNormal, li.MsoNormal, div.MsoNormal
   {margin:0in;
   margin-bottom:.0001pt;
   font-size:12.0pt;
   font-family:Times New Roman;}
 a:link, span.MsoHyperlink
   {color:blue;
   text-decoration:underline;}
 a:visited, span.MsoHyperlinkFollowed
   {color:purple;
   text-decoration:underline;}
 p
   {margin-right:0in;
   margin-left:0in;
   font-size:12.0pt;
   font-family:Times New Roman;}
 span.EmailStyle17
   {font-family:Arial;
   color:windowtext;}
 @page Section1
   {size:8.5in 11.0in;
   margin:1.0in 1.25in 1.0in 1.25in;}
 div.Section1
   {page:Section1;}
 --
 /style
 
 style
 p.MsoNormal
   {margin-left:18.75pt;}
 /style
 /head
 
 body lang=EN-US link=blue vlink=purple
 style='margin-left:18.75pt;margin-top:
 18.75pt'
 
 div class=Section1
 
 p class=MsoNormalfont size=2 face=Arialspan style='font-size:10.0pt;
 font-family:Arial'Hello,/span/font/p
 
 p class=MsoNormalfont size=2 face=Arialspan style='font-size:10.0pt;
 font-family:Arial'nbsp;/span/font/p
 
 p class=MsoNormalfont size=2 face=Arialspan style='font-size:10.0pt;
 font-family:Arial'With 3.2 I started receiving this error and am curious
 what
 this error is implying so I can clean up my code./span/font/p
 
 p class=MsoNormalfont size=2 face=Arialspan style='font-size:10.0pt;
 font-family:Arial'I realize it is an informational message.nbsp; Is it
 saying that
 it is trying to grab an invalid connection from the
 pool?/span/font/p
 
 p class=MsoNormalfont size=2 face=Arialspan style='font-size:10.0pt;
 font-family:Arial'nbsp;/span/font/p
 
 p class=MsoNormal style='margin-left:18.75pt'font size=2
 face=Arialspan
 style='font-size:10.0pt;font-family:Arial'09:01:05,749 INFOnbsp;
 [TxConnectionManager$TxConnectionEventListener]
 throwable from unregister connection/span/font/p
 
 p class=MsoNormal style='margin-left:18.75pt'font size=2
 face=Arialspan
 style='font-size:10.0pt;font-family:Arial'java.lang.IllegalStateException:
 Trying to return an unknown connection2!
 [EMAIL PROTECTED]/span/font/p
 
 p class=MsoNormal style='margin-left:18.75pt'font size=2
 face=Arialspan
 style='font-size:10.0pt;font-family:Arial'nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;
 at
 org.jboss.resource.connectionmanager.CachedConnectionManager.unregisterConnection(CachedConnectionManager.java:274)/span/font/p
 
 p class=MsoNormalfont size=2 face=Arialspan style='font-size:10.0pt;
 font-family:Arial'nbsp;/span/font/p
 
 p class=MsoNormalfont size=2 face=Arialspan style='font-size:10.0pt;
 font-family:Arial'TIA/span/font/p
 
 /div
 
 PRE
 This electronic message transmission contains information from the
 Company that may be proprietary, confidential and/or privileged.
 The information is intended only for the use of the individual(s) or
 entity named above.  If you are not the intended recipient, be
 aware that any disclosure, copying or distribution or use of the contents
 of this information is prohibited.  If you have received
 this electronic transmission in error, please notify the sender
 immediately by replying to the address listed in the From: field.
 /PRE
 /body
 
 /html
 
 
 


---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
JBoss-user mailing list
[EMAIL PROTECTED]

RE: [JBoss-user] JBOSS Exception Clarification

2003-02-25 Thread Corbin, James








Never mind. I found the offending code. Apologize
for the wasted bandwidth.





-Original Message-
From: Corbin, James
[mailto:[EMAIL PROTECTED] 
Sent: Tuesday, February 25, 2003 9:02
AM
To:
[EMAIL PROTECTED]
Subject: [JBoss-user] JBOSS
Exception Clarification



Hello,



With 3.2 I started receiving this
error and am curious what this error is implying so I can clean up my code.

I realize it is an informational
message. Is it saying that it is trying to grab an invalid connection
from the pool?



09:01:05,749 INFO
[TxConnectionManager$TxConnectionEventListener] throwable from unregister
connection

java.lang.IllegalStateException:
Trying to return an unknown connection2!
[EMAIL PROTECTED]


at org.jboss.resource.connectionmanager.CachedConnectionManager.unregisterConnection(CachedConnectionManager.java:274)



TIA

This electronic message transmission contains information from the Company that may be proprietary, confidential and/or privileged.The information is intended only for the use of the individual(s) or entity named above. If you are not the intended recipient, beaware that any disclosure, copying or distribution or use of the contents of this information is prohibited. If you have receivedthis electronic transmission in error, please notify the sender immediately by replying to the address listed in the From: field.


This electronic message transmission contains information from the Company that may be proprietary, confidential and/or privileged.
The information is intended only for the use of the individual(s) or entity named above.  If you are not the intended recipient, be
aware that any disclosure, copying or distribution or use of the contents of this information is prohibited.  If you have received
this electronic transmission in error, please notify the sender immediately by replying to the address listed in the "From:" field.








Re: [JBoss-user] classpath for JSP compiling

2003-02-25 Thread Rod Macpherson
To deploy a JSP-based application we have to know what classes are required
so I think that requirement can be stipulated as part of the ant JSP task.
As far as including files it would be useful to promote a convension whereby
included JSPs have the .jsi extension (or something) to distinguish them
from files that need to be compiled. I guess what we need from JBoss is a
contract that says JSPs have the following package structure and they are
placed in the following directories on Unix and Windows. If Jasper no longer
handles package generation automatically (just one level as far as I can
tell) then I will write an Ant task to automate this.

Here's a scenario. We do a build and deploy and three or four or half a
dozen QA people jump on this system to test. JSPs are being compiled
everywhere and the system bogs down and it makes adds dead time to the
testing cycle. Also, if there's an error on a JSP page (there are hundreds
of them) we want to catch that at build time.

Here's another scenario. I am running an automated test that spiders through
the webpages to measure performance under load and to determine capacity.
The initial results are throw-away because of the JSP compilation issue.
That would be nice to avoid but it's not a show-stopper that we have to run
the tests serveral times.

Rod

- Original Message -
From: Jules Gosnell [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, February 25, 2003 2:31 AM
Subject: Re: [JBoss-user] classpath for JSP compiling


Guys,

I understand that it would be nice for you not to have to worry about
when/how your JSPs get compiled.

This fn-ality should be a part of Jasper. I only do the Jetty/JBoss
integration.

If you really want it, and I am always dealing with traffic on this
subject - so many people do, then you should find the Jasper project at
jakarta.apache.org and suggest it to them.

Good luck,


Jules


Thorbjørn Ravn Andersen wrote:

 Jules Gosnell wrote:

 This step is problematic to perform in an automated manner, due to
 the need for development time knowledge (which jsps are servlets and
 which are just included, etc...).


 I understand there is a problem detecting this automatically, but
 would it be hard to implement given a configuration file snippet
 saying exactly which files to compile?
 I read the FAQ and found that there is a convoluted code sample which
 apparently maintains such a snippet (it is not easy to understand
 without running it).This may be adapted to provide such a list.

 My current approach is to use the ?jsp_precompile feature, but that is
 also hard to automate as it is difficult to estimate when the
 asynchronic deployment with JBoss is finished so Jetty is ready to
 serve pages.

 I understand that the Trifork J2EE server can do this.  Perhaps it is
 a nice feature to have?






This email has been scanned for all viruses by the MessageLabs SkyScan
service. For more information on a proactive anti-virus service working
around the clock, around the globe, visit http://www.messagelabs.com



---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user




---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] Can't access a Bean using RMI/IIOP

2003-02-25 Thread Gerard BUNEL
Hello,

I encounter a probleme in one of my EJB when this one tries to get a
reference on another EJB which may
be (or may not be) located on another host/server. I use the following code
where a_Context is long a String
of kind IOR:... refering to a root CosNaming provided by JBoss (JacORB in
fact)

try {
  java.util.Properties p = new java.util.Properties();
  p.put(Context.PROVIDER_URL, a_Context);
  ic = new InitialContext(p);

  Object o = ic.lookup( EJBCTIProxy);
  EJBCTIProxyHome home = (EJBCTIProxyHome)PortableRemoteObject.narrow(
o, EJBCTIProxyHome.class);
  ic.close();
  // EJB creation
  EJBCTIProxy delegate = home.create();
  return delegate;
} catch (Exception ne) {
  throw new CreateException(ne.getMessage());
} finally {
  if (ic != null)
  try { ic.close(); } catch (Exception e) {}
}

 the lookup fails with the exception printed below.
I understand that should have added the line to solve the problem:

p.put(Context.INITIAL_CONTEXT_FACTORY, some.class.from.jacorb);

But I would like to avoid this solution as it is not portable from one
server to another. The class name is different
in BEA WebLogic for example. So, Is there another soulution ?


17:30:19,206 WARN  [NamingContext] Failed to connect to IOR:1099
javax.naming.CommunicationException: Failed to connect to server IOR:1099.
Root
 exception is
javax.naming.ServiceUnavailableException: Failed to connect to server
IOR:1099.
 Root exception is
java.net.UnknownHostException: IOR
at java.net.InetAddress.getAllByName0(InetAddress.java:920)
at java.net.InetAddress.getAllByName0(InetAddress.java:890)
at java.net.InetAddress.getAllByName(InetAddress.java:884)
at java.net.InetAddress.getByName(InetAddress.java:814)
at
org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory
.java:61)
at
org.jnp.interfaces.NamingContext.getServer(NamingContext.java:159)
at
org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1029)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:450)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:443)
at javax.naming.InitialContext.lookup(InitialContext.java:347)
at
com.ftrd.cti.ejb.EJBCTIClientProxyBean.createServer(EJBCTIClientProxy
Bean.java:192)

Gerard BUNEL

--
[EMAIL PROTECTED] - Atlantide - http://www.ago.fr/atlantide/
Technopole Brest Iroise BP 80802 - 29608 Brest cedex - France -
Tel. : +33 (0)2 98 05 43 21 - Fax. : +33 (0)2 98 05 20 34 - e-mail:
[EMAIL PROTECTED]
Centre Affaires Oberthur - 74D, rue de Paris -  35700 Rennes - France
Tel. : +33 (0)2 99 84 15 84 - Fax : +33 (0)2 99 84 15 85 - e-mail:
[EMAIL PROTECTED]




---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] Web Services in JBoss 3.2.0RC1

2003-02-25 Thread Michael Bennett
I agree there are no docs at all on this subject that are really any
use, anyone who does come up with something good please let us all know
or perhaps get added to the jboss cvs tree somewhere.

In the meanwhile have a look a Bruce Sharlaus excellent stuff if you
havent already.

http://www.csd.abdn.ac.uk/~bscharla/teaching/mtp_software/jboss/jboss-ne
t-EJB-example.shtml


Regards

Michael


---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


RE: [JBoss-user] login-config.xml

2003-02-25 Thread Torsten Terp
Hi

Sure, here it is:

foo.ear
  datasource.sar
  security.sar
  foo.war
  foo.jar

where security.sar looks like:

  security.sar
Meta-inf
  Manifest
  jboss-service.xml
  login-config.xml

where jboss-service.xml contains:

server
   mbean code=com.acme.mbean.security.SecurityConfig
name=acme:service=AcmeSecurityLoginConfig
  attribute name=AuthConfigMETA-INF/login-config.xml/attribute
  attribute
name=SecurityConfigNamejboss.security:name=SecurityConfig/attribute
   /mbean
/server

and login-config.xml contains:

policy
application-policy name = AcmeRealm
  authentication
login-module code =
org.jboss.security.auth.spi.DatabaseServerLoginModule flag = required
  module-option name = dsJndiNamejava:/AcmeDS/module-option
  module-option name = principalsQuerysql select password
string/module-option
  module-option name = rolesQuerysql select role
string/module-option
/login-module
  /authentication
/application-policy
/policy

and finally the source for the mbean com.acme.mbean.security.SecurityConfig

This the implementation: SecurityConfig.java

package com.acme.mbean.security;

import java.net.URL;
import java.util.Hashtable;
import javax.management.MBeanServer;
import javax.management.ObjectName;
import org.jboss.security.auth.login.XMLLoginConfig;
import org.jboss.system.ServiceMBeanSupport;

/**
 * A security config mbean that loads an xml login configuration and
 * pushes a XMLLoginConfig instance onto the the config stack managed by
 * the SecurityConfigName mbean(default=jboss.security:name=SecurityConfig).
 *
 **/
public class SecurityConfig extends ServiceMBeanSupport
   implements com.netmill.dmmbase.mbean.security.SecurityConfigMBean
{
   // Constants -

   // Attributes 
   private String authConf = login-config.xml;
   private XMLLoginConfig config = null;
   private ObjectName mainSecurityConfig;

   // Static 

   // Constructors --
   public SecurityConfig()
   {
  setSecurityConfigName(jboss.security:name=SecurityConfig);
   }

   // Public 
   /**
* Get the name
**/
   public String getName()
   {
  return JAAS Login Config;
   }

   /**
* Get securityConfigName
**/
   public String getSecurityConfigName()
   {
  return mainSecurityConfig.toString();
   }

   /**
* Set securityConfigName
**/
   public void setSecurityConfigName(String objectName)
   {
  try
  {
 mainSecurityConfig = new ObjectName(objectName);
  }
  catch(Exception e)
  {
 log.error(Failed to create ObjectName, e);
  }
   }

   /**
* Get the resource path to the JAAS login configuration file to use.
**/
   public String getAuthConfig()
   {
  return authConf;
   }

   /**
* Set the resource path to the JAAS login configuration file to use.
* The default is login-config.xml.
**/
   public void setAuthConfig(String authConf)
   {
  this.authConf = authConf;
   }

   // Protected 
   /**
* Start the service.
**/
   protected void startService() throws Exception
   {
  // Look for the authConf as resource
  ClassLoader loader = Thread.currentThread().getContextClassLoader();
  URL loginConfig = loader.getResource(authConf);
  if( loginConfig != null )
  {
 String securityConfigName = AcmeConfig;
 log.info(Using securityConfigName: '+securityConfigName+');
 log.info(Using JAAS AuthConfig: +loginConfig.toExternalForm());
 config = new XMLLoginConfig();
 config.setConfigURL(loginConfig);
 config.start();
 MBeanServer server = super.getServer();
 ObjectName name = super.getServiceName();
 Hashtable props = name.getKeyPropertyList();
 props.put(securityConfigName, XMLLoginConfig);
 name = new ObjectName(name.getDomain(), props);
 server.registerMBean(config, name);
 Object[] args = {name.toString()};
 String[] sig = {String.class.getName()};
 server.invoke(mainSecurityConfig, pushLoginConfig, args, sig);
  }
  else
  {
 log.warn(No AuthConfig resource found);
  }
   }

   /**
* Stop the service.
**/
   protected void stopService() throws Exception
   {
  String securityConfigName = AcmeConfig;
  log.info(Using securityConfigName: '+securityConfigName+');
  MBeanServer server = super.getServer();
  ObjectName name = super.getServiceName();
  Hashtable props = name.getKeyPropertyList();
  props.put(securityConfigName, XMLLoginConfig);
  name = new ObjectName(name.getDomain(), props);
  Object[] args = {};
  String[] sig = 

[JBoss-user] JBoss.net and holders?

2003-02-25 Thread jK.MkIII
Is it possibly to use holders with Jboss.net? Meaning we have interface 
we must make our EJB server to implement. And couple methods have these 
holders, arguments that work as return values, and we just noticed that 
those didn't work :(

When EJB method is called those holders are null and it didn't help even 
we tried to initialize them in method. After method exited AXIS throws 
null pointer exception..

--
 jK.MkIII




---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] Web Services in JBoss 3.2.0RC1

2003-02-25 Thread Neal Sanche
On Thursday 13 February 2003 01:50 am, Neal Sanche wrote:
 But, when I go to the axis servlet page that lists the wsdl links,
 I got a NullPointerException in

 org.jboss.net.axis.server.EJBProvider.getServiceClass(EJBProvider.j
ava:162)

 I added a bit of code to figure out exactly what was null there,
 and it turns out that in this case, the variable msgContext is
 null. I really don't know what's going on. What has led me down
 this dark path, late at night? Can someone assist?

I thought I'd follow up to my own post with some information that I've 
managed to gather with the help of Dr. Jung and various other 
sources. The web services in JBoss 3.2.0RC2 do work, and I've been 
able to make some simple calls to unprotected (ie. not protected with 
security domains) web services, and I have been able to get an 
'access denied' exception on an attempt to access a protected web 
service.

By far, the easiest way to accomplish this is to use an xdoclet 1.2 
plugin module that is being developed by the JBoss.NET crew in the 
HEAD of the jboss CVS repository. For your convenience, I thought I'd 
also put up a recent binary version of this plugin on my website 
temporarily for those who would rather avoid the details of creating 
it yourself. http://www.nsdev.org/jboss contains a detailed 
description of how I've been playing with this web service stuff as 
well as the xdoclet 1.2beta2 module for enabling web service 
deployment descriptor creation within your ANT build scripts.

Hope this is useful for all of you web service experimentors. Thanks 
Dr. Jung for the help today.

-Neal


---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


RE: [JBoss-user] JAAS authentication with server side accounting

2003-02-25 Thread Sebastian Hauer
Hi Vladimir,


 Try implement own login-module which checks if was XXX login 
 failures. 
 ( see code in 
 $JBOSS-SRC/security/src/main/org/jboss/security/auth/spi ). 
 Then set-up this module into application-policy in 
 login-config.xml with flag=required.

Yes this was my first idea as well.  I know I can implement a JAAS login
module for the client side which will get invoked under and
circumstances.  But I need to account for the login failures on the
server side.  I don't want to implement a client side JAAS login module
which will account for failed logins and than invoke a unsecured bean
method so that these information get stored on the server side.  This
would just be to unsafe.  I want to account for the login failure where
they get checked on the server side.

- Sebastian


---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] JBOSS Application Logging

2003-02-25 Thread Corbin, James








Is anyone out there in the JBOSS user community using Log4J as their
application logging facility and configuring it with their own config file
independent of JBOSS's log4J configuration.



If so, I'd like to talk to you about how you managed it? 



Thanks,

J.D.




This electronic message transmission contains information from the Company that may be proprietary, confidential and/or privileged.
The information is intended only for the use of the individual(s) or entity named above.  If you are not the intended recipient, be
aware that any disclosure, copying or distribution or use of the contents of this information is prohibited.  If you have received
this electronic transmission in error, please notify the sender immediately by replying to the address listed in the "From:" field.








RE: [JBoss-user] Web Services in JBoss 3.2.0RC1

2003-02-25 Thread Bill Burke
Thank you for following up Neal.

Bill

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] Behalf Of Neal Sanche
 Sent: Tuesday, February 25, 2003 3:14 PM
 To: [EMAIL PROTECTED]
 Subject: Re: [JBoss-user] Web Services in JBoss 3.2.0RC1
 
 
 On Thursday 13 February 2003 01:50 am, Neal Sanche wrote:
  But, when I go to the axis servlet page that lists the wsdl links,
  I got a NullPointerException in
 
  org.jboss.net.axis.server.EJBProvider.getServiceClass(EJBProvider.j
 ava:162)
 
  I added a bit of code to figure out exactly what was null there,
  and it turns out that in this case, the variable msgContext is
  null. I really don't know what's going on. What has led me down
  this dark path, late at night? Can someone assist?
 
 I thought I'd follow up to my own post with some information that I've 
 managed to gather with the help of Dr. Jung and various other 
 sources. The web services in JBoss 3.2.0RC2 do work, and I've been 
 able to make some simple calls to unprotected (ie. not protected with 
 security domains) web services, and I have been able to get an 
 'access denied' exception on an attempt to access a protected web 
 service.
 
 By far, the easiest way to accomplish this is to use an xdoclet 1.2 
 plugin module that is being developed by the JBoss.NET crew in the 
 HEAD of the jboss CVS repository. For your convenience, I thought I'd 
 also put up a recent binary version of this plugin on my website 
 temporarily for those who would rather avoid the details of creating 
 it yourself. http://www.nsdev.org/jboss contains a detailed 
 description of how I've been playing with this web service stuff as 
 well as the xdoclet 1.2beta2 module for enabling web service 
 deployment descriptor creation within your ANT build scripts.
 
 Hope this is useful for all of you web service experimentors. Thanks 
 Dr. Jung for the help today.
 
 -Neal
 
 
 ---
 This sf.net email is sponsored by:ThinkGeek
 Welcome to geek heaven.
 http://thinkgeek.com/sf
 ___
 JBoss-user mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/jboss-user


---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


RE: [JBoss-user] How to configure durable topic in 3.0.x

2003-02-25 Thread Demyanovich, Craig - Apogent
I spoke too soon; I have not found enough information to create a working
durable subscription configuration.  I would appreciate very much if someone
would post working examples of the relevant files or would provide some
instructions.  I just can't tell at this point if I have one thing wrong in
one place or many things wrong in many places.  Here is a snippet of the
error that I receive at deployment for my topics:

2003-02-25 15:44:29,571 WARN
[org.jboss.ejb.plugins.jms.JMSContainerInvoker] JMS provider failure
detected: 
org.jboss.mq.SpyJMSException: Cannot subscribe to this Destination: null; -
nested throwable: (java.lang.NullPointerException)
at org.jboss.mq.Connection.addConsumer(Connection.java:974)
at
org.jboss.mq.SpyConnectionConsumer.init(SpyConnectionConsumer.java:73)
at
org.jboss.mq.SpyConnection.createDurableConnectionConsumer(SpyConnection.jav
a:102)
at
org.jboss.ejb.plugins.jms.JMSContainerInvoker.innerCreate(JMSContainerInvoke
r.java:744)
at
org.jboss.ejb.plugins.jms.JMSContainerInvoker.startService(JMSContainerInvok
er.java:824)
at
org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:165)
at
org.jboss.ejb.MessageDrivenContainer.start(MessageDrivenContainer.java:200)
at org.jboss.ejb.Container.invoke(Container.java:756)
at
org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
at
org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.jav
a:978)
at $Proxy5.start(Unknown Source)
at
org.jboss.system.ServiceController.start(ServiceController.java:398)
at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at
org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispat
cher.java:284)
at
org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174)
at $Proxy66.start(Unknown Source)
at org.jboss.ejb.EjbModule.startService(EjbModule.java:430)
at
org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:165)
at sun.reflect.GeneratedMethodAccessor18.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at
org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispat
cher.java:284)
at
org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
at
org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.jav
a:978)
at $Proxy5.start(Unknown Source)
at
org.jboss.system.ServiceController.start(ServiceController.java:398)
at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at
org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispat
cher.java:284)
at
org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174)
at $Proxy11.start(Unknown Source)
at org.jboss.ejb.EJBDeployer.start(EJBDeployer.java:395)
at org.jboss.deployment.MainDeployer.start(MainDeployer.java:807)
at org.jboss.deployment.MainDeployer.start(MainDeployer.java:799)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:621)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:585)
at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at
org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispat
cher.java:284)
at
org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174)
at $Proxy4.deploy(Unknown Source)
at
org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanne
r.java:435)
at
org.jboss.deployment.scanner.URLDeploymentScanner.scanDirectory(URLDeploymen
tScanner.java:656)
at
org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.
java:507)
at
org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(Abstract
DeploymentScanner.java:261)
at
org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:165)
at sun.reflect.GeneratedMethodAccessor7.invoke(Unknown Source)
at

Re: [JBoss-user] Form based authentication

2003-02-25 Thread Guy Rouillier
I can share what we do using form-based authentication.  We've rolled
our own authentication mechanism, and have JBoss and Tomcat on different
servers.  This may be what you mean by login form on each page - I'm
not clear.  At any rate, at the top of each page, the developer has

%@ include file=/common/html/authenheader.jsp %

and at the bottom is

%@ include file=/common/html/authentrailer.jsp %

The header opens a try block.  In there, it checks the session to see if
the user is logged on.  If not, it stores request.getRequestURI in the
session and redirects to login_form.jsp.  In login_hdlr.jsp, if the
userid and password validate, the session is updated and a redirect to
the stored target is executed.  authentrailer closes the try block and
handles exceptions.

- Original Message -
From: Silvester van der Bijl [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, February 24, 2003 8:22 PM
Subject: Re: [JBoss-user] Form based authentication


David,

Thanks for the suggestion. I do have a login form on each page (that is
until the user logs in :-) ).  I did think of something like you're
describing, but I just figured there had to be a better way.

I found some more information on that AuthenticationInterceptor, but as
far I can figure, you can't tell JBoss/Jetty to use a different
interceptor for this.

Besides, it seems kind of overkill to write a custom class just to allow
direct requests to a login page

Any other thoughts ?

Silvester

citaat van=David Ward
 Silvester,

 I'll share what I do.  I have a single servlet that is a central
 controller that delegates processing and dispatches requests to jp's
 (based on pathInfo).  However, *I have 2 servlet mappings to it*.

 /myapp/web/pathInfo - myapp is the context, web is the servlet,
pathInfo
 (and request params) tell me how to process and where to request
 dispatch to.

 /myapp/sweb/pathInfo - same as above except sweb (notice the s) is a
 different mapping *to the same servlet*, except it also is a web
 protected resource.

 I have a dynamic login/logout link on each page (based on principal in
 request), which simply links back to itself except replacing web
with
 sweb.  After the user logs in, he/she ends up visually back to where
 he/she started, though the path in the url is a bit different.

 Now, it sounds like you have an actual login form on each of your
pages.
  I've not done that, but I'm guessing you could do the same thing as
me,
 except just pass along the username and password to a dummy login with
 no display that onLoad (JavaScript) simply submits for you.  But 1)
that
 seems hokey, and 2) you would want to make sure you're using SSL
 otherwise your username and password are plain-text'ing over the net.
 What do other people do in this circumstance?

 David

 --

 Mensaje citado por Silvester van der Bijl
[EMAIL PROTECTED]:

 Hi there,

 We've got a web application which on each page displays a login box
if
 the user isn't authenticated, or otherwise his personal menu, etc...

 The problem is, that after succesfully authenticating a user
 (j_security_check target), jetty doesn't know where to redirect the
 user to since I made a direct request to the login page (sort of).

 Shouldn't there be an additional property for j_security_check, like
 j_onsuccess_redirect_to ?

 Does anyone know of a workaround for this problem ? I've read about
 using a custom AuthenticationInterceptor, only I can't find where
this
 interceptor is configured ?

 Please help.
 Silvester


 ---
 This sf.net email is sponsored by:ThinkGeek
 Welcome to geek heaven.
 http://thinkgeek.com/sf
 ___
 JBoss-user mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/jboss-user





---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] Confused about Web Service Security...

2003-02-25 Thread Neal Sanche
Hi All,

Now that I have a simple web service running with JBoss.NET I'm now 
trying to enable access to a web service method that's secured by 
principals and roles within my EJB application. I'm completely 
confused about how to accomplish this on JBoss. Do I need to set up a 
security-constraint in my web.xml for this? So far, nothing that I've 
tried has sent a username and password from my client application to 
my web service. If anyone is doing this, please let me know how it's 
done. I'll post the findings up on my website as a future reference.

-Neal


---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] Jetty and form based authentication

2003-02-25 Thread Silvester van der Bijl
Hello,

I'm (still) trying to implement a web application for my school project.
The idea is that everybody is allowed to see e.g. the default page (news),
but only authenticated users can e.g. access grades.

So far, no problem.

The web application builds up a menu based on the roles the user has. If
the user isn't authenticated the menu won't display items for which the
user has no privileges.

On each page there is a login box with a target of j_security_check. Here
I encountered the first problem. Jetty (and Tomcat) don't support direct
requests to the login page (which I'm doing).

Browsing through the sourcecode of jetty I found that jetty checks a
session variabele called org.mortbay.jetty.URI to see where it should
redirect the request after a succesfull login (see code below for snippet
from FormAuthenticator).

If I set this session variabele from my pages, all works fine. Except
getUserPrincipal only returns the principal when accessing a protected
resource.

This is definitely not what I want. I want to be able to tell who is
viewing a page even if no security restrictions apply. Does anyone know
how to change this behavior ?

Thx in advance.




 CODE FROM FormAuthenticator

   public UserPrincipal authenticated(UserRealm realm,
   String pathInContext,
   HttpRequest httpRequest,
   HttpResponse httpResponse)
throws IOException
{
HttpServletRequest request
=(ServletHttpRequest)httpRequest.getWrapper();
HttpServletResponse response =(HttpServletResponse)
httpResponse.getWrapper();

// Handle paths
String uri = pathInContext;

// Setup session
HttpSession session=request.getSession(true);

// Handle a request for authentication.
if (
uri.substring(uri.lastIndexOf(/)+1).startsWith(__J_SECURITY_CHECK)
)
{
// Check the session object for login info.
String username = request.getParameter(__J_USERNAME);
String password = request.getParameter(__J_PASSWORD);

UserPrincipal user =
realm.authenticate(username,password,httpRequest);
String nuri=(String)session.getAttribute(__J_URI);
if (user!=null  nuri!=null)
{
Code.debug(Form authentication OK for ,username);
httpRequest.setAuthType(SecurityConstraint.__FORM_AUTH);
httpRequest.setAuthUser(username);
httpRequest.setUserPrincipal(user);
session.setAttribute(__J_AUTHENTICATED,user);
response.sendRedirect(response.encodeRedirectURL(nuri));
}
else
{
Code.debug(Form authentication FAILED for ,username);
if (_formErrorPage!=null)
response.sendRedirect(response.encodeRedirectURL
  (URI.addPaths(request.getContextPath(),
_formErrorPage)));
else
response.sendError(HttpResponse.__403_Forbidden);
}

// Security check is always false, only true after final
redirection.
return null;
}

// Check if the session is already authenticated.
UserPrincipal user = (UserPrincipal)
session.getAttribute(__J_AUTHENTICATED);
if (user != null)
{
if (user.isAuthenticated())
{
Code.debug(FORM Authenticated for ,user.getName());
httpRequest.setAuthType(SecurityConstraint.__FORM_AUTH);
httpRequest.setAuthUser(user.getName());
httpRequest.setUserPrincipal(user);
return user;
}
}

// Don't authenticate authform or errorpage
if (pathInContext!=null 
pathInContext.equals(_formErrorPage) ||
pathInContext.equals(_formLoginPage))
return SecurityConstraint.__NOBODY;

// redirect to login page
if (httpRequest.getQuery()!=null)
uri+=?+httpRequest.getQuery();
session.setAttribute(__J_URI,
URI.addPaths(request.getContextPath(),uri));

response.sendRedirect(response.encodeRedirectURL(URI.addPaths(request.getContextPath(),
   _formLoginPage)));
return null;
}






---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


RE: [JBoss-user] How to configure durable topic in 3.0.x

2003-02-25 Thread Sebastian Hauer

Attached you will find a sample configuration that should work.
How do you connect to the durable subscribers?

TopicConnectionFactory tcf = (TopicConnectionFactory)
ctx.lookup(jmsTopicConnectionFactoryJndiName);
conn = tcf.createTopicConnection(tester, password);
topic = (Topic) ctx.lookup(topic/TEST);
session = conn.createTopicSession(false,
TopicSession.AUTO_ACKNOWLEDGE);
publisher = session.createPublisher(topic);
conn.start();
subscriber = session.createDurableSubscriber(topic,
testSubscription);

Hope this helps,
Sebastian

 -Original Message-
 From: Demyanovich, Craig - Apogent [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, February 25, 2003 4:52 PM
 To: '[EMAIL PROTECTED]'
 Subject: RE: [JBoss-user] How to configure durable topic in 3.0.x
 
 
 I spoke too soon; I have not found enough information to 
 create a working durable subscription configuration.  I would 
 appreciate very much if someone would post working examples 
 of the relevant files or would provide some instructions.  I 
 just can't tell at this point if I have one thing wrong in 
 one place or many things wrong in many places.  Here is a 
 snippet of the error that I receive at deployment for my topics:
 
 2003-02-25 15:44:29,571 WARN 
 [org.jboss.ejb.plugins.jms.JMSContainerInvoker] JMS provider failure
 detected: 
 org.jboss.mq.SpyJMSException: Cannot subscribe to this 
 Destination: null; - nested throwable: 
 (java.lang.NullPointerException)
   at org.jboss.mq.Connection.addConsumer(Connection.java:974)
   at
 org.jboss.mq.SpyConnectionConsumer.init(SpyConnectionConsume
 r.java:73)
   at 
 org.jboss.mq.SpyConnection.createDurableConnectionConsumer(Spy
...
?xml version=1.0 encoding=UTF-8?
StateManager
	Users
		User
			Nametester/Name
			Passwordpassword/Password
			IdtesterID/Id
		/User
	/Users
	Roles
	!--
		Role name=testRole
			UserNametester/UserName
		/Role
		--
		Role name=guest
			UserNametester/UserName
		/Role
	/Roles
	DurableSubscriptions
		DurableSubscription
			ClientIDtesterID/ClientID
			NametestSubscription/Name
			TopicNameTEST/TopicName
		/DurableSubscription
	/DurableSubscriptions
/StateManager
?xml version=1.0 encoding=UTF-8?

!-- $Id: jbossmq-service-uil.xml,v 1.1 2003/02/22 02:28:16 sebastian Exp $ --

server
  !--  --
  !-- JBossMQ  --
  !--  --


  !--  --
  !-- Invocation Layers--
  !--  --
  !--
 | InvocationLayers are the different transport methods that can
 | be used to access the server.
   --

  mbean code=org.jboss.mq.il.jvm.JVMServerILService
	 name=jboss.mq:service=InvocationLayer,type=JVM
depends optional-attribute-name=Invokerjboss.mq:service=Invoker/depends
attribute name=ConnectionFactoryJNDIRefjava:/ConnectionFactory/attribute
attribute name=XAConnectionFactoryJNDIRefjava:/XAConnectionFactory/attribute
attribute name=PingPeriod0/attribute
  /mbean

  mbean code=org.jboss.mq.il.uil.UILServerILService
	 name=jboss.mq:service=InvocationLayer,type=UIL
depends optional-attribute-name=Invokerjboss.mq:service=Invoker/depends
attribute name=ConnectionFactoryJNDIRefUILConnectionFactory/attribute
attribute name=XAConnectionFactoryJNDIRefUILXAConnectionFactory/attribute
attribute name=ServerBindPort8091/attribute
attribute name=PingPeriod0/attribute
attribute name=EnableTcpNoDelaytrue/attribute

!-- 
attribute name=ClientSocketFactoryorg.jboss.security.ssl.ClientSocketFactory/attribute 
attribute name=ServerSocketFactoryorg.jboss.security.ssl.DomainServerSocketFactory/attribute 
attribute name=SecurityDomainjava:/jaas/RMI+SSL/attribute
 --
  /mbean

  
  
  !--  --
  !-- JBossMQ Interceptor chain configuration  --
  !--  --
  !-- To tune performance, you can have the Invoker skip over the TracingInterceptor --
  !-- and/or the SecurityManager, but then you loose the ability to trace and/or enforce security. --
  
  mbean code=org.jboss.mq.server.jmx.Invoker name=jboss.mq:service=Invoker
depends optional-attribute-name=NextInterceptorjboss.mq:service=TracingInterceptor/depends
  /mbean

  mbean code=org.jboss.mq.server.jmx.InterceptorLoader name=jboss.mq:service=TracingInterceptor
attribute name=InterceptorClassorg.jboss.mq.server.TracingInterceptor/attribute
depends optional-attribute-name=NextInterceptorjboss.mq:service=SecurityManager/depends
  /mbean

  mbean code=org.jboss.mq.security.SecurityManager 

Re: [JBoss-user] Form based authentication

2003-02-25 Thread Silvester van der Bijl
Hello,

You're doing exactly what I want to do, only I want to use container
managed security. If I understand you correctly you don't use container
managed security (web.xml) and you verify usernames and password against
e.g. a dabase yourself ?

The reason why I want to do this, is because the web application is just
one of the applications talking to session beans (all protected or using
roles from a custom login module).

Silvester


citaat van=Guy Rouillier
 I can share what we do using form-based authentication.  We've rolled
 our own authentication mechanism, and have JBoss and Tomcat on different
 servers.  This may be what you mean by login form on each page - I'm
 not clear.  At any rate, at the top of each page, the developer has

 %@ include file=/common/html/authenheader.jsp %

 and at the bottom is

 %@ include file=/common/html/authentrailer.jsp %

 The header opens a try block.  In there, it checks the session to see if
 the user is logged on.  If not, it stores request.getRequestURI in the
 session and redirects to login_form.jsp.  In login_hdlr.jsp, if the
 userid and password validate, the session is updated and a redirect to
 the stored target is executed.  authentrailer closes the try block and
 handles exceptions.

 - Original Message -
 From: Silvester van der Bijl [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Monday, February 24, 2003 8:22 PM
 Subject: Re: [JBoss-user] Form based authentication


 David,

 Thanks for the suggestion. I do have a login form on each page (that is
 until the user logs in :-) ).  I did think of something like you're
 describing, but I just figured there had to be a better way.

 I found some more information on that AuthenticationInterceptor, but as
 far I can figure, you can't tell JBoss/Jetty to use a different
 interceptor for this.

 Besides, it seems kind of overkill to write a custom class just to allow
 direct requests to a login page

 Any other thoughts ?

 Silvester

 citaat van=David Ward
 Silvester,

 I'll share what I do.  I have a single servlet that is a central
 controller that delegates processing and dispatches requests to jp's
 (based on pathInfo).  However, *I have 2 servlet mappings to it*.

 /myapp/web/pathInfo - myapp is the context, web is the servlet,
 pathInfo
 (and request params) tell me how to process and where to request
 dispatch to.

 /myapp/sweb/pathInfo - same as above except sweb (notice the s) is a
 different mapping *to the same servlet*, except it also is a web
 protected resource.

 I have a dynamic login/logout link on each page (based on principal in
 request), which simply links back to itself except replacing web
 with
 sweb.  After the user logs in, he/she ends up visually back to where
 he/she started, though the path in the url is a bit different.

 Now, it sounds like you have an actual login form on each of your
 pages.
  I've not done that, but I'm guessing you could do the same thing as
 me,
 except just pass along the username and password to a dummy login with
 no display that onLoad (JavaScript) simply submits for you.  But 1)
 that
 seems hokey, and 2) you would want to make sure you're using SSL
 otherwise your username and password are plain-text'ing over the net.
 What do other people do in this circumstance?

 David

 --

 Mensaje citado por Silvester van der Bijl
 [EMAIL PROTECTED]:

 Hi there,

 We've got a web application which on each page displays a login box
 if
 the user isn't authenticated, or otherwise his personal menu, etc...

 The problem is, that after succesfully authenticating a user
 (j_security_check target), jetty doesn't know where to redirect the
 user to since I made a direct request to the login page (sort of).

 Shouldn't there be an additional property for j_security_check, like
 j_onsuccess_redirect_to ?

 Does anyone know of a workaround for this problem ? I've read about
 using a custom AuthenticationInterceptor, only I can't find where
 this
 interceptor is configured ?

 Please help.
 Silvester


 ---
 This sf.net email is sponsored by:ThinkGeek
 Welcome to geek heaven.
 http://thinkgeek.com/sf
 ___
 JBoss-user mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/jboss-user





 ---
 This sf.net email is sponsored by:ThinkGeek
 Welcome to geek heaven.
 http://thinkgeek.com/sf
 ___
 JBoss-user mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/jboss-user



 ---
 This sf.net email is sponsored by:ThinkGeek
 Welcome to geek heaven.
 http://thinkgeek.com/sf
 ___
 JBoss-user mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/jboss-user





---

Re: [JBoss-user] Jetty and form based authentication

2003-02-25 Thread Silvester van der Bijl
I just found my answer on the jboss forums. It seems jetty is supposed to
return null in getUserPrincipal on unprotected pages.

Solution seems to be to create a special guest role which is granted to
all visitors by the login module and make every resources protected.

Silvester


citaat van=Silvester van der Bijl
 Hello,

 I'm (still) trying to implement a web application for my school project.
 The idea is that everybody is allowed to see e.g. the default page
 (news), but only authenticated users can e.g. access grades.

 So far, no problem.

 The web application builds up a menu based on the roles the user has. If
 the user isn't authenticated the menu won't display items for which the
 user has no privileges.

 On each page there is a login box with a target of j_security_check.
 Here I encountered the first problem. Jetty (and Tomcat) don't support
 direct requests to the login page (which I'm doing).

 Browsing through the sourcecode of jetty I found that jetty checks a
 session variabele called org.mortbay.jetty.URI to see where it should
 redirect the request after a succesfull login (see code below for
 snippet from FormAuthenticator).

 If I set this session variabele from my pages, all works fine. Except
 getUserPrincipal only returns the principal when accessing a protected
 resource.

 This is definitely not what I want. I want to be able to tell who is
 viewing a page even if no security restrictions apply. Does anyone know
 how to change this behavior ?

 Thx in advance.




  CODE FROM FormAuthenticator

public UserPrincipal authenticated(UserRealm realm,
String pathInContext,
HttpRequest httpRequest,
HttpResponse httpResponse)
 throws IOException
 {
 HttpServletRequest request
 =(ServletHttpRequest)httpRequest.getWrapper();
 HttpServletResponse response =(HttpServletResponse)
 httpResponse.getWrapper();

 // Handle paths
 String uri = pathInContext;

 // Setup session
 HttpSession session=request.getSession(true);

 // Handle a request for authentication.
 if (
 uri.substring(uri.lastIndexOf(/)+1).startsWith(__J_SECURITY_CHECK) )
 {
 // Check the session object for login info.
 String username = request.getParameter(__J_USERNAME);
 String password = request.getParameter(__J_PASSWORD);

 UserPrincipal user
 realm.authenticate(username,password,httpRequest); String
 nuri=(String)session.getAttribute(__J_URI);
 if (user!=null  nuri!=null)
 {
 Code.debug(Form authentication OK for ,username);
 httpRequest.setAuthType(SecurityConstraint.__FORM_AUTH);
 httpRequest.setAuthUser(username);
 httpRequest.setUserPrincipal(user);
 session.setAttribute(__J_AUTHENTICATED,user);
 response.sendRedirect(response.encodeRedirectURL(nuri));
 }
 else
 {
 Code.debug(Form authentication FAILED for ,username);
 if (_formErrorPage!=null)
 response.sendRedirect(response.encodeRedirectURL
   (URI.addPaths(request.getContextPath(),
 _formErrorPage)));
 else
 response.sendError(HttpResponse.__403_Forbidden);
 }

 // Security check is always false, only true after final
 redirection.
 return null;
 }

 // Check if the session is already authenticated.
 UserPrincipal user = (UserPrincipal)
 session.getAttribute(__J_AUTHENTICATED);
 if (user != null)
 {
 if (user.isAuthenticated())
 {
 Code.debug(FORM Authenticated for ,user.getName());
 httpRequest.setAuthType(SecurityConstraint.__FORM_AUTH);
 httpRequest.setAuthUser(user.getName());
 httpRequest.setUserPrincipal(user);
 return user;
 }
 }

 // Don't authenticate authform or errorpage
 if (pathInContext!=null 
 pathInContext.equals(_formErrorPage) ||
 pathInContext.equals(_formLoginPage))
 return SecurityConstraint.__NOBODY;

 // redirect to login page
 if (httpRequest.getQuery()!=null)
 uri+=?+httpRequest.getQuery();
 session.setAttribute(__J_URI,
 URI.addPaths(request.getContextPath(),uri));
 
 response.sendRedirect(response.encodeRedirectURL(URI.addPaths(request.getContextPath(),
_formLoginPage)));
 return null;
 }






 ---
 This sf.net email is sponsored by:ThinkGeek
 Welcome to geek heaven.
 http://thinkgeek.com/sf
 ___

RE: [JBoss-user] stateful session bean idle timeout

2003-02-25 Thread Chen Liang [FD]
at jboss-service.xml
find transaction , there is a timeout attribute to set the time 


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Joe Hung
Sent: Tuesday, February 25, 2003 6:45 AM
To: '[EMAIL PROTECTED]'

Is there a jboss-wide parameter that I can set in one of the *.xml's?
I'm looking for a catch-all handling

thanks,
-joe
-Original Message-
From: Neal Sanche [mailto:[EMAIL PROTECTED]
Sent: Monday, February 24, 2003 1:00 PM
To: [EMAIL PROTECTED]
Subject: Re: [JBoss-user] stateful session bean idle timeout


I haven't done this for 2.4.3, but in JBoss 3.x you set the property 
on a UserTransaction object obtained from the JNDI lookup. I believe 
the object retured follows the javax.transactions.UserTransaction 
interface which allows a timeout to be set.

So basically you have to start a transaction programatically before 
you call your session bean instead of the container starting the 
transaction for you, and set the timeout property before you make the 
call.

Hope that helps if the 2.4.3 world too.

-Neal

On Monday 24 February 2003 03:30 pm, Joe Hung wrote:
 sorry if this is a trivial question. How does one specify an idle
 timeout value for stateful session bean in jboss 2.4.3?

 thanks,
 -joe



 ---
 This sf.net email is sponsored by:ThinkGeek
 Welcome to geek heaven.
 http://thinkgeek.com/sf
 ___
 JBoss-user mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/jboss-user



---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


---
This SF.net email is sponsored by: Scholarships for Techies!
Can't afford IT training? All 2003 ictp students receive scholarships.
Get hands-on training in Microsoft, Cisco, Sun, Linux/UNIX, and more.
www.ictp.com/training/sourceforge.asp
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] Jetty and form based authentication

2003-02-25 Thread Silvester van der Bijl
Not if understand the messages at the forum correctly. You can configure a
role to be granted to unauthenticated users.

Thanks for the input,
Silvester



citaat van=David Ward
 But then everyone would have to log in to access any of your pages.  If
 you need to know who the user is on all pages (if they're logged in) why
 don't you just, on successful login (ie: there is a non-null Principal
 in the request), stuff it into the httpsession yourself, then access
 that variable from your pages?  It gets cleared out on logout (ie:
 session.invalidate()).  If you don't have a single servlet controller
 that fronts your app to put the Principal in the session, you could
 instead do it via a javax.servlet.Filter that is configured to intercept
 everything in your servlet context.

 Hope this helps,
 David

 --

 Mensaje citado por Silvester van der Bijl [EMAIL PROTECTED]:

 I just found my answer on the jboss forums. It seems jetty is supposed
 to return null in getUserPrincipal on unprotected pages.

 Solution seems to be to create a special guest role which is granted
 to all visitors by the login module and make every resources
 protected.

 Silvester


 citaat van=Silvester van der Bijl
  Hello,
 
  I'm (still) trying to implement a web application for my school
 project. The idea is that everybody is allowed to see e.g. the
 default page (news), but only authenticated users can e.g. access
 grades.
 
  So far, no problem.
 
  The web application builds up a menu based on the roles the user
 has. If the user isn't authenticated the menu won't display items
 for which the user has no privileges.
 
  On each page there is a login box with a target of j_security_check.
 Here I encountered the first problem. Jetty (and Tomcat) don't
 support direct requests to the login page (which I'm doing).
 
  Browsing through the sourcecode of jetty I found that jetty checks a
 session variabele called org.mortbay.jetty.URI to see where it
 should redirect the request after a succesfull login (see code below
 for snippet from FormAuthenticator).
 
  If I set this session variabele from my pages, all works fine.
 Except getUserPrincipal only returns the principal when accessing a
 protected resource.
 
  This is definitely not what I want. I want to be able to tell who is
 viewing a page even if no security restrictions apply. Does anyone
 know how to change this behavior ?
 
  Thx in advance.


 ---
 This SF.net email is sponsored by: Scholarships for Techies!
 Can't afford IT training? All 2003 ictp students receive scholarships.
 Get hands-on training in Microsoft, Cisco, Sun, Linux/UNIX, and more.
 www.ictp.com/training/sourceforge.asp
 ___
 JBoss-user mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/jboss-user





---
This SF.net email is sponsored by: Scholarships for Techies!
Can't afford IT training? All 2003 ictp students receive scholarships.
Get hands-on training in Microsoft, Cisco, Sun, Linux/UNIX, and more.
www.ictp.com/training/sourceforge.asp
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] JBOSS Application Logging

2003-02-25 Thread Guy Rouillier
Please stop sending your email in HTML format.  Switch to plain text.

Many here use log4j for application message logging.  I do it very
easily with Tomcat and JBoss running independently.  Are you running one
of the combined packages?  There was a protracted discussion here over
the last week talking about how to do that.  Take a look at recent
archives.
- Original Message -
From: Corbin, James
To: [EMAIL PROTECTED]
Sent: Tuesday, February 25, 2003 4:08 PM
Subject: [JBoss-user] JBOSS Application Logging


Is anyone out there in the JBOSS user community using Log4J as their
application logging facility and configuring it with their own config
file independent of JBOSS's log4J configuration.

If so, I'd like to talk to you about how you managed it?

Thanks,
J.D.
This electronic message transmission contains information from the
Company that may be proprietary, confidential and/or privileged.
The information is intended only for the use of the individual(s) or
entity named above.  If you are not the intended recipient, be
aware that any disclosure, copying or distribution or use of the
contents of this information is prohibited.  If you have received
this electronic transmission in error, please notify the sender
immediately by replying to the address listed in the From: field.




---
This SF.net email is sponsored by: Scholarships for Techies!
Can't afford IT training? All 2003 ictp students receive scholarships.
Get hands-on training in Microsoft, Cisco, Sun, Linux/UNIX, and more.
www.ictp.com/training/sourceforge.asp
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] Form based authentication

2003-02-25 Thread Guy Rouillier
- Original Message -
From: Silvester van der Bijl [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, February 25, 2003 8:45 PM
Subject: Re: [JBoss-user] Form based authentication


Hello,

You're doing exactly what I want to do, only I want to use container
managed security. If I understand you correctly you don't use container
managed security (web.xml) and you verify usernames and password against
e.g. a dabase yourself ?

Yes.





---
This SF.net email is sponsored by: Scholarships for Techies!
Can't afford IT training? All 2003 ictp students receive scholarships.
Get hands-on training in Microsoft, Cisco, Sun, Linux/UNIX, and more.
www.ictp.com/training/sourceforge.asp
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] Form based authentication

2003-02-25 Thread Guy Rouillier
- Original Message -
From: Silvester van der Bijl [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, February 25, 2003 8:45 PM
Subject: Re: [JBoss-user] Form based authentication


 You're doing exactly what I want to do, only I want to use container
managed security. If I understand you correctly you don't use container
managed security (web.xml) and you verify usernames and password against
e.g. a dabase yourself ?

The reason why I want to do this, is because the web application is just
one of the applications talking to session beans (all protected or using
roles from a custom login module).

Yes, we've not addressed that issue at the moment.  What happens if a
command-line Java application attempts to invoke one of your EJBs?






---
This SF.net email is sponsored by: Scholarships for Techies!
Can't afford IT training? All 2003 ictp students receive scholarships.
Get hands-on training in Microsoft, Cisco, Sun, Linux/UNIX, and more.
www.ictp.com/training/sourceforge.asp
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user