RE: [JBoss-dev] Added support for handles to remember their container
Hello Jason, I also wanted to share some ideas that I had on how to use the modifications that I made with HA or auto-generated env properties. Basically I think ... in a HA aware InitialContextHandle impl that would use jini, raw multicast or whatever to find a suitable container. If anyone else has any ideas on the matter I would like to hear them. If I do not hear anything that I think I will work on implementing the above. Have you tried my implementation of HA for SLSB? (http://194.38.95.241/jboss/) It already implements a possible solution to this issue. In some words (nothing would be more accurate than testing it and reading at the proxy code ;) ), all possible JBoss instances share HA information such as bean location, ... When creating the proxy from the container, we give him information about all possible targets (i.e. JBoss instances containing a replica of the same bean than the current proxy being built). The proxy is then able to use all these different targets when performing invocations (or home lookup, create calls, ...) Furthermore, the current proxy implementation is able to resynch its state with the JBoss cluster (i.e. set of JBoss instances) to update its list of targets (to take in account, for example, newly started nodes). Cheers, Sacha ___ 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 CMPPersistenceManager.java
User: vharcq Date: 01/05/02 04:03:16 Modified:src/main/org/jboss/ejb/plugins CMPPersistenceManager.java Log: Nested properties of cmp entity beans can now be private Revision ChangesPath 1.18 +34 -30jboss/src/main/org/jboss/ejb/plugins/CMPPersistenceManager.java Index: CMPPersistenceManager.java === RCS file: /cvsroot/jboss/jboss/src/main/org/jboss/ejb/plugins/CMPPersistenceManager.java,v retrieving revision 1.17 retrieving revision 1.18 diff -u -r1.17 -r1.18 --- CMPPersistenceManager.java2001/02/28 00:03:51 1.17 +++ CMPPersistenceManager.java2001/05/02 11:03:16 1.18 @@ -42,7 +42,7 @@ * * @see related * @author a href=mailto:[EMAIL PROTECTED];Marc Fleury/a -* @version $Revision: 1.17 $ +* @version $Revision: 1.18 $ */ public class CMPPersistenceManager implements EntityPersistenceManager { @@ -129,7 +129,7 @@ // The EJB 1.1 specification is not entirely clear about this, // the EJB 2.0 spec is, see page 169. // Robustness is more important than raw speed for most server - // applications, and not resetting atrribute values result in + // applications, and not resetting atrribute values result in // *very* weird errors (old states re-appear in different instances and the // developer thinks he's on drugs). @@ -142,33 +142,38 @@ i.hasNext();) { try { // get the field declaration - cmpField = ejbClass.getField((String)i.next()); - cmpFieldType = cmpField.getType(); - // find the type of the field and reset it - // to the default value - if (cmpFieldType.equals(boolean.class)) { - cmpField.setBoolean(instance,false); - } else if (cmpFieldType.equals(byte.class)) { - cmpField.setByte(instance,(byte)0); - } else if (cmpFieldType.equals(int.class)) { - cmpField.setInt(instance,0); - } else if (cmpFieldType.equals(long.class)) { - cmpField.setLong(instance,0L); - } else if (cmpFieldType.equals(short.class)) { - cmpField.setShort(instance,(short)0); - } else if (cmpFieldType.equals(char.class)) { - cmpField.setChar(instance,'\u'); - } else if (cmpFieldType.equals(double.class)) { - cmpField.setDouble(instance,0d); - } else if (cmpFieldType.equals(float.class)) { - cmpField.setFloat(instance,0f); - - //} else if (... cmr collection in ejb2.0...) { - // cmpField.set(instance,someNewCollection?); - - } else { - cmpField.set(instance,null); - } +try{ +cmpField = ejbClass.getField((String)i.next()); +cmpFieldType = cmpField.getType(); +// find the type of the field and reset it +// to the default value +if (cmpFieldType.equals(boolean.class)) { +cmpField.setBoolean(instance,false); +} else if (cmpFieldType.equals(byte.class)) { +cmpField.setByte(instance,(byte)0); +} else if (cmpFieldType.equals(int.class)) { +cmpField.setInt(instance,0); +} else if (cmpFieldType.equals(long.class)) { +cmpField.setLong(instance,0L); +} else if (cmpFieldType.equals(short.class)) { +cmpField.setShort(instance,(short)0); +} else if (cmpFieldType.equals(char.class)) { +cmpField.setChar(instance,'\u'); +} else if (cmpFieldType.equals(double.class)) { +cmpField.setDouble(instance,0d); +} else if (cmpFieldType.equals(float.class)) {
[JBoss-dev] CVS update: jboss/src/main/org/jboss/ejb/plugins/jaws/metadata ValueObjectHelper.java CMPFieldMetaData.java
User: vharcq Date: 01/05/02 04:03:15 Modified:src/main/org/jboss/ejb/plugins/jaws/metadata CMPFieldMetaData.java Added: src/main/org/jboss/ejb/plugins/jaws/metadata ValueObjectHelper.java Log: Nested properties of cmp entity beans can now be private Revision ChangesPath 1.5 +160 -75 jboss/src/main/org/jboss/ejb/plugins/jaws/metadata/CMPFieldMetaData.java Index: CMPFieldMetaData.java === RCS file: /cvsroot/jboss/jboss/src/main/org/jboss/ejb/plugins/jaws/metadata/CMPFieldMetaData.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- CMPFieldMetaData.java 2001/02/12 12:50:12 1.4 +++ CMPFieldMetaData.java 2001/05/02 11:03:15 1.5 @@ -7,6 +7,7 @@ package org.jboss.ejb.plugins.jaws.metadata; import java.lang.reflect.Field; +import java.lang.reflect.InvocationTargetException; import java.sql.Types; import java.util.ArrayList; import java.util.Iterator; @@ -27,40 +28,41 @@ /** * This class holds all the information jaws needs to know about a CMP field * It loads its data from standardjaws.xml and jaws.xml - * + * * @see related * @author a href=[EMAIL PROTECTED]Sebastien Alborini/a * @author a href=mailto:[EMAIL PROTECTED];Dirk Zimmermann/a - * @version $Revision: 1.4 $ + * @author a href=mailto:[EMAIL PROTECTED];Vincent Harcq/a + * @version $Revision: 1.5 $ */ public class CMPFieldMetaData extends MetaData implements XmlLoadable { // Constants - - + // Attributes - + // the entity this field belongs to private JawsEntityMetaData jawsEntity; - + // name of the field private String name; - + // the actual Field in the bean implementation private Field field; - + // the jdbc type (see java.sql.Types), used in PreparedStatement.setParameter private int jdbcType; // true if jdbcType has been initialized private boolean validJdbcType; - - // the sql type, used for table creation. + + // the sql type, used for table creation. private String sqlType; - + // the column name in the table private String columnName; - + private boolean isAPrimaryKeyField; - - + + /** * We need this for nested field retrieval. */ @@ -78,12 +80,12 @@ private boolean isNested; // Static - + // Constructors -- public CMPFieldMetaData(String name, JawsEntityMetaData jawsEntity) throws DeploymentException { this.name = name; this.jawsEntity = jawsEntity; - + // save the class name for nested fields ejbClassName = jawsEntity.getEntity().getEjbClass(); ejbClassName = jawsEntity.getEntity().getEjbClass(); @@ -91,51 +93,67 @@ try { // save the class for nested fields ejbClass = jawsEntity.getJawsApplication().getClassLoader().loadClass(ejbClassName); - field = ejbClass.getField(name); + field = ejbClass.getField(name); } catch (ClassNotFoundException e) { throw new DeploymentException(ejb class not found: + ejbClassName); } catch (NoSuchFieldException e) { // we can't throw an Exception here, because we could have a nested field checkField(); } - + // default, may be overridden by importXml columnName = getLastComponent(name); - + // cannot set defaults for jdbctype/sqltype, type mappings are not loaded yet. } - - + + // Public public String getName() { return name; } - + public Field getField() { return field; } - public int getJDBCType() { + public int getJDBCType() { if (! validJdbcType) { // set the default - jdbcType = jawsEntity.getJawsApplication().getTypeMapping().getJdbcTypeForJavaType(field.getType()); - validJdbcType = true; +if (field!=null) + jdbcType = jawsEntity.getJawsApplication().getTypeMapping().getJdbcTypeForJavaType(field.getType()); +else{ +try{ +
[JBoss-dev] [ jboss-Bugs-420714 ] Call setRollbackOnly() in Entity EJB
Bugs item #420714, was updated on 2001-05-02 06:38 You can respond by visiting: http://sourceforge.net/tracker/?func=detailatid=376685aid=420714group_id=22866 Category: JBossTX Group: v2.2.1 (stable) Status: Open Resolution: None Priority: 5 Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: Call setRollbackOnly() in Entity EJB Initial Comment: Hi, I made a little sample program, which uses a CMP Entity EJB. In one method of this bean I call setRollbackOnly() in the EntityContext. All methods of the bean have default transactional behaviour. So when the method has finished, the transaction should roll back. When I call another method after that, the client blocks. After a while (timeout) jBoss prints error messages saying, that the transaction marked for rollback still exist. If I throw the EJBException, then the transaction is rolled back, but the ejbStore() is called before that. This is behaviour wanted? Cheers, Dirk -- You can respond by visiting: http://sourceforge.net/tracker/?func=detailatid=376685aid=420714group_id=22866 ___ Jboss-development mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-development
RE: [JBoss-dev] Added support for handles to remember their container
|This would simplify the configuration, by eliminating the need for a |handle-jndi.properties file. This same mechanism could also be |used to plug |in a HA aware InitialContextHandle impl that would use jini, raw multicast |or whatever to find a suitable container. Please remove the configuration introduced by this fix. ONLY those that want to use this feature should have to configure anything. The rest of us (that don't use the handle) should not have to configure ANYTHING. Please remove ALL configuration files. Since it also complicates the proxy stuff, I won't welcome a fix that on top of it complicates the lifes of our users marc | |If anyone else has any ideas on the matter I would like to hear them. If I |do not hear anything that I think I will work on implementing the above. | |A final note, I did test this, both with the test-suite and with some |external jython scripts, but if anyone finds a problem please let |me know so |I can get it fixed. | |--jason | | |___ |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-Bugs-420714 ] Call setRollbackOnly() in Enti
What is the transaction attribute? - Original Message - From:[EMAIL PROTECTED] Sent:Wednesday, May 02, 2001 2:57 PM To:[EMAIL PROTECTED] Subject:[JBoss-dev] [ jboss-Bugs-420714 ] Call setRollbackOnly() in Enti Bugs item #420714, was updated on 2001-05-02 06:38You can respond by visiting:http://sourceforge.net/tracker/?func=detailatid=376685aid=420714group_id=22866Category: JBossTXGroup: v2.2.1 (stable)Status: OpenResolution: NonePriority: 5Submitted By: Nobody/Anonymous (nobody)Assigned to: Nobody/Anonymous (nobody)Summary: Call setRollbackOnly() in Entity EJBInitial Comment:Hi,I made a little sample program, which uses a CMPEntity EJB. In one method of this bean I callsetRollbackOnly() in the EntityContext. All methodsof the bean have default transactional behaviour. Sowhen the method has finished, the transaction shouldroll back. When I call another method after that, theclient blocks. After a while (timeout) jBoss printserror messages saying, that the transaction marked forrollback still exist.If I throw the EJBException, then the transaction isrolled back, but the ejbStore() is called before that.This is behaviour wanted?Cheers,Dirk--You can respond by visiting:http://sourceforge.net/tracker/?func=detailatid=376685aid=420714group_id=22866___Jboss-development mailing list[EMAIL PROTECTED]http://lists.sourceforge.net/lists/listinfo/jboss-development Get your FREE download of MSN Explorer at http://explorer.msn.com
RE: [JBoss-dev] Added support for handles to remember theircontainer
Please remove the configuration introduced by this fix. ONLY those that want to use this feature should have to configure anything. The rest of us (that don't use the handle) should not have to configure ANYTHING. I agree, this just make JBoss harder to configure. Please remove ALL configuration files. I assume that you mean handle-jndi.properties... no problem, it was really only a temporary solution, until others had a chance to review and hopefully suggest a better facility for getting this information. ... Since it also complicates the proxy I am not really sure what you mean here, but I completely agree that the configuration of the server should be as simple as possible. I should have a simple method to replace the environment properties file in the near term, though I want to look over the HA stuff to see how that can be adapted to the proxy/handle classes. --jason ___ Jboss-development mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] CVS update: newsite/documentation migration.html
User: olegnitz Date: 01/05/02 14:03:18 Modified:documentation migration.html Log: Added section MIGRATION FROM 2.2 TO 2.2.1 and description of changes related to CastorJDO module. Revision ChangesPath 1.4 +9 -2 newsite/documentation/migration.html Index: migration.html === RCS file: /cvsroot/jboss/newsite/documentation/migration.html,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- migration.html2001/04/12 12:16:21 1.3 +++ migration.html2001/05/02 21:03:18 1.4 @@ -68,7 +68,7 @@ least you need to copy the following archives and include them into the CLASSPATH at the client side: emjboss-client.jar, jbosssx-client.jar/em and emjnp-client.jar/em. Depending on what functionality you use in your client you may need to include additional archives from -the emjboss/client//em directory./li +the emjboss/client//em directory./li /ul p class=headbMIGRATION FROM PRE2.1 TO 2.2/b ul class=text @@ -78,6 +78,13 @@ emlt;jms-destination-typegt; lt;/jms-destination-typegt;/em to emlt;destination-typegt; lt;/destination-typegt;/embr (by Torsten Terp)/li /ul +p class=headbMIGRATION FROM 2.2 TO 2.2.1/b +ul class=text +liIf you were using bCastorJDO/b module, you should get the +a href=../castorjdo/jboss-castorjdo.jarnew version of it/a and move its configuration +from emjboss.conf/em to emjboss.jcml/em. See detailed descripion of the configuraton +a href=../business/jboss-castor.htmlhere/a (a tip: the order and the meaning of parameters wasn't changed). +/ul p class=headbPLEASE HELP/b p class=textAt the moment these instructions are far away from being complete. Please send a detailed description of the steps which are not @@ -88,7 +95,7 @@ these instructions. Thank you. - /div/tdtdimg src=../pictures/t.gif width=15 height=1/td/tr/table + /div/tdtdimg src=../pictures/t.gif width=15 height=1/td/tr/table /td td valign=top height=340img src=../pictures/main2.gif width=65 height=340/td /trtr ___ Jboss-development mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] jboss/servlet container test suite???
Does anyone know of a test-suite that I could run in JBoss-Jetty to : 1. see which features I still need to implement 2. get a clue as to what they should do If not has anyone given it any thought ? - The JBoss-Tomcat people perhaps ?? Thanks, Jules _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com ___ Jboss-development mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-development
Re: [JBoss-dev] jboss/servlet container test suite???
The tomcat-test.ear is about the extent of the servlet integration testing. and this is basically a pass/fail manual inspection test. I am creating a servlet integration unit test in the jbosstest module for automated testing of servlet container integration. The first cut should be ready this weekend. - Original Message - From: Julian Gosnell [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, May 02, 2001 4:20 PM Subject: [JBoss-dev] jboss/servlet container test suite??? Does anyone know of a test-suite that I could run in JBoss-Jetty to : 1. see which features I still need to implement 2. get a clue as to what they should do If not has anyone given it any thought ? - The JBoss-Tomcat people perhaps ?? Thanks, Jules ___ Jboss-development mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-development
Re: [JBoss-dev] jboss/servlet container test suite???
Sounds interesting - please keep me posted. Jules Scott M Stark wrote: The tomcat-test.ear is about the extent of the servlet integration testing. and this is basically a pass/fail manual inspection test. I am creating a servlet integration unit test in the jbosstest module for automated testing of servlet container integration. The first cut should be ready this weekend. - Original Message - From: Julian Gosnell [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, May 02, 2001 4:20 PM Subject: [JBoss-dev] jboss/servlet container test suite??? Does anyone know of a test-suite that I could run in JBoss-Jetty to : 1. see which features I still need to implement 2. get a clue as to what they should do If not has anyone given it any thought ? - The JBoss-Tomcat people perhaps ?? Thanks, Jules ___ Jboss-development mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-development _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com ___ Jboss-development mailing list [EMAIL PROTECTED] 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= = ?xml version=1.0 encoding=UTF-8? JBoss daily test results SUMMARY Number of tests run: 58 Successful tests: 51 Errors:3 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