OK - that's not so bad. I can interface Jetty to it - no problem. I'm still a little concerned about this centralisation creeping outwards. Are ports the only resource over which different instances of JBoss running on the same box are likely to collide ?
We should also bear in mind that certain services are usually expected on particular ports. Reconfiguring the client side to know where the new port is may be just as important as telling the server side where to listen. You port service will need to allocate/deallocate and lookup ports (and throw PortAlreadyAllocated and NoSuchPort Exceptions). Or is this becoming too complicated ? Jules Dain Sundstrom wrote: > [I moved this to the dev list] > > I think the real power of JMX is you can have disparate components that > can all talk to a central object without becoming tightly coupled. > > Here is my idea: > > We have an optional port server MBean. Before a service opens a port it > checks for the existence of the port server, and if (and only if) it > exists, it asks the port server for a port passing the service name and > port name (both are just any string). If the port service doesn't > exist, it follows the default code. > > This would require that the MBean wrappers for any serveice that opens a > port to follow know about the possibility of a port service, but I don't > think that is a big deal. Most MBeans already know about many services. > > Whatever we do, we must have this feature. I think this is the simplest > possible solution, but I don't care which solution we use. It is > completely unreasonable to make sys admins edit tons of files just to > run two jboss instances on the same physical hardware. > > -dain > > Jules Gosnell wrote: > >> In the hottub, and under the influence of beer, I did not crystallise >> my reasoning well. Now sober I shall try. >> >> JBoss is a fairly loosely bound community of JMX services. By loosely >> bound I mean that the mandatory interfaces specified between these >> services are as simple and thus non-constraining as possible. >> >> A direct side effect of this is that each service must necessarily >> manage it's own configuration (but JMX is a good vehicle for this). >> >> If we start down the path of trying to centralise configuration we >> will, IMHO, have to complicate the contracts between services (i.e. >> Jetty will have to tell another service that it requires a port). This >> immediately constrains services to an API that may not fit (Jetty may >> serve as many ports as it chooses) and raises the bar for new >> integrations (it won't just be ports that become centrally managed - >> so the APIs becoe bigger and more complex). >> >> JBoss is more flexible and has a much more Open feel to it because of >> these minimal contracts. Tightening them up would sacrifice this. >> >> I can see exactly where people who want this central management >> fnality are coming from. If I think of a nice solution I shall post..... >> >> Comments ? >> >> >> Jules >> >> >> Dain Sundstrom wrote: >> >>> This is a feature I have wanted for a while. We discussed this at >>> the JBoss retreat, but no one can seem to decide on how to pull it >>> off. I think we should support a ports file (MBean) which the other >>> services would look to first for the port numbers, but they didn't >>> like that. I can't really remember why (I was a little drunk at the >>> time). >>> >>> -dain >>> >>> Emerson Cargnin - MSA wrote: >>> >>>> Has someone used Jboss for development in a centralizazed way? >>>> I mean, jboss (along with developer IDE, Eclipse) being used in a huge >>>> machine, one instance per developer. I think the problem should be >>>> in the >>>> ports used by jboss, what woul'd conflict with others developers >>>> instances. >>>> Is there any automatic way to configure an enviroment like that??? >>>> >>>> >>>> ----- Original Message ----- >>>> From: "Emerson Cargnin - MSA" <[EMAIL PROTECTED]> >>>> To: <[EMAIL PROTECTED]> >>>> Sent: Monday, May 20, 2002 10:31 AM >>>> Subject: Re: [JBoss-user] jboss 3.0.0 db configure >>>> >>>> >>>> >>>>> put the following in standardjbosscmp.xml file. >>>>> >>>>> <defaults> >>>>> <datasource>java:/OracleDS</datasource> >>>>> <datasource-mapping>Oracle8</datasource-mapping> >>>>> </defaults> >>>>> >>>>> and here goes my working oracle-services.xml : >>>>> >>>>> <?xml version="1.0" encoding="UTF-8"?> >>>>> <!-- >>>>> ===================================================================== >>>>> --> >>>>> <!-- --> >>>>> <!-- JBoss Server Configuration --> >>>>> <!-- --> >>>>> <!-- >>>>> ===================================================================== >>>>> --> >>>>> <server> >>>>> <!-- >>>>> ==================================================================== >>>>> --> >>>>> <!-- ConnectionManager setup for Oracle dbs --> >>>>> <!-- Build jmx-api (build/build.sh all) and view for config >>>>> documentation --> >>>>> <!-- Thanks to Steven Coy --> >>>>> <!-- >>>>> ==================================================================== >>>>> --> >>>>> <mbean >>>>> >>>> code="org.jboss.resource.connectionmanager.LocalTxConnectionManager" >>>> >>>>> name="jboss.jca:service=LocalTxCM,name=OracleDS"> >>>>> >>>>> <!-- Include a login module configuration named OracleDbRealm. >>>>> Update your login-conf.xml, here is an example for a >>>>> ConfiguredIdentityLoginModule: >>>>> <application-policy name = "OracleDbRealm"> >>>>> <authentication> >>>>> <login-module code = >>>>> "org.jboss.resource.security.ConfiguredIdentityLoginModule" flag = >>>>> "required"> >>>>> <module-option name = "principal">yourprincipal</module-option> >>>>> <module-option name = "userName">yourusername</module-option> >>>>> <module-option name = "password">yourpassword</module-option> >>>>> <module-option name = >>>>> >>>>> >>>> "managedConnectionFactoryName">jboss.jca:service=LocalTxCM,name=OracleDS</mo >>>> >>>> >>>>> dule-option> >>>>> </login-module> >>>>> </authentication> >>>>> </application-policy> >>>>> NOTE: the application-policy name attribute must match >>>>> SecurityDomainJndiName, and the >>>>> module-option name = "managedConnectionFactoryName" >>>>> must match the object name of the ConnectionManager you are >>>>> configuring >>>>> here. >>>>> --> >>>>> <!--comment out this line if you want component managed security or >>>>> want >>>>> to use the default values in the ManagedConnectionFactoryProperties >>>>> <attribute name="SecurityDomainJndiName">OracleDbRealm</attribute> --> >>>>> <depends optional-attribute-name="ManagedConnectionFactoryName"> >>>>> <!--embedded mbean--> >>>>> <mbean code="org.jboss.resource.connectionmanager.RARDeployment" >>>>> name="jboss.jca:service=LocalTxDS,name=OracleDS"> >>>>> <attribute name="JndiName">OracleDS</attribute> >>>>> <attribute name="ManagedConnectionFactoryProperties"> >>>>> <properties> >>>>> <config-property name="ConnectionURL" >>>>> >>>>> >>>> type="java.lang.String">jdbc:oracle:thin:@10.1.0.26:1521:oradev</config-prop >>>> >>>> >>>>> erty> >>>>> <config-property name="DriverClass" >>>>> type="java.lang.String">oracle.jdbc.driver.OracleDriver</config-property> >>>>> >>>>> <!--set these only if you want only default logins, not through >>>>> JAAS --> >>>>> <config-property name="UserName" >>>>> type="java.lang.String">aluno1</config-property> >>>>> <config-property name="Password" >>>>> type="java.lang.String">aluno1</config-property> >>>>> </properties> >>>>> </attribute> >>>>> <!--Below here are advanced properties --> >>>>> <!--hack--> >>>>> <depends >>>>> >>>>> >>>> optional-attribute-name="OldRarDeployment">jboss.jca:service=RARDeployment,n >>>> >>>> >>>>> ame=JBoss LocalTransaction JDBC Wrapper</depends> >>>>> </mbean> >>>>> </depends> >>>>> <depends optional-attribute-name="ManagedConnectionPool"> >>>>> <!--embedded mbean--> >>>>> <mbean >>>>> code="org.jboss.resource.connectionmanager.JBossManagedConnectionPool" >>>>> name="jboss.jca:service=LocalTxPool,name=OracleDS"> >>>>> <attribute name="MinSize">0</attribute> >>>>> <attribute name="MaxSize">50</attribute> >>>>> <attribute name="BlockingTimeoutMillis">5000</attribute> >>>>> <attribute name="IdleTimeoutMinutes">15</attribute> >>>>> <!--criteria indicates if Subject (from security domain) or app >>>>> supplied >>>>> parameters (such as from getConnection(user, pw)) are used to >>>>> distinguish >>>>> connections in the pool. Choices are >>>>> ByContainerAndApplication (use both), >>>>> ByContainer (use Subject), >>>>> ByApplication (use app supplied params only), >>>>> ByNothing (all connections are equivalent, usually if adapter supports >>>>> reauthentication)--> >>>>> <attribute name="Criteria">ByNothing</attribute> >>>>> </mbean> >>>>> </depends> >>>>> <depends >>>>> >>>>> >>>> optional-attribute-name="CachedConnectionManager">jboss.jca:service=CachedCo >>>> >>>> >>>>> nnectionManager</depends> >>>>> <depends >>>>> >>>>> >>>> optional-attribute-name="JaasSecurityManagerService">jboss.security:name=Jaa >>>> >>>> >>>>> sSecurityManager</depends> >>>>> <attribute >>>>> name="TransactionManager">java:/TransactionManager</attribute> >>>>> <!--make the rar deploy! hack till better deployment--> >>>>> <depends>jboss.jca:service=RARDeployer</depends> >>>>> </mbean> >>>>> >>>>> </server> >>>>> >>>>> ----- Original Message ----- >>>>> From: "Cloudor Pu" <[EMAIL PROTECTED]> >>>>> To: <[EMAIL PROTECTED]> >>>>> Sent: Monday, May 20, 2002 5:47 PM >>>>> Subject: RE: [JBoss-user] jboss 3.0.0 db configure >>>>> >>>>> >>>>> hello, >>>>> >>>>> I am setting a mysql connection to Jboss3.0.0rc2 and have >>>>> followed the steps posted at >>>>> http://jboss.org/forums/thread.jsp?forum=67&thread=13366 . >>>>> I modifed "standardjaws.xml" and "standardjbosscmp.xml" to >>>>> make "java:/MySqlDS" as the default datasource. When i start >>>>> jboss, there is no error reported. But when i copy the online >>>>> docs example "cd.jar" to jboss/server/default/deploy/ , i got >>>>> an exception as follows : >>>>> -------------------------------- >>>>> 20:33:25,559 INFO [MainDeployer] Starting deployment of package: >>>>> file:/var/jboss/server/default/deploy/cd.jar >>>>> 20:33:26,883 INFO [EjbModule] Creating >>>>> 20:33:27,046 INFO [EjbModule] Deploying CDBean >>>>> 20:33:29,858 INFO [EjbModule] Deploying CDCollectionBean >>>>> 20:33:34,529 ERROR [EntityContainer] Exception in service lifecyle >>>>> operation: create >>>>> java.sql.SQLException: ResourceException >>>>> javax.resource.ResourceException: Could not create connection >>>>> at >>>>> >>>>> >>>> org.jboss.resource.adapter.jdbc.local.LocalDataSource.getConnection(LocalDat >>>> >>>> >>>>> aSource.java:105) >>>>> at >>>>> >>>>> >>>> org.jboss.ejb.plugins.jaws.jdbc.JDBCCommand.getConnection(JDBCCommand.java:6 >>>> >>>> >>>>> 94) >>>>> at >>>>> >>>>> >>>> org.jboss.ejb.plugins.jaws.jdbc.JDBCInitCommand.execute(JDBCInitCommand.java >>>> >>>> >>>>> :120) >>>>> at >>>>> >>>>> >>>> org.jboss.ejb.plugins.jaws.JAWSPersistenceManager.create(JAWSPersistenceMana >>>> >>>> >>>>> ger.java:130) >>>>> at >>>>> >>>>> >>>> org.jboss.ejb.plugins.CMPPersistenceManager.create(CMPPersistenceManager.jav >>>> >>>> >>>>> a:155) >>>>> at org.jboss.ejb.EntityContainer.create(EntityContainer.java:337) >>>>> at org.jboss.ejb.Container.invoke(Container.java:790) >>>>> ----------------------------------------- >>>>> I would like to know what mis-configurations could cause >>>>> this kind of errors? wrong userName,password,url,and any more? >>>>> >>>>> >>>>> 在 2002-05-20 一 的 09:24, Sacha Labourey 写道: >>>>> >>>>>> Hello, >>>>>> >>>>>> In order to help you with your connection, please provide us with the >>>>>> Exception trace you see. >>>>>> >>>>>> Then, for your second point (CMP), take a look at the free on-line >>>>>> doco >>>>>> >>>>> for >>>>> >>>>>> CMP: you will see how to give the name of the datasource to your CMP >>>>>> >>>>> beans. >>>>> >>>>>> By default, they will use the java:DefaultDS JNDI name which is >>>>>> linked >>>>>> >>>> to >>>> >>>>>> the Hypersonic database that is embedded in JBoss. >>>>>> >>>>>> Cheers, >>>>>> >>>>>> >>>>>> Sacha >>>>>> >>>>>> >>>>>>> -----Message d'origine----- >>>>>>> De : [EMAIL PROTECTED] >>>>>>> [mailto:[EMAIL PROTECTED]]De la part de Centaur >>>>>>> zeus >>>>>>> Envoyé : lundi, 20 mai 2002 11:18 >>>>>>> À : [EMAIL PROTECTED] >>>>>>> Objet : [JBoss-user] jboss 3.0.0 db configure >>>>>>> >>>>>>> >>>>>>> hi all, >>>>>>> >>>>>>> I would like to know how could I set an oracle connection in >>>>>>> Jboss 3.0.0 >>>>>>> ? I search through the web and I found a sample >>>>>>> oracle-service.xml. But when >>>>>>> I put it into the same directory as hypersonic-service.xml, it >>>>>>> >>>> generates >>>> >>>>>>> lots of exceptions during startup. So can any one help me ? >>>>>>> >>>>>>> Also , I would like to know if I could configure which >>>>>>> connection (like >>>>>>> mysql, oracle ) to use when using cmp ? >>>>>>> >>>>>>> Perseus >>>>>>> >>>>>>> >>>>>>> _________________________________________________________________ >>>>>>> Join the world’s largest e-mail service with MSN Hotmail. >>>>>>> http://www.hotmail.com >>>>>>> >>>>>>> >>>>>>> _______________________________________________________________ >>>>>>> Hundreds of nodes, one monster rendering program. >>>>>>> Now that's a super model! Visit http://clustering.foundries.sf.net/ >>>>>>> >>>>>>> _______________________________________________ >>>>>>> JBoss-user mailing list >>>>>>> [EMAIL PROTECTED] >>>>>>> https://lists.sourceforge.net/lists/listinfo/jboss-user >>>>>>> >>>>>>> >>>>>> >>>>>> _______________________________________________________________ >>>>>> Hundreds of nodes, one monster rendering program. >>>>>> Now that's a super model! Visit http://clustering.foundries.sf.net/ >>>>>> >>>>>> _______________________________________________ >>>>>> JBoss-user mailing list >>>>>> [EMAIL PROTECTED] >>>>>> https://lists.sourceforge.net/lists/listinfo/jboss-user >>>>>> >>>>> >>>>> >>>>> _______________________________________________________________ >>>>> Hundreds of nodes, one monster rendering program. >>>>> Now that's a super model! Visit http://clustering.foundries.sf.net/ >>>>> >>>>> _______________________________________________ >>>>> JBoss-user mailing list >>>>> [EMAIL PROTECTED] >>>>> https://lists.sourceforge.net/lists/listinfo/jboss-user >>>>> >>>>> >>>>> _______________________________________________________________ >>>>> Hundreds of nodes, one monster rendering program. >>>>> Now that's a super model! Visit http://clustering.foundries.sf.net/ >>>>> >>>>> _______________________________________________ >>>>> JBoss-user mailing list >>>>> [EMAIL PROTECTED] >>>>> https://lists.sourceforge.net/lists/listinfo/jboss-user >>>>> >>>> >>>> >>>> _______________________________________________________________ >>>> Hundreds of nodes, one monster rendering program. >>>> Now that's a super model! Visit http://clustering.foundries.sf.net/ >>>> >>>> _______________________________________________ >>>> JBoss-user mailing list >>>> [EMAIL PROTECTED] >>>> https://lists.sourceforge.net/lists/listinfo/jboss-user >>>> >>> >>> >>> >>> _______________________________________________________________ >>> Hundreds of nodes, one monster rendering program. >>> Now that's a super model! Visit http://clustering.foundries.sf.net/ >>> >>> _______________________________________________ >>> JBoss-user mailing list >>> [EMAIL PROTECTED] >>> https://lists.sourceforge.net/lists/listinfo/jboss-user >>> >> >> >> >> >> _______________________________________________________________ >> Hundreds of nodes, one monster rendering program. >> Now that's a super model! Visit http://clustering.foundries.sf.net/ >> >> _______________________________________________ >> JBoss-user mailing list >> [EMAIL PROTECTED] >> https://lists.sourceforge.net/lists/listinfo/jboss-user > > > > > _______________________________________________________________ > Hundreds of nodes, one monster rendering program. > Now that's a super model! Visit http://clustering.foundries.sf.net/ > > _______________________________________________ > Jboss-development mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/jboss-development > _______________________________________________________________ Don't miss the 2002 Sprint PCS Application Developer's Conference August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm _______________________________________________ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development