[JBoss-dev] CVS update: jboss/src/main/org/jboss/web AbstractWebContainer.java AbstractWebContainerMBean.java WebApplication.java
User: starksm Date: 01/05/09 00:11:16 Added: src/main/org/jboss/web AbstractWebContainer.java AbstractWebContainerMBean.java WebApplication.java Log: Initial version of a web container integration layer. This currently provides support for mapping the JNDI values for the resource-ref, env-entry and ejb-ref web-app.xml elements. Revision ChangesPath 1.1 jboss/src/main/org/jboss/web/AbstractWebContainer.java Index: AbstractWebContainer.java === package org.jboss.web; import java.net.MalformedURLException; import java.net.URL; import java.util.HashMap; import java.util.Iterator; import javax.naming.Context; import javax.naming.InitialContext; import javax.naming.LinkRef; import javax.naming.NamingException; import javax.naming.Name; import javax.naming.NameNotFoundException; import org.w3c.dom.Element; import org.apache.log4j.Category; import org.jboss.ejb.DeploymentException; import org.jboss.metadata.EjbRefMetaData; import org.jboss.metadata.EnvEntryMetaData; import org.jboss.metadata.ResourceRefMetaData; import org.jboss.metadata.WebMetaData; import org.jboss.naming.Util; import org.jboss.util.ServiceMBeanSupport; /** A template pattern class for web container integration into JBoss. This class should be subclasses by web container providers wishing to integrate their container into a JBoss server. It provides support for mapping the following web-app.xml/jboss-web.xml elements into the JBoss server JNDI namespace: - env-entry - resource-ref - ejb-ref Subclasses need to implement the {@link #performDeploy(String, String) performDeploy()} and {@link #performUndeploy(String) performUndeploy()} methods to perform the container specific steps and return the web application info required by the AbstractWebContainer c.ass. @see #performDeploy(String, String) @see #performUndeploy(String) @author [EMAIL PROTECTED] @version $Revision: 1.1 $ */ public abstract class AbstractWebContainer extends ServiceMBeanSupport implements AbstractWebContainerMBean { /** The WebContainer log4j category instance available for logging related to WebContainer events. */ public static final Category category = Category.getInstance(WebContainer); /** A mapping of deployed warUrl strings to the WebApplication object */ protected HashMap deploymentMap = new HashMap(); public AbstractWebContainer() { } /** A template pattern implementation of the deploy() method. This method calls the {@link #performDeploy(String, String) performDeploy()} method to perform the container specific deployment steps and registers the returned WebApplication in the deployment map. The steps performed are: WebApplication warInfo = performDeploy(ctxPath, warUrl); ClassLoader loader = warInfo.getClassLoader(); Element webApp = warInfo.getWebApp(); Element jbossWeb = warInfo.getJbossWeb(); parseWebAppDescriptors(loader, webApp, jbossWeb); deploymentMap.put(warUrl, warInfo); @param ctxPath, The context-root element value from the J2EE application/module/web application.xml descriptor. This may be null if war was is not being deployed as part of an enterprise application. @param warUrl, The string for the URL of the web application war. */ public synchronized void deploy(String ctxPath, String warUrl) throws DeploymentException { WebApplication warInfo = performDeploy(ctxPath, warUrl); ClassLoader loader = warInfo.getClassLoader(); Element webApp = warInfo.getWebApp(); Element jbossWeb = warInfo.getJbossWeb(); try { parseWebAppDescriptors(loader, webApp, jbossWeb); } catch(Exception e) { throw new DeploymentException(Failed during parseWebAppDescriptors, e); } deploymentMap.put(warUrl, warInfo); } /** The method called by the deploy() method that must be overriden by subclasses to perform the web container specific deployment steps. @param ctxPath, The context-root element value from the J2EE application/module/web application.xml descriptor. This may be null if war was is not being deployed as part of an enterprise application. @param warUrl, The string for the URL of the web application war. @return WebApplication, the web application information required by the AbstractWebContainer class to setup the JNDI ENC and track the war deployment status. */ protected abstract WebApplication performDeploy(String ctxPath, String warUrl) throws DeploymentException; /** A
[JBoss-dev] CVS update: jboss/src/resources/org/jboss/metadata jboss-web.dtd
User: starksm Date: 01/05/09 00:14:21 Added: src/resources/org/jboss/metadata jboss-web.dtd Log: The DTD for the jboss specific analog to the web-app.xml deployment descriptor Revision ChangesPath 1.1 jboss/src/resources/org/jboss/metadata/jboss-web.dtd Index: jboss-web.dtd === ?xml version='1.0' encoding='UTF-8' ? !-- The JBoss specific elements used to integrate the servlet web.xml elements into a JBoss deployment. -- !-- The jboss-web element is the root element. -- !ELEMENT jboss-web (resource-ref* , ejb-ref*) !ELEMENT ejb-ref (ejb-ref-name , jndi-name) !ELEMENT ejb-ref-name (#PCDATA) !ELEMENT jndi-name (#PCDATA) !ELEMENT resource-ref (res-ref-name , jndi-name) !ELEMENT res-ref-name (#PCDATA) ___ Jboss-development mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] CVS update: jboss/src/resources/org/jboss/metadata jboss.dtd
User: starksm Date: 01/05/09 00:22:10 Modified:src/resources/org/jboss/metadata jboss.dtd Log: Update the resource-ref element content model to allow jndi-name or res-url instead of resource-name to simplify small deployment management. Revision ChangesPath 1.7 +1 -1 jboss/src/resources/org/jboss/metadata/jboss.dtd Index: jboss.dtd === RCS file: /cvsroot/jboss/jboss/src/resources/org/jboss/metadata/jboss.dtd,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- jboss.dtd 2001/04/20 23:19:38 1.6 +++ jboss.dtd 2001/05/09 07:22:10 1.7 @@ -211,7 +211,7 @@ Used in: session, entity -- -!ELEMENT resource-ref (res-ref-name , resource-name) +!ELEMENT resource-ref (res-ref-name , (resource-name | jndi-name | res-url) !-- The res-ref-name element gives the code name of a resource. It is ___ Jboss-development mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] CVS update: jboss/src/main/org/jboss/naming Util.java
User: starksm Date: 01/05/09 01:15:02 Added: src/main/org/jboss/naming Util.java Log: A static utility class for common JNDI operations Revision ChangesPath 1.1 jboss/src/main/org/jboss/naming/Util.java Index: Util.java === package org.jboss.naming; import javax.naming.Context; import javax.naming.Name; import javax.naming.NameNotFoundException; import javax.naming.NamingException; /** A static utility class for common JNDI operations. * * @author [EMAIL PROTECTED] * @version */ public class Util { /** Bind val to name in ctx, and make sure that all intermediate contexts exist */ public static void bind(Context ctx, String name, Object value) throws NamingException { Name n = ctx.getNameParser().parse(name); while( n.size() 1 ) { String ctxName = n.get(0); try { ctx = (Context) ctx.lookup(ctxName); } catch(NameNotFoundException e) { ctx = ctx.createSubcontext(ctxName); } n = n.getSuffix(1); } ctx.bind(n.get(0), value); } } ___ Jboss-development mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] CVS update: jboss/src/main/org/jboss/metadata EnvEntryMetaData.java
User: starksm Date: 01/05/09 01:16:40 Modified:src/main/org/jboss/metadata EnvEntryMetaData.java Log: Add static utility method for binding the env entry into a JNDI context. Revision ChangesPath 1.3 +61 -20jboss/src/main/org/jboss/metadata/EnvEntryMetaData.java Index: EnvEntryMetaData.java === RCS file: /cvsroot/jboss/jboss/src/main/org/jboss/metadata/EnvEntryMetaData.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- EnvEntryMetaData.java 2000/12/07 15:45:01 1.2 +++ EnvEntryMetaData.java 2001/05/09 08:16:40 1.3 @@ -6,23 +6,27 @@ */ package org.jboss.metadata; +import javax.naming.Context; +import javax.naming.NamingException; + import org.w3c.dom.Element; import org.jboss.ejb.DeploymentException; +import org.jboss.naming.Util; /** * description * * @see related * @author a href=mailto:[EMAIL PROTECTED];Sebastien Alborini/a - * @version $Revision: 1.2 $ + * @version $Revision: 1.3 $ */ public class EnvEntryMetaData extends MetaData { // Constants - // Attributes - private String name; - private String type; +private String name; +private String type; private String value; // Static @@ -31,24 +35,61 @@ } // Public - - public String getName() { return name; } - - public String getType() { return type; } - public String getValue() { return value; } +public String getName() { return name; } + +public String getType() { return type; } + +public String getValue() { return value; } public void importEjbJarXml(Element element) throws DeploymentException { - name = getElementContent(getUniqueChild(element, env-entry-name)); - type = getElementContent(getUniqueChild(element, env-entry-type)); - value = getElementContent(getUniqueChild(element, env-entry-value)); - } - - // Package protected - - -// Protected - - -// Private --- - -// Inner classes - +name = getElementContent(getUniqueChild(element, env-entry-name)); +type = getElementContent(getUniqueChild(element, env-entry-type)); +value = getElementContent(getUniqueChild(element, env-entry-value)); +} + +public static void bindEnvEntry(Context ctx, EnvEntryMetaData entry) +throws ClassNotFoundException, NamingException +{ +ClassLoader loader = EnvEntryMetaData.class.getClassLoader(); +Class type = loader.loadClass(entry.getType()); +if( type == String.class ) +{ +Util.bind(ctx, entry.getName(), entry.getValue()); +} +else if( type == Integer.class ) +{ +Util.bind(ctx, entry.getName(), new Integer(entry.getValue())); +} +else if( type == Long.class ) +{ +Util.bind(ctx, entry.getName(), new Long(entry.getValue())); +} +else if( type == Double.class ) +{ +Util.bind(ctx, entry.getName(), new Double(entry.getValue())); +} +else if( type == Float.class ) +{ +Util.bind(ctx, entry.getName(), new Float(entry.getValue())); +} +else if( type == Byte.class ) +{ +Util.bind(ctx, entry.getName(), new Byte(entry.getValue())); +} +else if( type == Short.class ) +{ +Util.bind(ctx, entry.getName(), new Short(entry.getValue())); +} +else if( type == Boolean.class ) +{ +Util.bind(ctx, entry.getName(), new Boolean(entry.getValue())); +} +else +{ +// Default to a String type +Util.bind(ctx, entry.getName(), entry.getValue()); +} +} + } ___ Jboss-development mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] CVS update: jboss/src/main/org/jboss/metadata WebMetaData.java
User: starksm Date: 01/05/09 01:18:47 Added: src/main/org/jboss/metadata WebMetaData.java Log: A representation of the web-app.xml and jboss-web.xml deployment descriptors as used by the AbstractWebContainer web container integration support class. Revision ChangesPath 1.1 jboss/src/main/org/jboss/metadata/WebMetaData.java Index: WebMetaData.java === /* * JBoss, the OpenSource EJB server * * Distributable under LGPL license. * See terms of license at gnu.org. */ package org.jboss.metadata; import java.util.ArrayList; import java.util.HashMap; import java.util.Iterator; import org.w3c.dom.Element; import org.jboss.ejb.DeploymentException; /** A representation of the web-app.xml and jboss-web.xml deployment * descriptors as used by the AbstractWebContainer web container integration * support class. * * @see XmlLoadable * @see org.jboss.web.AbstractWebContainer * @author [EMAIL PROTECTED] * @version $Revision: 1.1 $ */ public class WebMetaData implements XmlLoadable { private HashMap resourceReferences = new HashMap(); private ArrayList environmentEntries = new ArrayList(); private HashMap ejbReferences = new HashMap(); private ArrayList securityRoleReferences = new ArrayList(); private String securityDomain; public WebMetaData() { } /** Return an iterator of the env-entry mappings. @return Iterator of EnvEntryMetaData objects. */ public Iterator getEnvironmentEntries() { return environmentEntries.iterator(); } /** Return an iterator of the ejb-ref mappings. @return Iterator of EjbRefMetaData objects. */ public Iterator getEjbReferences() { return ejbReferences.values().iterator(); } /** Return an iterator of the resource-ref mappings. @return Iterator of ResourceRefMetaData objects. */ public Iterator getResourceReferences() { return resourceReferences.values().iterator(); } public void importXml(Element element) throws Exception { String rootTag = element.getOwnerDocument().getDocumentElement().getTagName(); if( rootTag.equals(web-app) ) { importWebXml(element); } else if( rootTag.equals(jboss-web) ) { importJBossWebXml(element); } } /** Parse the elements of the web-app element used by the integration layer. */ protected void importWebXml(Element webApp) throws Exception { // Parse the web-app/resource-ref elements Iterator iterator = MetaData.getChildrenByTagName(webApp, resource-ref); while( iterator.hasNext() ) { Element resourceRef = (Element) iterator.next(); ResourceRefMetaData resourceRefMetaData = new ResourceRefMetaData(); resourceRefMetaData.importEjbJarXml(resourceRef); resourceReferences.put(resourceRefMetaData.getRefName(), resourceRefMetaData); } // Parse the web-app/env-entry elements iterator = MetaData.getChildrenByTagName(webApp, env-entry); while( iterator.hasNext() ) { Element envEntry = (Element) iterator.next(); EnvEntryMetaData envEntryMetaData = new EnvEntryMetaData(); envEntryMetaData.importEjbJarXml(envEntry); environmentEntries.add(envEntryMetaData); } // Parse the web-app/ejb-ref elements iterator = MetaData.getChildrenByTagName(webApp, ejb-ref); while( iterator.hasNext() ) { Element ejbRef = (Element) iterator.next(); EjbRefMetaData ejbRefMetaData = new EjbRefMetaData(); ejbRefMetaData.importEjbJarXml(ejbRef); ejbReferences.put(ejbRefMetaData.getName(), ejbRefMetaData); } } /** Parse the elements of the jboss-web element used by the integration layer. */ protected void importJBossWebXml(Element jbossWeb) throws Exception { // Parse the jboss-web/resource-ref elements Iterator iterator = MetaData.getChildrenByTagName(jbossWeb, resource-ref); while( iterator.hasNext() ) { Element resourceRef = (Element) iterator.next(); String resRefName = MetaData.getElementContent(MetaData.getUniqueChild(resourceRef, res-ref-name)); String jndiName = MetaData.getElementContent(MetaData.getUniqueChild(resourceRef, jndi-name)); ResourceRefMetaData resourceRefMetaData = (ResourceRefMetaData) resourceReferences.get(resRefName); if( resourceRefMetaData == null ) {
[JBoss-dev] Cvsstat on jboss CVS module
G'day, This is a minor note that some jboss developers might be interested to check the graph at http://cvsstat.sourceforge.net, which contains a plot of the history of the jboss CVS module against the number of lines of code. Cvsstat is a perl script which analyses a CVS repository, and as an example, I used the jboss CVS repository on sourceforge. Thought some of the developers might find it mildly amusing! Cheers, David ___ Jboss-development mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-development
Re: [JBoss-dev] CVS update: jbosssx/src/build build.xml
Hi Jay! Which are the minimum jar files which must be included into the class path at the client side ? Is the jbosssx jar not needed anymore ? If it is not needed anymore, do we have a change note at Sourceforge about this ? A change note would help a lot for updating the docu when a new version is released. Thanks, Tobias [EMAIL PROTECTED] wrote: User: jwalters Date: 01/04/30 03:53:02 Modified:src/build build.xml Log: Moved jbosssx project over to jboss-j2ee jar files Revision ChangesPath 1.6 +3 -4 jbosssx/src/build/build.xml Index: build.xml === RCS file: /cvsroot/jboss/jbosssx/src/build/build.xml,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- build.xml 2001/04/13 21:11:37 1.5 +++ build.xml 2001/04/30 10:53:02 1.6 @@ -1,6 +1,6 @@ !-- An ant build file for JBossSX security framework @author [EMAIL PROTECTED] -@version $Revision: 1.5 $ +@version $Revision: 1.6 $ -- project name=JBossSX default=jar basedir=../../ !-- The location of the JBoss server dist tree. This is @@ -34,12 +34,11 @@ !-- The main project classpath -- path id=base.path pathelement path=${build.classes.dir} / -pathelement path=${lib.dir}/ejb.jar / +pathelement path=${lib.dir}/jboss-j2ee.jar / pathelement path=${lib.dir}/jaas.jar / pathelement path=${lib.dir}/jaxp.jar / -pathelement path=${lib.dir}/jdbc2_0-stdext.jar / +pathelement path=${lib.dir}/jboss-jdbc_ext.jar / pathelement path=${lib.dir}/jmxri.jar / -pathelement path=${lib.dir}/jta-spec1_0_1.jar / pathelement path=${lib.dir}/crimson.jar / pathelement path=${lib.dir}/log4j.jar / pathelement path=${lib.dir}/junit.jar / ___ Jboss-development mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-development ___ Jboss-development mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] Exception Type not propagating up to jbossmq onExceptionhandler
I originally posted this on the SpyderMQ list but got no response. Hence I'll chew up a little JBoss dev bandwidth. The concise description is that Sending a message with an invalid destination results in the onException handler for the QueueReceiver being called with a JMSException with the message Cannot send a message to the JMS provider. As stated below, I would have thought that the InvalidDestinationException would have been returned. Is this a bug? Upon first blush it looks like SpyConnection.sendToServer() or SpyConnection.failureHandler() should do a bit of examination. I have an application the uses the setExceptionHandler/onException method of detecting problems with the connections to the JMSService. If I send a message with an invalid destination, I would expect the onException method to receive an InvalidDestinationException. What I do see when the sender sends a message to an invalid destination is: First to stdout (or maybe stderr) java.rmi.RemoteException: ; nested exception is: javax.jms.JMSException: This destination does not exist ! javax.jms.JMSException: This destination does not exist ! no stack trace available Then my onException is called with a JMSException that looks like: onException javax.jms.JMSException: Cannot send a message to the JMS provider at com.rational.clearquest.cqweb.jtltransport.JTLConnectionManager.onException(JTLConnectionManager.java:404) at org.jbossmq.SpyConnection.failureHandler(SpyConnection.java:323) at org.jbossmq.SpyConnection.sendToServer(SpyConnection.java:390) at org.jbossmq.SpySession.sendMessage(SpySession.java:383) at org.jbossmq.SpyQueueSender.send(SpyQueueSender.java:95) at org.jbossmq.SpyQueueSender.send(SpyQueueSender.java:59) at com.rational.clearquest.cqweb.jtltransport.JTLService$ResponseSender.run(JTLService.java:445) at java.lang.Thread.run(Unknown Source) regards, -jb ___ Jboss-development mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] CVS update: jboss/src/main/org/jboss/util Info.java
User: starksm Date: 01/05/09 07:47:54 Modified:src/main/org/jboss/util Info.java Log: Add full dump of the system properties as debug level msgs so that the complete properties info can be captured in the server.log Revision ChangesPath 1.5 +12 -1 jboss/src/main/org/jboss/util/Info.java Index: Info.java === RCS file: /cvsroot/jboss/jboss/src/main/org/jboss/util/Info.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- Info.java 2000/12/07 18:16:13 1.4 +++ Info.java 2001/05/09 14:47:54 1.5 @@ -8,6 +8,7 @@ import java.io.*; import java.net.*; +import java.util.Enumeration; import javax.management.*; import javax.management.loading.MLet; @@ -19,7 +20,8 @@ * * @see related * @author Rickard Öberg ([EMAIL PROTECTED]) - * @version $Revision: 1.4 $ + * @author [EMAIL PROTECTED] + * @version $Revision: 1.5 $ */ public class Info implements InfoMBean, MBeanRegistration @@ -39,9 +41,18 @@ public ObjectName preRegister(MBeanServer server, ObjectName name) throws java.lang.Exception { + // Dump out basic info as INFO priority msgs log.log(Java version: +System.getProperty(java.version)+,+System.getProperty(java.vendor)); log.log(Java VM: +System.getProperty(java.vm.name)+ +System.getProperty(java.vm.version)+,+System.getProperty(java.vm.vendor)); log.log(System: +System.getProperty(os.name)+ +System.getProperty(os.version)+,+System.getProperty(os.arch)); + // Now dump out the entire System properties as DEBUG priority msgs + log.debug(+++ Full System Properties Dump); + Enumeration names = System.getProperties().propertyNames(); + while( names.hasMoreElements() ) + { + String pname = (String) names.nextElement(); + log.debug(pname+: +System.getProperty(pname)); + } // MF TODO: say everything that needs to be said here: copyright, included libs and TM, contributor and (C) jboss org 2000 return new ObjectName(OBJECT_NAME); ___ Jboss-development mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-development
Re: [JBoss-dev] Main.java, let's clean it up
- Original Message - From: marc fleury [EMAIL PROTECTED] the security initialization from jboss.properties, we need to move that to a proper JMX initialization. Move the thread local security stuff, is it there because there is no other way? is there a reason, or can we safely work towards putting that in jboss.xml, jboss.jcml The setting of the security manager and server.policy file are better done from the command line as many security related events and debugging hooks are done on startup of the vm. I don't think these should be set at all from within the server. Setting the thread-local mode of the SecurityAssociation could be moved to an mbean. we should really only have the loading of the MLets. THEN THE LOADING IS FILE BASED and that is kinda fucked up, we would really need to parse the arguments for a URL that points to the base directory to load from. We needed to do that when we were asked to demonstrate on the spot that we could load the server from http and when we looked at the code it would all work from the file system and be very local. Final question... why is the DocumentBuilderFactory stuff in the Main class can't we have the actual loading mechanism make that call? It is more than repackaging (since you guys know I hate repackaging) it would enable us to put the xml classes in something else than the base spine but have the stuff loaded as an MLet from the conf in the beginning. If I comment out the call to DocumentBuilderFactory.newInstance() I am still able to switch the xml parsers using the JAXP properties so I don't see that this call has any effect other than preloading the parser classes. The xml parser settings could be moved to an MLet. ___ Jboss-development mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-development
Re: [JBoss-dev] TODO List on SourceForge
Where are you seeing the use of the btye[]/InputStream.available construct as in: byte[] buffer = new byte[input.available()]; input.read(buffer); I searched the entire jboss org/jboss codebase and I cannot find any existing uses of this construct. - Original Message - From: Juha Lindfors [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, May 08, 2001 2:47 PM Subject: Re: [JBoss-dev] TODO List on SourceForge At 10:02 8.5.2001 +0100, Simone wrote: o ConfigurationService and the byte[] bug (solved perhaps ?) unfortunately looks like this bug has creeped into many places... need to clear them all. -- Juha ___ Jboss-development mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] CVS update: jboss/src/main/org/jboss/web AbstractWebContainer.java
User: starksm Date: 01/05/09 10:00:00 Modified:src/main/org/jboss/web AbstractWebContainer.java Log: Change the throws clause to just Exception and handle the wrapping to a DeploymentException at this level rather than making subclasses do it. Revision ChangesPath 1.2 +27 -12jboss/src/main/org/jboss/web/AbstractWebContainer.java Index: AbstractWebContainer.java === RCS file: /cvsroot/jboss/jboss/src/main/org/jboss/web/AbstractWebContainer.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- AbstractWebContainer.java 2001/05/09 07:11:16 1.1 +++ AbstractWebContainer.java 2001/05/09 17:00:00 1.2 @@ -42,7 +42,7 @@ @see #performUndeploy(String) @author [EMAIL PROTECTED] -@version $Revision: 1.1 $ +@version $Revision: 1.2 $ */ public abstract class AbstractWebContainer extends ServiceMBeanSupport implements AbstractWebContainerMBean { @@ -77,19 +77,23 @@ */ public synchronized void deploy(String ctxPath, String warUrl) throws DeploymentException { -WebApplication warInfo = performDeploy(ctxPath, warUrl); -ClassLoader loader = warInfo.getClassLoader(); -Element webApp = warInfo.getWebApp(); -Element jbossWeb = warInfo.getJbossWeb(); try { +WebApplication warInfo = performDeploy(ctxPath, warUrl); +ClassLoader loader = warInfo.getClassLoader(); +Element webApp = warInfo.getWebApp(); +Element jbossWeb = warInfo.getJbossWeb(); parseWebAppDescriptors(loader, webApp, jbossWeb); +deploymentMap.put(warUrl, warInfo); } +catch(DeploymentException e) +{ +throw (DeploymentException) e.fillInStackTrace(); +} catch(Exception e) { -throw new DeploymentException(Failed during parseWebAppDescriptors, e); +throw new DeploymentException(Error during deploy, e); } -deploymentMap.put(warUrl, warInfo); } /** The method called by the deploy() method that must be overriden by @@ -102,7 +106,7 @@ AbstractWebContainer class to setup the JNDI ENC and track the war deployment status. */ -protected abstract WebApplication performDeploy(String ctxPath, String warUrl) throws DeploymentException; +protected abstract WebApplication performDeploy(String ctxPath, String warUrl) throws Exception; /** A template pattern implementation of the undeploy() method. This method calls the {@link #performUndeploy(String) performUndeploy()} method to @@ -111,11 +115,22 @@ */ public synchronized void undeploy(String warUrl) throws DeploymentException { -performUndeploy(warUrl); -// Remove the web application ENC... -deploymentMap.remove(warUrl); +try +{ +performUndeploy(warUrl); +// Remove the web application ENC... +deploymentMap.remove(warUrl); +} +catch(DeploymentException e) +{ +throw (DeploymentException) e.fillInStackTrace(); +} +catch(Exception e) +{ +throw new DeploymentException(Error during deploy, e); +} } -protected abstract void performUndeploy(String warUrl) throws DeploymentException; +protected abstract void performUndeploy(String warUrl) throws Exception; /** See if a war is deployed. */ public boolean isDeployed(String warUrl) ___ Jboss-development mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] (no subject)
___ Jboss-development mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-development
Re[2]: [JBoss-dev] Vrifier
Hi marc, mf we were having the worst time getting this to work in London, in fact I mf remember a night where Juha stayed up until 2 am and couldn't get that and mf EJBDoclet to work easily (I was watching late night poker). mf If you had a small howto ;) You mean a howto about using ejbdoclet ? Please register my id ibruell for write access. so long Ingo Bruell --- [EMAIL PROTECTED] [EMAIL PROTECTED] ICQ# 40377720 OldenburgPGP-Fingerprint: CB01 AE12 B359 87C4 BF1C 953C 8FE7 C648 169E E5FC Germany PGP-Public-Key available at pgpkeys.mit.edu ___ Jboss-development mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-development
RE: [JBoss-dev] Main.java, let's clean it up
We will keep it, I really want to add the possibility to parse a URL though marc |-Original Message- |From: [EMAIL PROTECTED] |[mailto:[EMAIL PROTECTED]]On Behalf Of Scott |M Stark |Sent: Tuesday, May 08, 2001 2:25 PM |To: [EMAIL PROTECTED] |Subject: Re: [JBoss-dev] Main.java, let's clean it up | | |The patchdir thing is something that I added so that one could |create a patch |of a given binary release. It was how I tested the initial JBossSX stuff. | |- Original Message - |From: marc fleury [EMAIL PROTECTED] |To: [EMAIL PROTECTED] |Sent: Monday, May 07, 2001 7:33 PM |Subject: RE: [JBoss-dev] Main.java, let's clean it up | | | can you be more specific, | | do you use it with releases from us (since we don't really release a | patchdir...) or do you do it yourself. Please describe | | marc | | | |-Original Message- | |From: [EMAIL PROTECTED] | |[mailto:[EMAIL PROTECTED]]On Behalf Of danch | |Sent: Monday, May 07, 2001 10:27 PM | |To: [EMAIL PROTECTED] | |Subject: Re: [JBoss-dev] Main.java, let's clean it up | | | | | |marc fleury wrote: | | | | Ok is the patchdir stuff used at all? | | | |I've used that a couple of times. | | | | | | | | | | marc | | | | | |___ |Jboss-development mailing list |[EMAIL PROTECTED] |http://lists.sourceforge.net/lists/listinfo/jboss-development ___ Jboss-development mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-development
RE: [JBoss-dev] TODO List on SourceForge
if it is gone ... good :))) marc |-Original Message- |From: [EMAIL PROTECTED] |[mailto:[EMAIL PROTECTED]]On Behalf Of Scott |M Stark |Sent: Wednesday, May 09, 2001 11:20 AM |To: [EMAIL PROTECTED] |Subject: Re: [JBoss-dev] TODO List on SourceForge | | |Where are you seeing the use of the btye[]/InputStream.available construct |as in: |byte[] buffer = new byte[input.available()]; |input.read(buffer); | |I searched the entire jboss org/jboss codebase and I cannot find |any existing |uses of this construct. | |- Original Message - |From: Juha Lindfors [EMAIL PROTECTED] |To: [EMAIL PROTECTED] |Sent: Tuesday, May 08, 2001 2:47 PM |Subject: Re: [JBoss-dev] TODO List on SourceForge | | | At 10:02 8.5.2001 +0100, Simone wrote: |o ConfigurationService and the byte[] bug (solved perhaps ?) | | unfortunately looks like this bug has creeped into many places... need to | clear them all. | | -- Juha | | | | |___ |Jboss-development mailing list |[EMAIL PROTECTED] |http://lists.sourceforge.net/lists/listinfo/jboss-development ___ Jboss-development mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-development
RE: Re[2]: [JBoss-dev] Vrifier
done marc |-Original Message- |From: [EMAIL PROTECTED] |[mailto:[EMAIL PROTECTED]]On Behalf Of Ingo |Bruell |Sent: Wednesday, May 09, 2001 3:16 PM |To: marc fleury |Subject: Re[2]: [JBoss-dev] Vrifier | | |Hi marc, | |mf we were having the worst time getting this to work in London, in fact I |mf remember a night where Juha stayed up until 2 am and couldn't |get that and |mf EJBDoclet to work easily (I was watching late night poker). | |mf If you had a small howto ;) | |You mean a howto about using ejbdoclet ? | |Please register my id ibruell for write access. | | |so long | | |Ingo Bruell | |--- |[EMAIL PROTECTED] |[EMAIL PROTECTED] |ICQ# 40377720 |OldenburgPGP-Fingerprint: CB01 AE12 B359 87C4 BF1C 953C 8FE7 |C648 169E E5FC |Germany PGP-Public-Key available at pgpkeys.mit.edu | | | |___ |Jboss-development mailing list |[EMAIL PROTECTED] |http://lists.sourceforge.net/lists/listinfo/jboss-development ___ Jboss-development mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-development
RE: [JBoss-dev] ContainerFactory cont.
Scott, we are not communicating my question is does anyone else in THE SOURCE CODE use this class (which is the only reason you would want to factor it out). Right now and afaik only the container conf uses it and I couldn't find any other container with the externalization feature we put it Other than that, I am perfectly aware of the fact every user component uses stacks of interceptors and some even change it hee hee... that is why I asked for this feature in the first place grin/ we are not communicating, shame, cause we need to work together and get that codebase cleaned-up and ready for the JBoss 2.4/2.6 - JBoss 3.0 push Let's start communicating, probably on Monday when you come help me face to face with the big Atlanta training. :) marc PS: it is a minor refactoring point, drop it Dr., drop it. |-Original Message- |From: [EMAIL PROTECTED] |[mailto:[EMAIL PROTECTED]]On Behalf Of Scott |M Stark |Sent: Tuesday, May 08, 2001 3:28 PM |To: [EMAIL PROTECTED] |Subject: Re: [JBoss-dev] ContainerFactory cont. | | |Everyone uses it. This is simply a utility class that installs the |container |interceptors as defined by the configuration. | | Finally why the static call to stacks initialization |ContainerInterceptors.addInterceptors(container, transType, | metricsEnabled, conf.getContainerInterceptorsConf()); | ? | | Does anyone else use it? | | marc | | _ | Marc Fleury, Ph.D | [EMAIL PROTECTED] | _ | | | ___ | Jboss-development mailing list | [EMAIL PROTECTED] | http://lists.sourceforge.net/lists/listinfo/jboss-development | | | |___ |Jboss-development mailing list |[EMAIL PROTECTED] |http://lists.sourceforge.net/lists/listinfo/jboss-development ___ Jboss-development mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-development
RE: [JBoss-dev] METHOD-INVOCATION
| 2- The security, do we associate the Principal to the ctx |somewhere else? I | don't believe we should associate to the ctx (see warning in |source, I also | need to update these). Scott do you take care of associating the |ctx to the | principal somewhere else? | |The prinicpal identity and credentials is taken from the MethodInfocation |object and if validated, set as a property of the invocation thread using |the SecurityAssociation class. In the JAAS version there is also a thread |local Subject established. I was asking about the ctx association, I am saying so because I don't believe you have a context yet, your security interceptor is before the ctx interceptor marc | | | |___ |Jboss-development mailing list |[EMAIL PROTECTED] |http://lists.sourceforge.net/lists/listinfo/jboss-development ___ Jboss-development mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-development
Re: [JBoss-dev] METHOD-INVOCATION
Ok, right. I don't try to access the EnterpriseContext associated with the MethodInvocation and if I did, it would not have been set yet. - Original Message - From: marc fleury [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, May 09, 2001 3:13 PM Subject: RE: [JBoss-dev] METHOD-INVOCATION | 2- The security, do we associate the Principal to the ctx |somewhere else? I | don't believe we should associate to the ctx (see warning in |source, I also | need to update these). Scott do you take care of associating the |ctx to the | principal somewhere else? | |The prinicpal identity and credentials is taken from the MethodInfocation |object and if validated, set as a property of the invocation thread using |the SecurityAssociation class. In the JAAS version there is also a thread |local Subject established. I was asking about the ctx association, I am saying so because I don't believe you have a context yet, your security interceptor is before the ctx interceptor marc ___ Jboss-development mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] CVS update: contrib/jetty/src/main/org/jboss/jetty JettyService.java
User: jules_gosnell Date: 01/05/09 15:46:01 Modified:jetty/src/main/org/jboss/jetty JettyService.java Log: hold off on allocating a Jetty instance until initService() is called do the correct thing in destroyService() Revision ChangesPath 1.11 +199 -125 contrib/jetty/src/main/org/jboss/jetty/JettyService.java Index: JettyService.java === RCS file: /cvsroot/jboss/contrib/jetty/src/main/org/jboss/jetty/JettyService.java,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- JettyService.java 2001/05/08 23:18:40 1.10 +++ JettyService.java 2001/05/09 22:45:59 1.11 @@ -33,7 +33,7 @@ * * @see related * @author a href=mailto:[EMAIL PROTECTED];Julian Gosnell/a - * @version $Revision: 1.10 $ + * @version $Revision: 1.11 $ */ class JettyMBean extends HttpServerMBean @@ -44,52 +44,80 @@ super(jetty); } -protected String newObjectName(MBeanServer server) + protected String +newObjectName(MBeanServer server) { return super.newObjectName(server); } -// protected String -// newObjectName(String prefix, MBeanServer server) -// { -// return uniqueObjectName(server, prefix); -// } + // protected String + // newObjectName(String prefix, MBeanServer server) + // { + // return uniqueObjectName(server, prefix); + // } } -public class JettyService extends ServiceMBeanSupport - implements JettyServiceMBean, MBeanRegistration +class JettyLog extends Log { - class JettyLog extends Log - { -Object _source=null; // should really be in same package as Log + Object _source=null; // should really be in same package as Log -public - JettyLog() -{ - super(); -} + public +JettyLog() + { +super(); + } -public - JettyLog(Object source) -{ - super(source); - _source=source;// hack -} + public +JettyLog(Object source) + { +super(source); +_source=source; // hack + } -public void - log(String type, String message) -{ - Logger.getLogger().fireNotification(type, _source, message); -} + public void +log(String type, String message) + { +Logger.getLogger().fireNotification(type, _source, message); } +} +public class JettyService extends ServiceMBeanSupport + implements JettyServiceMBean, MBeanRegistration +{ public static final String NAME = Jetty; Log _log = new JettyLog(getName()); JBossLogSink _logSink = new JBossLogSink(); JettyMBean _mbean = null; - Jetty_jetty = null; - MBeanServer _server =null; + Jetty_jetty = null; + MBeanServer _server = null; + + // + // hack city... + // + + protected static String _jettyHome=_getJettyHome(); + + static public String +_getJettyHome() + { +try +{ + Class jettyClass = Class.forName(com.mortbay.HTTP.HttpServer); + URL jettyUrl = jettyClass.getProtectionDomain().getCodeSource().getLocation(); + String jettyHome = new File(new File(jettyUrl.getFile()).getParent()).getParent(); + return jettyHome; +} +catch (Exception e) +{ + com.mortbay.Util.Log.event(Could not figure out JBOSS_HOME - com.mortbay.HTTP.HttpServer displaced); +} + +return null; + } + + // + public ObjectName preRegister(MBeanServer server, ObjectName name) throws java.lang.Exception @@ -97,56 +125,54 @@ name = getObjectName(server, name); _server = server; -try {ensureService();} catch (Exception e) {e.printStackTrace();} - return name; } + + // protected void -ensureService() -throws Exception +ensureLogging() { -{ - try{_logSink.initialize(_log);}catch(Exception e){e.printStackTrace();} - _logSink.start(); - com.mortbay.Util.Log.instance().disableLog(); // remove default logger - com.mortbay.Util.Log.instance().add(_logSink); +try{_logSink.initialize(_log);}catch(Exception e){e.printStackTrace();} +_logSink.start(); +com.mortbay.Util.Log.instance().disableLog(); // remove default logger +com.mortbay.Util.Log.instance().add(_logSink); - com.mortbay.Util.Log.event(JBoss and Jetty Log models connected); -} - -{ - InputStream propertiesIn =
RE: [JBoss-dev] Main.java, let's clean it up
Is this going to include merging jboss.conf and jboss.jcml into one file (or perhaps using a standard jboss.conf from a class resource for boot-strapping) or will there still be two files? --jason On Wed, 9 May 2001, marc fleury wrote: |The setting of the security manager and server.policy file are |better done from |the command line as many security related events and debugging hooks are |done on startup of the vm. I don't think these should be set at all from |within the server. Setting the thread-local mode of the SecurityAssociation |could be moved to an mbean. either command line or xml file. whichever you feel is more admin friendly or both. I want to be done with the properties file asap. Let's simplify, the properties files is a big ZIT in our face and I want to squeeze it splatch h feels good doesn't it? |If I comment out the call to DocumentBuilderFactory.newInstance() I am |still able to switch the xml parsers using the JAXP properties so |I don't see |that this call has any effect other than preloading the parser classes. The |xml parser settings could be moved to an MLet. kaay voodoo refactoring if I move this does it die? nope... ok then... :) we should configure the xml stuff in a mlet as well, although it should be one of the first ones (we do the mbean based on xml :) marc | | | |___ |Jboss-development mailing list |[EMAIL PROTECTED] |http://lists.sourceforge.net/lists/listinfo/jboss-development ___ Jboss-development mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-development ___ Jboss-development mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-development
RE: [JBoss-dev] METHOD-INVOCATION
From SecurityInterceptor invoke() Object bean = mi.getEnterpriseContext().getInstance(); EJBContext ctx = mi.getEnterpriseContext().getEJBContext(); Object[] args = mi.getArguments(); securityProxy.setEJBContext(ctx); You get the context (!) and then the instance and ejbcontext from it. The context, itself, is not set, your interceptor is before the acquisition.. surprised you don't have NPEs everywhere Let's take it private, no need to bother the list with clean-ups marc |-Original Message- |From: [EMAIL PROTECTED] |[mailto:[EMAIL PROTECTED]]On Behalf Of Scott |M Stark |Sent: Wednesday, May 09, 2001 6:45 PM |To: [EMAIL PROTECTED] |Subject: Re: [JBoss-dev] METHOD-INVOCATION | | |Ok, right. I don't try to access the EnterpriseContext associated with the |MethodInvocation and if I did, it would not have been set yet. | |- Original Message - |From: marc fleury [EMAIL PROTECTED] |To: [EMAIL PROTECTED] |Sent: Wednesday, May 09, 2001 3:13 PM |Subject: RE: [JBoss-dev] METHOD-INVOCATION | | | | | 2- The security, do we associate the Principal to the ctx | |somewhere else? I | | don't believe we should associate to the ctx (see warning in | |source, I also | | need to update these). Scott do you take care of associating the | |ctx to the | | principal somewhere else? | | | |The prinicpal identity and credentials is taken from the |MethodInfocation | |object and if validated, set as a property of the invocation |thread using | |the SecurityAssociation class. In the JAAS version there is |also a thread | |local Subject established. | | I was asking about the ctx association, I am saying so because I don't | believe you have a context yet, your security interceptor is |before the ctx | interceptor | | marc | | | |___ |Jboss-development mailing list |[EMAIL PROTECTED] |http://lists.sourceforge.net/lists/listinfo/jboss-development ___ Jboss-development mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-development
RE: [JBoss-dev] METHOD-INVOCATION
acquisition.. surprised you don't have NPEs everywhere Let's take it private, no need to bother the list with clean-ups no keep it public, it is a good learning process. Filip ~ Namaste - I bow to the divine in you ~ Filip Hanik Software Architect [EMAIL PROTECTED] www.filip.net ___ Jboss-development mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-development
Re: [JBoss-dev] jboss/servlet container test suite???
Scott, Thanks for the AbstractWebContainer - just what I need. I now have a version of JettyService inheriting from this and implementing perform[Un]deploy(). I haven't checked it back in yet as I am passing back the web.xml and jboss-web.xml Elements as null at the moment and this is breaking deployment. Tomorrow (today) I shall talk to Greg about exposing these through an interface that I can use and returning them to you. (I was adding a ContentHandler to his XmlParser). As soon as we have that sorted I shall check it all in. I have had interest expressed in the JAAS stuff as well, so am looking forward to sorting that out with you soon. Please keep me posted, Jules --- Scott M Stark [EMAIL PROTECTED] wrote: I would wait as the JNDI mapping is already done and I'll check this in tonight. The interface is org.w3c.dom.Element. The security support should be complete in a week or so. - Original Message - From: Julian Gosnell [EMAIL PROTECTED] To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Tuesday, May 08, 2001 1:15 PM Subject: Re: [JBoss-dev] jboss/servlet container test suite??? Should I forget about redoing this in jboss_jetty and wait for you then ? - this sounds like a better solution to me. Do you have an ETA?? What is the interface - SAX[12], DOM ??? Jules --- Scott M Stark [EMAIL PROTECTED] wrote: This is somthing I am prototyping. It is an abstract mbean that maps the following given the web-app.xml and jboss-web.xml root elements: - resource-ref elements - env-entry elements - ejb-ref elements I'm also looking to add support for integrating with the security domain assigned in the jboss-web.xml descriptor so that servlets and ejbs can use the same security manager. ___ Jboss-development mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-development Do You Yahoo!? Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk or your free @yahoo.ie address at http://mail.yahoo.ie ___ Jboss-development mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-development
Re: [JBoss-dev] METHOD-INVOCATION
For the lists benefit as requested. That code block is only executed when one has assigned a security proxy to perform non-delcarative security checks like performing a Subject based permission check. It is never accessed when using the ejb-jar.xml declarative security. Interestingly this code has only been tested with StatefulSessionBeans and it does work only because the standard StatefulSessionBean container interceptor config places the StatefulSessionInstanceInterceptor ahead of the SecurityInterceptor. In general the bean must be available to the non-declarative security code as it is often a function of the bean state so either the SecurityInterceptor needs to come after the bean context interceptor or security needs to be split into declarative/non-declarative steps with seperate interceptors. - Original Message - From: marc fleury [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, May 09, 2001 4:11 PM Subject: RE: [JBoss-dev] METHOD-INVOCATION From SecurityInterceptor invoke() Object bean = mi.getEnterpriseContext().getInstance(); EJBContext ctx = mi.getEnterpriseContext().getEJBContext(); Object[] args = mi.getArguments(); securityProxy.setEJBContext(ctx); You get the context (!) and then the instance and ejbcontext from it. The context, itself, is not set, your interceptor is before the acquisition.. surprised you don't have NPEs everywhere Let's take it private, no need to bother the list with clean-ups marc |-Original Message- |From: [EMAIL PROTECTED] |[mailto:[EMAIL PROTECTED]]On Behalf Of Scott |M Stark |Sent: Wednesday, May 09, 2001 6:45 PM |To: [EMAIL PROTECTED] |Subject: Re: [JBoss-dev] METHOD-INVOCATION | | |Ok, right. I don't try to access the EnterpriseContext associated with the |MethodInvocation and if I did, it would not have been set yet. | |- Original Message - |From: marc fleury [EMAIL PROTECTED] |To: [EMAIL PROTECTED] |Sent: Wednesday, May 09, 2001 3:13 PM |Subject: RE: [JBoss-dev] METHOD-INVOCATION | | | | | 2- The security, do we associate the Principal to the ctx | |somewhere else? I | | don't believe we should associate to the ctx (see warning in | |source, I also | | need to update these). Scott do you take care of associating the | |ctx to the | | principal somewhere else? | | | |The prinicpal identity and credentials is taken from the |MethodInfocation | |object and if validated, set as a property of the invocation |thread using | |the SecurityAssociation class. In the JAAS version there is |also a thread | |local Subject established. | | I was asking about the ctx association, I am saying so because I don't | believe you have a context yet, your security interceptor is |before the ctx | interceptor | | marc | | | |___ |Jboss-development mailing list |[EMAIL PROTECTED] |http://lists.sourceforge.net/lists/listinfo/jboss-development ___ Jboss-development mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-development ___ Jboss-development mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-development
RE: [JBoss-dev] Main.java, let's clean it up
We could get rid of jboss.conf if we put all the logging and ClasspathExtension in jcml with a corresponding xml snippet. We would still need the conf or the main to set up the configuration service (at least). marc |-Original Message- |From: [EMAIL PROTECTED] |[mailto:[EMAIL PROTECTED]]On Behalf Of Jason |Dillon |Sent: Wednesday, May 09, 2001 7:07 PM |To: [EMAIL PROTECTED] |Subject: RE: [JBoss-dev] Main.java, let's clean it up | | |Is this going to include merging jboss.conf and jboss.jcml into |one file (or |perhaps using a standard jboss.conf from a class resource for |boot-strapping) or will there still be two files? | |--jason | |On Wed, 9 May 2001, marc fleury wrote: | | |The setting of the security manager and server.policy file are | |better done from | |the command line as many security related events and debugging hooks are | |done on startup of the vm. I don't think these should be set at all from | |within the server. Setting the thread-local mode of the |SecurityAssociation | |could be moved to an mbean. | | either command line or xml file. whichever you feel is more |admin friendly | or both. | | I want to be done with the properties file asap. | | Let's simplify, the properties files is a big ZIT in our face |and I want | to squeeze it splatch | | | h feels good doesn't it? | | |If I comment out the call to DocumentBuilderFactory.newInstance() I am | |still able to switch the xml parsers using the JAXP properties so | |I don't see | |that this call has any effect other than preloading the parser |classes. The | |xml parser settings could be moved to an MLet. | | kaay voodoo refactoring if I move this does it die? |nope... ok | then... :) | | we should configure the xml stuff in a mlet as well, although it |should be | one of the first ones (we do the mbean based on xml :) | | marc | | | | | | | | |___ | |Jboss-development mailing list | |[EMAIL PROTECTED] | |http://lists.sourceforge.net/lists/listinfo/jboss-development | | | | ___ | Jboss-development mailing list | [EMAIL PROTECTED] | http://lists.sourceforge.net/lists/listinfo/jboss-development | | | |___ |Jboss-development mailing list |[EMAIL PROTECTED] |http://lists.sourceforge.net/lists/listinfo/jboss-development ___ Jboss-development mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-development
Re: [JBoss-dev] jboss/servlet container test suite???
Actually I have the security integration working and its pretty simple. I have rewritten the tomcat3.2.1 mbean using it and it is working so I'll check in the updated AbstractWebContainer tonight. - Original Message - From: Julian Gosnell [EMAIL PROTECTED] To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Wednesday, May 09, 2001 5:05 PM Subject: Re: [JBoss-dev] jboss/servlet container test suite??? Scott, Thanks for the AbstractWebContainer - just what I need. I now have a version of JettyService inheriting from this and implementing perform[Un]deploy(). I haven't checked it back in yet as I am passing back the web.xml and jboss-web.xml Elements as null at the moment and this is breaking deployment. Tomorrow (today) I shall talk to Greg about exposing these through an interface that I can use and returning them to you. (I was adding a ContentHandler to his XmlParser). As soon as we have that sorted I shall check it all in. I have had interest expressed in the JAAS stuff as well, so am looking forward to sorting that out with you soon. Please keep me posted, Jules ___ Jboss-development mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] jboss daily test results
= ==THIS IS AN AUTOMATED EMAIL - SEE http://www.lubega.com FOR DETAILS= = JBoss daily test results SUMMARY Number of tests run: 67 Successful tests: 61 Errors:2 Failures: 4 DETAILS OF ERRORS Suite: org.jboss.test.cts.test.AllJUnitTests Test:testRemoveSessionObject Type:failure Exception: junit.framework.AssertionFailedError Message: [EJB 1.1, p42] Expected 'RemoveException', detail:java.rmi.ServerException: RemoteException occurred in server thread; nested exception is: javax.transaction.TransactionRolledbackException: Could not activate; nested exception is: java.io.FileNotFoundException: [EMAIL PROTECTED] (No such file or directory); nested exception is: java.rmi.NoSuchObjectException: Could not activate; nested exception is: java.io.FileNotFoundException: [EMAIL PROTECTED] (No such file or directory) Stack Trace: junit.framework.AssertionFailedError: [EJB 1.1, p42] Expected 'RemoveException', detail:java.rmi.ServerException: RemoteException occurred in server thread; nested exception is: javax.transaction.TransactionRolledbackException: Could not activate; nested exception is: java.io.FileNotFoundException: [EMAIL PROTECTED] (No such file or directory); nested exception is: java.rmi.NoSuchObjectException: Could not activate; nested exception is: java.io.FileNotFoundException: [EMAIL PROTECTED] (No such file or directory) at junit.framework.Assert.fail(Assert.java:143) at org.jboss.test.cts.test.StatefulSessionTest.testRemoveSessionObject(StatefulSessionTest.java:187) at java.lang.reflect.Method.invoke(Native Method) at junit.framework.TestCase.runTest(TestCase.java:155) at junit.framework.TestCase.runBare(TestCase.java:129) at junit.framework.TestResult$1.protect(TestResult.java:100) at junit.framework.TestResult.runProtected(TestResult.java:117) at junit.framework.TestResult.run(TestResult.java:103) at junit.framework.TestCase.run(TestCase.java:120) at junit.framework.TestSuite.run(TestSuite.java:144) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:202) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:326) - Suite: org.jboss.test.cts.test.AllJUnitTests Test:testProbeBeanContext Type:failure Exception: junit.framework.AssertionFailedError Message: Caught an unknown exception in testProbeBeanContex Stack Trace: junit.framework.AssertionFailedError: Caught an unknown exception in testProbeBeanContex at junit.framework.Assert.fail(Assert.java:143) at org.jboss.test.cts.test.StatefulSessionTest.testProbeBeanContext(StatefulSessionTest.java:466) at java.lang.reflect.Method.invoke(Native Method) at junit.framework.TestCase.runTest(TestCase.java:155) at junit.framework.TestCase.runBare(TestCase.java:129) at junit.framework.TestResult$1.protect(TestResult.java:100) at junit.framework.TestResult.runProtected(TestResult.java:117) at junit.framework.TestResult.run(TestResult.java:103) at junit.framework.TestCase.run(TestCase.java:120) at junit.framework.TestSuite.run(TestSuite.java:144) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:202) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:326) - Suite: org.jboss.test.cts.test.AllJUnitTests Test:testEjbRemove Type:failure Exception: junit.framework.AssertionFailedError Message: Got Exception: expecting NoSuchObjectExceptionjava.rmi.ServerException: RemoteException occurred in server thread; nested exception is: javax.transaction.TransactionRolledbackException: Instance 007 not found in database.; nested exception is: javax.ejb.NoSuchEntityException: Instance 007 not found in database. Stack Trace: junit.framework.AssertionFailedError: Got Exception: expecting NoSuchObjectExceptionjava.rmi.ServerException: RemoteException occurred in server thread; nested exception is: javax.transaction.TransactionRolledbackException: Instance 007 not found in database.; nested exception is: javax.ejb.NoSuchEntityException: Instance 007 not found in database. at junit.framework.Assert.fail(Assert.java:143) at org.jboss.test.cts.test.BmpTest.testEjbRemove(BmpTest.java:224) at java.lang.reflect.Method.invoke(Native Method) at junit.framework.TestCase.runTest(TestCase.java:155)
Re: [JBoss-dev] LogInterceptor
The LogInterceptor iteself should certainly stay. I just want to replace the logging calls with log4j based calls and add some additional log calls with finer priority granularity so that different levels of runtime diagnostics can be acquired as needed. - Original Message - From: marc fleury [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, May 09, 2001 3:13 PM Subject: RE: [JBoss-dev] LogInterceptor sure... we should spec that out... the interceptor design of Rickard was kinda cool (a pop/push stack) though so that it works from more than one interceptor I certainly don't want to remove that. marc |-Original Message- |From: [EMAIL PROTECTED] |[mailto:[EMAIL PROTECTED]]On Behalf Of Scott |M Stark |Sent: Tuesday, May 08, 2001 3:26 PM |To: [EMAIL PROTECTED] |Subject: Re: [JBoss-dev] LogInterceptor | | |Logging in general is not sufficient in JBoss. I believe we need to move |to using log4j with some additional priorities so that one can truly |understand what is going on in arbitrary detail at the flick of a JMX |switch. | ___ Jboss-development mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] CVS update: jboss/src/main/org/jboss/ejb/plugins SecurityInterceptor.java
User: starksm Date: 01/05/09 20:19:54 Modified:src/main/org/jboss/ejb/plugins SecurityInterceptor.java Log: Make the SecurityException msgs more descriptive Revision ChangesPath 1.15 +8 -5 jboss/src/main/org/jboss/ejb/plugins/SecurityInterceptor.java Index: SecurityInterceptor.java === RCS file: /cvsroot/jboss/jboss/src/main/org/jboss/ejb/plugins/SecurityInterceptor.java,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- SecurityInterceptor.java 2001/03/30 10:40:58 1.14 +++ SecurityInterceptor.java 2001/05/10 03:19:54 1.15 @@ -39,7 +39,7 @@ @author a href=[EMAIL PROTECTED]Oleg Nitz/a @author [EMAIL PROTECTED] -@version $Revision: 1.14 $ +@version $Revision: 1.15 $ */ public class SecurityInterceptor extends AbstractInterceptor { @@ -208,8 +208,9 @@ Object credential = mi.getCredential(); if( principal == null || securityManager.isValid(principal, credential) == false ) { -Logger.error(Authentication exception, principal=+principal); -SecurityException e = new SecurityException(Authentication exception); +String msg = Authentication exception, principal=+principal; +Logger.error(msg); +SecurityException e = new SecurityException(msg); throw new RemoteException(checkSecurityAssociation, e); } else @@ -225,8 +226,10 @@ if( methodRoles == null || realmMapping.doesUserHaveRole(principal, methodRoles) == false ) { String method = mi.getMethod().getName(); -Logger.error(Illegal access, principal=+principal+ method=+method); -SecurityException e = new SecurityException(Illegal access exception); +String msg = Insufficient method permissions, principal=+principal ++ , method=+method+, requiredRoles=+methodRoles; +Logger.error(msg); +SecurityException e = new SecurityException(msg); throw new RemoteException(checkSecurityAssociation, e); } } ___ Jboss-development mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] CVS update: jboss/src/main/org/jboss/naming Util.java
User: starksm Date: 01/05/09 20:21:30 Modified:src/main/org/jboss/naming Util.java Log: Add createSubcontext utility methods Revision ChangesPath 1.2 +37 -10jboss/src/main/org/jboss/naming/Util.java Index: Util.java === RCS file: /cvsroot/jboss/jboss/src/main/org/jboss/naming/Util.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- Util.java 2001/05/09 08:15:02 1.1 +++ Util.java 2001/05/10 03:21:30 1.2 @@ -9,30 +9,57 @@ /** A static utility class for common JNDI operations. * - * @author [EMAIL PROTECTED] - * @version + * @author [EMAIL PROTECTED] + * @version $Revision: 1.2 $ */ public class Util { -/** Bind val to name in ctx, and make sure that all intermediate contexts exist +/** Create a subcontext including any intermediate contexts. +@param ctx, the parent JNDI Context under which value will be bound +@param name, the name relative to ctx of the subcontext. +@return The new or existing JNDI subcontext +@throws NamingException, on any JNDI failure */ -public static void bind(Context ctx, String name, Object value) throws NamingException +public static Context createSubcontext(Context ctx, String name) throws NamingException { Name n = ctx.getNameParser().parse(name); -while( n.size() 1 ) +return createSubcontext(ctx, n); +} +/** Create a subcontext including any intermediate contexts. +@param ctx, the parent JNDI Context under which value will be bound +@param name, the name relative to ctx of the subcontext. +@return The new or existing JNDI subcontext +@throws NamingException, on any JNDI failure +*/ +public static Context createSubcontext(Context ctx, Name name) throws NamingException +{ +Context subctx = ctx; +for(int pos = 0; pos name.size(); pos ++) { -String ctxName = n.get(0); +String ctxName = name.get(pos); try { -ctx = (Context) ctx.lookup(ctxName); +subctx = (Context) ctx.lookup(ctxName); } catch(NameNotFoundException e) { -ctx = ctx.createSubcontext(ctxName); +subctx = ctx.createSubcontext(ctxName); } -n = n.getSuffix(1); } -ctx.bind(n.get(0), value); +return subctx; +} + +/** Bind val to name in ctx, and make sure that all intermediate contexts exist +@param ctx, the parent JNDI Context under which value will be bound +@param name, the name relative to ctx where value will be bound +@param value, the value to bind. +*/ +public static void bind(Context ctx, String name, Object value) throws NamingException +{ +Name n = ctx.getNameParser().parse(name); +String atom = n.get(n.size()-1); +Context parentCtx = createSubcontext(ctx, n.getPrefix(n.size()-1)); +parentCtx.bind(atom, value); } } ___ Jboss-development mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] CVS update: jboss/src/main/org/jboss/metadata WebMetaData.java
User: starksm Date: 01/05/09 20:20:34 Modified:src/main/org/jboss/metadata WebMetaData.java Log: Add support for a security-domain element Revision ChangesPath 1.2 +19 -4 jboss/src/main/org/jboss/metadata/WebMetaData.java Index: WebMetaData.java === RCS file: /cvsroot/jboss/jboss/src/main/org/jboss/metadata/WebMetaData.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- WebMetaData.java 2001/05/09 08:18:47 1.1 +++ WebMetaData.java 2001/05/10 03:20:34 1.2 @@ -18,11 +18,11 @@ * descriptors as used by the AbstractWebContainer web container integration * support class. * - * @see XmlLoadable - * @see org.jboss.web.AbstractWebContainer + * @see XmlLoadable + * @see org.jboss.web.AbstractWebContainer - * @author [EMAIL PROTECTED] - * @version $Revision: 1.1 $ + * @author [EMAIL PROTECTED] + * @version $Revision: 1.2 $ */ public class WebMetaData implements XmlLoadable { @@ -57,6 +57,16 @@ { return resourceReferences.values().iterator(); } +/** Return the optional security-domain jboss-web.xml element. +@return The jndiName of the security manager implementation that is +responsible for security of the web application. May be null if +there was no security-domain specified in the jboss-web.xml +descriptor. +*/ +public String getSecurityDomain() +{ +return securityDomain; +} public void importXml(Element element) throws Exception { @@ -110,6 +120,11 @@ */ protected void importJBossWebXml(Element jbossWeb) throws Exception { +// Parse the jboss-web/securityDomain element +Element securityDomainElement = MetaData.getOptionalChild(jbossWeb, security-domain); +if( securityDomainElement != null ) +securityDomain = MetaData.getElementContent(securityDomainElement); + // Parse the jboss-web/resource-ref elements Iterator iterator = MetaData.getChildrenByTagName(jbossWeb, resource-ref); while( iterator.hasNext() ) ___ Jboss-development mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] CVS update: jboss/src/resources/org/jboss/metadata jboss-web.dtd
User: starksm Date: 01/05/09 21:19:13 Modified:src/resources/org/jboss/metadata jboss-web.dtd Log: Add a security-domain element Revision ChangesPath 1.2 +23 -1 jboss/src/resources/org/jboss/metadata/jboss-web.dtd Index: jboss-web.dtd === RCS file: /cvsroot/jboss/jboss/src/resources/org/jboss/metadata/jboss-web.dtd,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- jboss-web.dtd 2001/05/09 07:14:21 1.1 +++ jboss-web.dtd 2001/05/10 04:19:13 1.2 @@ -5,12 +5,34 @@ -- !-- The jboss-web element is the root element. -- -!ELEMENT jboss-web (resource-ref* , ejb-ref*) +!ELEMENT jboss-web (security-domain?, resource-ref* , ejb-ref*) +!-- The security-domain element allows one to specify a module wide +security manager domain. It specifies the JNDI name of the security +manager that implements the EJBSecurityManager and RealmMapping for +the domain. +-- +!ELEMENT security-domain (#PCDATA) + +!-- The ejb-ref element maps from the servlet ENC relative name +of the ejb reference to the deployment environment JNDI name of +the bean. +Example: +ejb-ref +ejb-ref-nameejb/Bean0/ejb-ref-name +jndi-namedeployed/ejbs/Bean0/jndi-name +/ejb-ref +-- !ELEMENT ejb-ref (ejb-ref-name , jndi-name) +!-- The ejb-ref-name element gives the ENC relative name used +in the web-app.xml ejb-ref-name element. +-- !ELEMENT ejb-ref-name (#PCDATA) +!-- The jndi-name element specifies the JNDI name of the deployed +EJB home interface to which the servlet ENC binding will link to. +-- !ELEMENT jndi-name (#PCDATA) !ELEMENT resource-ref (res-ref-name , jndi-name) ___ Jboss-development mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-development