[JBoss-user] [JNDI/Naming/Network] - Re: Basics: binding object instance/factory to JNDI name

2006-06-28 Thread [EMAIL PROTECTED]
"Gunark" wrote : Okay so looks like something like this works:
  | 
  | 
  |   | 
  |   |   casLogin=https://localhost:8443/cas/login
  |   |   casValidate=https://localhost:8443/cas/proxyValidate
  |   |   casServerName=localhost:8080
  |   | 
  |   | 
  | 
  | But I guess what I really want is a way to bind an object factory to a 
jndiName, so that looking up "something/MyObject" will call an object factory 
method and return an instance of MyObject... I'm not sure if 
JNDIBindingServiceMgr is really the right way to go about this. I suppose I 
would have to write my own custom propertyeditor to behave like a factory class?

You can use any mechanism JBossXB supports. A propertyeditor is one way, a 
custom schema with annotations is another.
http://wiki.jboss.org/wiki/Wiki.jsp?page=JBossXB

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3954153#3954153

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3954153

Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [JNDI/Naming/Network] - Re: Basics: binding object instance/factory to JNDI name

2006-06-28 Thread Gunark
Okay, so my final solution for programmatically setting up CAS via JNDI in 
JBoss:

web.xml config for the application with the CAS filter looks like this:


  |   CAS Filter
  |   
com.discursive.cas.extend.client.filter.CASFilter
  |   
  | com.discursive.cas.extend.client.config.jndi
  | config/CASConfig
  |   
  | 
  | 
  | 
  |   CAS Filter
  |   /*
  | 
  | 
  | ... 
  | 
  |  
  |   config/CASConfig
  |   com.discursive.cas.extend.client.CASConfig  
  |   Container
  | 

jboss-web.xml config:


  |   config/CASConfig
  |   config/CASConfig
  | 

Now, set up a casconfig.sar with jboss-service.xml:


  | 
  | http://www.jboss.org/j2ee/dtd/jboss-service_4_0.dtd";>
  | 
  |   
  |   
  |   
  |  http://www.w3.org/2001/XMLSchema-instance";
  | xmlns:jndi="urn:jboss:jndi-binding-service:1.0"
  | xs:schemaLocation="urn:jboss:jndi-binding-service:1.0 
resource:jndi-binding-service_1_0.xsd"
  | >
  | 
  | 
  | 
  | config
  | 
  | 
  | 
  | 
  |  
  |   
  |
  | 
  | 
  | 
  | 

and create two classes:


  | package com.example;
  | 
  | import org.jboss.util.propertyeditor.TextPropertyEditorSupport;
  | 
  | 
  | public class CASConfigLoader extends TextPropertyEditorSupport {
  | 
  | public Object getValue() {
  | SerializableCASConfig config = new SerializableCASConfig();
  | config.setCasLogin("https://localhost:8443/cas/login";);
  | 
config.setCasValidate("https://localhost:8443/cas/proxyValidate";);
  | config.setCasServerName("localhost:8080");
  | config.setDummyTrust(true);
  | 
  | return config;
  | }
  | 
  | }
  | 

and:


  | package com.example;
  | 
  | import java.io.Serializable;
  | 
  | import com.discursive.cas.extend.client.CASConfig;
  | 
  | public class SerializableCASConfig extends CASConfig implements 
Serializable { }
  | 

Deploy the sar and your protected application and everything should be working.

In the getValue() method of your CASConfigLoader class you should be able to 
write more fancy code to pull configuration values from elsewhere .

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3954147#3954147

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3954147

Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [JNDI/Naming/Network] - Re: Basics: binding object instance/factory to JNDI name

2006-06-28 Thread Gunark
Okay so looks like something like this works:


  | 
  |   casLogin=https://localhost:8443/cas/login
  |   casValidate=https://localhost:8443/cas/proxyValidate
  |   casServerName=localhost:8080
  | 
  | 

But I guess what I really want is a way to bind an object factory to a 
jndiName, so that looking up "something/MyObject" will call an object factory 
method and return an instance of MyObject... I'm not sure if 
JNDIBindingServiceMgr is really the right way to go about this. I suppose I 
would have to write my own custom propertyeditor to behave like a factory class?

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3954104#3954104

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3954104

Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [JNDI/Naming/Network] - Re: Basics: binding object instance/factory to JNDI name

2006-06-28 Thread Gunark
"[EMAIL PROTECTED]" wrote : 
http://wiki.jboss.org/wiki/Wiki.jsp?page=JNDIBindingServiceMgr

So I been trying to do it this way (the MBean JMX crap I mentioned above is 
kind of a mess), but I can't figure out how to bind an object (just a POJO with 
some properties set).

The examples in the wiki show how to bind a URL or a String or whatever, but 
they don't show how to bind an arbitrary POJO, which is what I need.

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3954089#3954089

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3954089

Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [JNDI/Naming/Network] - Re: Basics: binding object instance/factory to JNDI name

2006-06-28 Thread [EMAIL PROTECTED]
http://wiki.jboss.org/wiki/Wiki.jsp?page=JNDIBindingServiceMgr

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3953999#3953999

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3953999

Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [JNDI/Naming/Network] - Re: Basics: binding object instance/factory to JNDI name

2006-06-27 Thread Gunark
For anyone interested, the answer turned out to be manual JNDI binding via JMX 
service MBeans.

Basically I have a JMX MBean that manually binds the object I needed bound to 
JNDI in its create() method.

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3953858#3953858

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3953858

Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [JNDI/Naming/Network] - Re: Basics: binding object instance/factory to JNDI name

2006-06-26 Thread Gunark
>From what I understand, env-entry only lets you reference instances of 
>Integers, Floats, and other primitive wrappers.

I don't think this is what I'm looking for.

Once again, all I want is for an instance of some arbitrary class to be 
available under a global jndi name. So that when the app is loaded, and 
"somethig/MyObject" is looked up, an instance of MyObject is returned.

Specifically, I have a filter in my web.xml file that looks for its 
configuration info (info stored as a POJO) under a given jndi name. i.e.:


  |   CAS Filter
  |   
com.discursive.cas.extend.client.filter.CASFilter
  |   
  |   
  | 
com.discursive.cas.extend.client.config.jndi
  | config/CASConfig
  |   
  | 
  |   ...
  | 

(note the param-value)

How do I make an instance of my object available under "config/CASConfig" in 
JBoss? Preferably I'd like to set th is up as an EJB 3.0 entitity bean, but I 
can figure out that part. I just have no idea how to bind an object/object 
factory to a global jndi name like "config/CASConfig".

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3953477#3953477

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3953477

Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [JNDI/Naming/Network] - Re: Basics: binding object instance/factory to JNDI name

2006-06-25 Thread jaikiran
Have a look ath env-entry in ejb-jar.xml dtd:

http://java.sun.com/j2ee/dtds/ejb-jar_1_1.dtd


Here's an brief extract:



anonymous wrote : 
  | 



View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3953339#3953339

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3953339

Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [JNDI/Naming/Network] - Re: Basics: binding object instance/factory to JNDI name

2006-06-23 Thread Gunark
Oops, second code block should be:



(not that it really matters)

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3953099#3953099

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3953099

Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user