Re: Unsupported Major.Minor Version?
Hi Hans, I think that the problem is with building the EAR with a 1.5 jvm. Try building with a 1.4 jvm and see if it helps. regards, ManuOn 11/24/05, Hans Prueller <[EMAIL PROTECTED]> wrote: Hi toghether, when I try to deploy my first self-built test.ear project within Geronimo / WASCE I get the following error message: java -jar .\bin\deployer.jar --user system --password manager deplo y test.ear test-plan.xml Error: Unable to distribute test.ear: Error thrown during invocation test/interfaces/Business (Unsupported major.minor version 49.0) Can anybody give me a tip? The .ear file was built by using a jvm1.5 but with strict 1.4 compliance. could that be a problem? regards, Hans -- *virtually hanzz... http://hanzz.zapto.org*
Unsupported Major.Minor Version?
Hi toghether, when I try to deploy my first self-built test.ear project within Geronimo / WASCE I get the following error message: java -jar .\bin\deployer.jar --user system --password manager deplo y test.ear test-plan.xml Error: Unable to distribute test.ear: Error thrown during invocation test/interfaces/Business (Unsupported major.minor version 49.0) Can anybody give me a tip? The .ear file was built by using a jvm1.5 but with strict 1.4 compliance. could that be a problem? regards, Hans -- * virtually hanzz... http://hanzz.zapto.org *
CMP & Oracle problems
I added the .. and the ... elements to my openejb-jar.xml file for my entity bean (my deployment files are based on the bigpetstore example from IBM developerworks). It now fails at deploy time reporting: Error: Unable to distribute demo.ear: Unable to initialize ejb-ql-compiler-factory=org.tranql.ejbcompiler.OracleQLCompilerFactory caused by org.tranql.ejbcompiler.OracleQLCompilerFactory What else must be done? Thanks. _ Start something musical - 15 free ninemsn Music downloads! http://ninemsn.com.au/share/redir/adTrack.asp?mode=click&clientID=667&referral=HotmailTaglineNov&URL=http://www.ninemsn.com.au/startsomething
Re: Enlisting XAResource objects
On Nov 23, 2005, at 1:36 PM, [EMAIL PROTECTED] wrote: The XAResource in question is a XA-capable write-back cache. So the connection metaphor is not such a good fit - that's why I am asking the question. I would prefer to just grab a reference to the transaction manager gbean, which implements javax.transaction.TransactionManager and call getTransaction().enlistResource(..) If I go with this solution, how to get a reference to the the transaction manager gbean? Alternatively, I see the method watchResourceManagers here: http://svn.apache.org/repos/asf/geronimo/trunk/modules/transaction/ src/java/org/apache/geronimo/transaction/manager/ TransactionManagerImplGBean.java How would I write a gbean which ends up in this collection? Come to think of it, this may be the way to go because I see that that will cause XAResource.recover() to be invoked first. I was going to mention that :-). You still haven't told me how your (presumably j2ee) application finds the part of the RM to talk to. This could be an important part of the picture :-). Without knowing that, I'd recommend writing a gbean (surprised?). It should have a gbean reference to the TransactionmanagerImpl gbean. You can also use the TransactionContextManager gbean which is a more geronimo-centric idea that deals with TransactionContexts that you might be able to store stuff in. To use the recovery features you should do three things: 1. make sure your gbean's object name matches the patterns for the ResourceManagers reference. 2. make sure your gbean implmentation class implements ResourceManager 3. wrap your XAResource so it implements NamedXAResource. We generally use the ObjectName/GBeanName of the component as the xa resource name. re. the NamedXAResource, we record the name of the xaresource with the xid in the transaction log, so we can among other things determine during recovery when the resource managers involved in a transaction have all started so the transaction is recoverable. I can't figure any way to determine that all RMs have started before starting the TM, so we just recover what we can when we can. I believe JOTM/HOWL is using a similar scheme but I don't know the details. This leaves the question of either how the gbean connects to the cache or how your application connects to the gbean. Recovery is not well tested, but I will definitely help you with problems you encounter. thanks david jencks David Jencks <[EMAIL PROTECTED]> 11/23/2005 12:10 PM Please respond to user To: [EMAIL PROTECTED] cc: Subject: Re: Enlisting XAResource objects On Nov 23, 2005, at 11:54 AM, [EMAIL PROTECTED] wrote: > > I have a home-grown resource manager (XAResource implementation) which > I would like enlist in a transaction. > I see two ways of doing this: > > 1) Write a JCA resource adapter, since the app server has to enlist > the xa resource for the connection. > > 2) Create a geronimo "configuration" which has a reference to the > transaction manager gbean, then grab > the javax.transaction.Transaction object from that and call the > enlist- method. > > Does anybody care to comment on 1 vs. 2 ? It's hard to judge without knowing more about what your RM actually does. If it has anything resembling connections that would be helped with a connection pool, I would strongly recommend writing a resource adapter. Its pretty easy, you can base it on tranql-connector code, etc etc and it will save you a lot of work trying to relate to the TM properly. If it really doesn't have anything like connections, then I don't think it makes sense to write a RA. In this case before I start giving advice I'd like to know more about how your application gets in touch with the RM and tells it to do something and how you envisage enlist/delist to work. thanks david jencks * <<>> In compliance with applicable rules and regulations, Instinet reviews and archives incoming and outgoing email communications, copies of which may be produced at the request of regulators. This message is intended only for the personal and confidential use of the recipients named above. If the reader of this email is not the intended recipient, you have received this email in error and any review, dissemination, distribution or copying is strictly prohibited. If you have received this email in error, please notify the sender immediately by return email and permanently delete the copy you received. Instinet accepts no liability for any content contained in the email, or any errors or omissions arising as a result of email transmission. Any opinions contained in this email constitute the sender's best judgment at this time and are subject to change without notice. Instinet does not make recommendations of a particular security an
Re: Enlisting XAResource objects
The XAResource in question is a XA-capable write-back cache. So the connection metaphor is not such a good fit - that's why I am asking the question. I would prefer to just grab a reference to the transaction manager gbean, which implements javax.transaction.TransactionManager and call getTransaction().enlistResource(..) If I go with this solution, how to get a reference to the the transaction manager gbean? Alternatively, I see the method watchResourceManagers here: http://svn.apache.org/repos/asf/geronimo/trunk/modules/transaction/src/java/org/apache/geronimo/transaction/manager/TransactionManagerImplGBean.java How would I write a gbean which ends up in this collection? Come to think of it, this may be the way to go because I see that that will cause XAResource.recover() to be invoked first. David Jencks <[EMAIL PROTECTED]> 11/23/2005 12:10 PM Please respond to user To: user@geronimo.apache.org cc: Subject: Re: Enlisting XAResource objects On Nov 23, 2005, at 11:54 AM, [EMAIL PROTECTED] wrote: > > I have a home-grown resource manager (XAResource implementation) which > I would like enlist in a transaction. > I see two ways of doing this: > > 1) Write a JCA resource adapter, since the app server has to enlist > the xa resource for the connection. > > 2) Create a geronimo "configuration" which has a reference to the > transaction manager gbean, then grab > the javax.transaction.Transaction object from that and call the > enlist- method. > > Does anybody care to comment on 1 vs. 2 ? It's hard to judge without knowing more about what your RM actually does. If it has anything resembling connections that would be helped with a connection pool, I would strongly recommend writing a resource adapter. Its pretty easy, you can base it on tranql-connector code, etc etc and it will save you a lot of work trying to relate to the TM properly. If it really doesn't have anything like connections, then I don't think it makes sense to write a RA. In this case before I start giving advice I'd like to know more about how your application gets in touch with the RM and tells it to do something and how you envisage enlist/delist to work. thanks david jencks * <<>> In compliance with applicable rules and regulations, Instinet reviews and archives incoming and outgoing email communications, copies of which may be produced at the request of regulators. This message is intended only for the personal and confidential use of the recipients named above. If the reader of this email is not the intended recipient, you have received this email in error and any review, dissemination, distribution or copying is strictly prohibited. If you have received this email in error, please notify the sender immediately by return email and permanently delete the copy you received. Instinet accepts no liability for any content contained in the email, or any errors or omissions arising as a result of email transmission. Any opinions contained in this email constitute the sender's best judgment at this time and are subject to change without notice. Instinet does not make recommendations of a particular security and the information contained in this email should not be considered as a recommendation, an offer or a solicitation of an offer to buy and sell securities. *
Re: Start-up classes
I think I am going to try solution 1. It sounds promising and it's easy for other people to understand. Regarding this: > There is probably no guarantee that a user call to an ejb will be delayed until after your gbean is started I think you are saying that deploying is not an atomic operation as far as new transactions are concerned. I think that could be a problem for people who have hundreds of transactions waiting for an application to be deployed/redeployed. I'll try solution 2 if 1 doesn't work out. Solution 3 is not an option for now. Solution 4 I like best, but since the business is not mine I usually assume that I am required to be selfish and do the least amount of work I can, and there is the usual matter of somebody reviewing the IP to make sure they don't mind giving it away. However, if the migration starts looking good then I will mention the issue to a couple of executives here to see if they are okay with the idea of submitting patches. If they are, I can start being a good citizen. David Jencks <[EMAIL PROTECTED]> 11/23/2005 12:29 PM Please respond to user To: user@geronimo.apache.org cc: Subject: Re: Start-up classes On Nov 23, 2005, at 12:14 PM, [EMAIL PROTECTED] wrote: > > We have a whole list of classes whose static initialization needs to > happen in > a specific order. If a thread tries to use any one of them before the > class initialization > is completed, it can cause deadlocks, which will stop the application > from starting. > > I don't code like this myself, but I inherited this, and my focus here > is to get this deployed > on Geronimo the fastest way possible. It's about money. > > I was thinking that your kernel already has a concept of dependencies, > and it does have > to figure out the graph of gbeans so that if A references B that > start() is called on B before > it's called on A. > > So maybe I can create two gbeans: one is the one that does the > initialization (B), and the other > is just empty and references it (A) and is part of the j2ee app > configuration? Then B should > get initialized before A? > > Guglielmo hmmm. I can think of 3 things to try: 1. Include a gbean in the application that calls the startup code. See if it works :-) There is probably no guarantee that a user call to an ejb will be delayed until after your gbean is started, but perhaps you can control that another way. I would try this anyway to see what happens since it is the easiest solution. 2. Move all of the relevant classes and the startup gbean into another configuration and make this configuration a parent (using the "import" tag which might change to "parent" in the next few days). This will pretty much guarantee that your startup code is run before any ejb containers are deployed. Your ejb app would then not include these classes, since they are in a parent classloader. You will have to think about exactly what can be moved into a parent classloader and whether this will work. 3. Make the startup code self-executing :-) (I don't know if this will work) Move the actual startup code in each of these classes into a static method, and have the static block just call the initializer class. The initializer class would need some well-protected flag so the code was only run once, but it would call the static methods in each class in the appropriate order. 4. Push on us or submit a patch for all the gbeans we generate from j2ee apps to include the ability to specify dependencies. This would be ideal. Even for ejbs would be great and might not be a lot of work. thanks david jencks * <<>> In compliance with applicable rules and regulations, Instinet reviews and archives incoming and outgoing email communications, copies of which may be produced at the request of regulators. This message is intended only for the personal and confidential use of the recipients named above. If the reader of this email is not the intended recipient, you have received this email in error and any review, dissemination, distribution or copying is strictly prohibited. If you have received this email in error, please notify the sender immediately by return email and permanently delete the copy you received. Instinet accepts no liability for any content contained in the email, or any errors or omissions arising as a result of email transmission. Any opinions contained in this email constitute the sender's best judgment at this time and are subject to change without notice. Instinet does not make recommendations of a particular security and the information contained in this email should not be considered as a recommendation, an offer or a solicitation of an offer to buy and sell securities. *
Re: Start-up classes
On Nov 23, 2005, at 12:14 PM, [EMAIL PROTECTED] wrote: We have a whole list of classes whose static initialization needs to happen in a specific order. If a thread tries to use any one of them before the class initialization is completed, it can cause deadlocks, which will stop the application from starting. I don't code like this myself, but I inherited this, and my focus here is to get this deployed on Geronimo the fastest way possible. It's about money. I was thinking that your kernel already has a concept of dependencies, and it does have to figure out the graph of gbeans so that if A references B that start() is called on B before it's called on A. So maybe I can create two gbeans: one is the one that does the initialization (B), and the other is just empty and references it (A) and is part of the j2ee app configuration? Then B should get initialized before A? Guglielmo hmmm. I can think of 3 things to try: 1. Include a gbean in the application that calls the startup code. See if it works :-) There is probably no guarantee that a user call to an ejb will be delayed until after your gbean is started, but perhaps you can control that another way. I would try this anyway to see what happens since it is the easiest solution. 2. Move all of the relevant classes and the startup gbean into another configuration and make this configuration a parent (using the "import" tag which might change to "parent" in the next few days). This will pretty much guarantee that your startup code is run before any ejb containers are deployed. Your ejb app would then not include these classes, since they are in a parent classloader. You will have to think about exactly what can be moved into a parent classloader and whether this will work. 3. Make the startup code self-executing :-) (I don't know if this will work) Move the actual startup code in each of these classes into a static method, and have the static block just call the initializer class. The initializer class would need some well-protected flag so the code was only run once, but it would call the static methods in each class in the appropriate order. 4. Push on us or submit a patch for all the gbeans we generate from j2ee apps to include the ability to specify dependencies. This would be ideal. Even for ejbs would be great and might not be a lot of work. thanks david jencks David Jencks <[EMAIL PROTECTED]> 11/23/2005 12:05 PM Please respond to user To: [EMAIL PROTECTED] cc: Subject: Re: Start-up classes On Nov 23, 2005, at 11:47 AM, [EMAIL PROTECTED] wrote: > > I am migrating an application from WebLogic to Geronimo. It consists > of EJBs but it also has a "startup" class, > meaning a class whose main() method has to be invoked before the ejbs > are deployed. Unfortunately this class > performs a huge initialization procedure during class initialization, > and it really has to be done before anything else. > > In WLS there is a tag in config.xml, and a similar tag in > weblogic-application.xml. To do the same in Geronimo > I am guessing that I can declare a inside > geronimo-application.xml. Is that correct? Yes. However, I'm not sure what you need in terms of timing or what you mean by "before the ejbs are deployed". Our deployment process results in defining gbean instances for each ejb, and the application configuration just has all the gbeans in it. Without doing more, there is no guarantee that your startup gbean will start before any ejb container gbean. On the other hand, your custom gbean is fairly certain to get started before any ejb instances are created or any calls to ejbs occur. If you need your startup code executed before any ejb class is loaded however, we'll need to find another solution. Can you tell us anything more about what kinds of things you need to do and when? thanks david jencks > > Thanks > Guglielmo > > P.S. Your server looks very clean. Thanks for all the work. Thanks!!! * <<>> In compliance with applicable rules and regulations, Instinet reviews and archives incoming and outgoing email communications, copies of which may be produced at the request of regulators. This message is intended only for the personal and confidential use of the recipients named above. If the reader of this email is not the intended recipient, you have received this email in error and any review, dissemination, distribution or copying is strictly prohibited. If you have received this email in error, please notify the sender immediately by return email and permanently delete the copy you received. Instinet accepts no liability for any content contained in the email, or any errors or omissions arising as a result of email transmission. Any opinions contained in this email constitute the sender's best
Re: Start-up classes
We have a whole list of classes whose static initialization needs to happen in a specific order. If a thread tries to use any one of them before the class initialization is completed, it can cause deadlocks, which will stop the application from starting. I don't code like this myself, but I inherited this, and my focus here is to get this deployed on Geronimo the fastest way possible. It's about money. I was thinking that your kernel already has a concept of dependencies, and it does have to figure out the graph of gbeans so that if A references B that start() is called on B before it's called on A. So maybe I can create two gbeans: one is the one that does the initialization (B), and the other is just empty and references it (A) and is part of the j2ee app configuration? Then B should get initialized before A? Guglielmo David Jencks <[EMAIL PROTECTED]> 11/23/2005 12:05 PM Please respond to user To: user@geronimo.apache.org cc: Subject: Re: Start-up classes On Nov 23, 2005, at 11:47 AM, [EMAIL PROTECTED] wrote: > > I am migrating an application from WebLogic to Geronimo. It consists > of EJBs but it also has a "startup" class, > meaning a class whose main() method has to be invoked before the ejbs > are deployed. Unfortunately this class > performs a huge initialization procedure during class initialization, > and it really has to be done before anything else. > > In WLS there is a tag in config.xml, and a similar tag in > weblogic-application.xml. To do the same in Geronimo > I am guessing that I can declare a inside > geronimo-application.xml. Is that correct? Yes. However, I'm not sure what you need in terms of timing or what you mean by "before the ejbs are deployed". Our deployment process results in defining gbean instances for each ejb, and the application configuration just has all the gbeans in it. Without doing more, there is no guarantee that your startup gbean will start before any ejb container gbean. On the other hand, your custom gbean is fairly certain to get started before any ejb instances are created or any calls to ejbs occur. If you need your startup code executed before any ejb class is loaded however, we'll need to find another solution. Can you tell us anything more about what kinds of things you need to do and when? thanks david jencks > > Thanks > Guglielmo > > P.S. Your server looks very clean. Thanks for all the work. Thanks!!! * <<>> In compliance with applicable rules and regulations, Instinet reviews and archives incoming and outgoing email communications, copies of which may be produced at the request of regulators. This message is intended only for the personal and confidential use of the recipients named above. If the reader of this email is not the intended recipient, you have received this email in error and any review, dissemination, distribution or copying is strictly prohibited. If you have received this email in error, please notify the sender immediately by return email and permanently delete the copy you received. Instinet accepts no liability for any content contained in the email, or any errors or omissions arising as a result of email transmission. Any opinions contained in this email constitute the sender's best judgment at this time and are subject to change without notice. Instinet does not make recommendations of a particular security and the information contained in this email should not be considered as a recommendation, an offer or a solicitation of an offer to buy and sell securities. *
Re: Start-up classes
On Nov 23, 2005, at 12:04 PM, [EMAIL PROTECTED] wrote: Can I use dependencies to control deployment order, perhaps? well, theoretically, but I don't think we've included any way for you to say that e.g. the EJBModule gbean depends on some other gbean that you supply. This would be nice but is NYI. You might be able to put your gbean in a configuration all by itself and use that configuration as an application parent. This might require some care in figuring out where to put the necessary classes. More info would be helpful :-) thanks david jencks Aaron Mulder <[EMAIL PROTECTED]> Sent by: [EMAIL PROTECTED] 11/23/2005 11:57 AM Please respond to user To: [EMAIL PROTECTED] cc: Subject: Re: Start-up classes You can use a GBean to run code during the application startup, but I'm not sure off the top of my head whether that will necessarily be run before EJBs become available to clients. Aaron On 11/23/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > I am migrating an application from WebLogic to Geronimo. It consists of EJBs > but it also has a "startup" class, > meaning a class whose main() method has to be invoked before the ejbs are > deployed. Unfortunately this class > performs a huge initialization procedure during class initialization, and it > really has to be done before anything else. > > In WLS there is a tag in config.xml, and a similar tag in > weblogic-application.xml. To do the same in Geronimo > I am guessing that I can declare a inside geronimo-application.xml. > Is that correct? > > Thanks > Guglielmo > > P.S. Your server looks very clean. Thanks for all the work. * <<>> In compliance with applicable rules and regulations, Instinet reviews and archives incoming and outgoing email communications, copies of which may be produced at the request of regulators. This message is intended only for the personal and confidential use of the recipients named above. If the reader of this email is not the intended recipient, you have received this email in error and any review, dissemination, distribution or copying is strictly prohibited. If you have received this email in error, please notify the sender immediately by return email and permanently delete the copy you received. Instinet accepts no liability for any content contained in the email, or any errors or omissions arising as a result of email transmission. Any opinions contained in this email constitute the sender's best judgment at this time and are subject to change without notice. Instinet does not make recommendations of a particular security and the information contained in this email should not be considered as a recommendation, an offer or a solicitation of an offer to buy and sell securities. *
Re: Enlisting XAResource objects
On Nov 23, 2005, at 11:54 AM, [EMAIL PROTECTED] wrote: I have a home-grown resource manager (XAResource implementation) which I would like enlist in a transaction. I see two ways of doing this: 1) Write a JCA resource adapter, since the app server has to enlist the xa resource for the connection. 2) Create a geronimo "configuration" which has a reference to the transaction manager gbean, then grab the javax.transaction.Transaction object from that and call the enlist- method. Does anybody care to comment on 1 vs. 2 ? It's hard to judge without knowing more about what your RM actually does. If it has anything resembling connections that would be helped with a connection pool, I would strongly recommend writing a resource adapter. Its pretty easy, you can base it on tranql-connector code, etc etc and it will save you a lot of work trying to relate to the TM properly. If it really doesn't have anything like connections, then I don't think it makes sense to write a RA. In this case before I start giving advice I'd like to know more about how your application gets in touch with the RM and tells it to do something and how you envisage enlist/delist to work. thanks david jencks Thanks Guglielmo * <<>> In compliance with applicable rules and regulations, Instinet reviews and archives incoming and outgoing email communications, copies of which may be produced at the request of regulators. This message is intended only for the personal and confidential use of the recipients named above. If the reader of this email is not the intended recipient, you have received this email in error and any review, dissemination, distribution or copying is strictly prohibited. If you have received this email in error, please notify the sender immediately by return email and permanently delete the copy you received. Instinet accepts no liability for any content contained in the email, or any errors or omissions arising as a result of email transmission. Any opinions contained in this email constitute the sender's best judgment at this time and are subject to change without notice. Instinet does not make recommendations of a particular security and the information contained in this email should not be considered as a recommendation, an offer or a solicitation of an offer to buy and sell securities. *
Re: Start-up classes
On Nov 23, 2005, at 11:47 AM, [EMAIL PROTECTED] wrote: I am migrating an application from WebLogic to Geronimo. It consists of EJBs but it also has a "startup" class, meaning a class whose main() method has to be invoked before the ejbs are deployed. Unfortunately this class performs a huge initialization procedure during class initialization, and it really has to be done before anything else. In WLS there is a tag in config.xml, and a similar tag in weblogic-application.xml. To do the same in Geronimo I am guessing that I can declare a inside geronimo-application.xml. Is that correct? Yes. However, I'm not sure what you need in terms of timing or what you mean by "before the ejbs are deployed". Our deployment process results in defining gbean instances for each ejb, and the application configuration just has all the gbeans in it. Without doing more, there is no guarantee that your startup gbean will start before any ejb container gbean. On the other hand, your custom gbean is fairly certain to get started before any ejb instances are created or any calls to ejbs occur. If you need your startup code executed before any ejb class is loaded however, we'll need to find another solution. Can you tell us anything more about what kinds of things you need to do and when? thanks david jencks Thanks Guglielmo P.S. Your server looks very clean. Thanks for all the work. Thanks!!! * <<>> In compliance with applicable rules and regulations, Instinet reviews and archives incoming and outgoing email communications, copies of which may be produced at the request of regulators. This message is intended only for the personal and confidential use of the recipients named above. If the reader of this email is not the intended recipient, you have received this email in error and any review, dissemination, distribution or copying is strictly prohibited. If you have received this email in error, please notify the sender immediately by return email and permanently delete the copy you received. Instinet accepts no liability for any content contained in the email, or any errors or omissions arising as a result of email transmission. Any opinions contained in this email constitute the sender's best judgment at this time and are subject to change without notice. Instinet does not make recommendations of a particular security and the information contained in this email should not be considered as a recommendation, an offer or a solicitation of an offer to buy and sell securities. *
Re: Start-up classes
Can I use dependencies to control deployment order, perhaps? Aaron Mulder <[EMAIL PROTECTED]> Sent by: [EMAIL PROTECTED] 11/23/2005 11:57 AM Please respond to user To: user@geronimo.apache.org cc: Subject: Re: Start-up classes You can use a GBean to run code during the application startup, but I'm not sure off the top of my head whether that will necessarily be run before EJBs become available to clients. Aaron On 11/23/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > I am migrating an application from WebLogic to Geronimo. It consists of EJBs > but it also has a "startup" class, > meaning a class whose main() method has to be invoked before the ejbs are > deployed. Unfortunately this class > performs a huge initialization procedure during class initialization, and it > really has to be done before anything else. > > In WLS there is a tag in config.xml, and a similar tag in > weblogic-application.xml. To do the same in Geronimo > I am guessing that I can declare a inside geronimo-application.xml. > Is that correct? > > Thanks > Guglielmo > > P.S. Your server looks very clean. Thanks for all the work. * <<>> In compliance with applicable rules and regulations, Instinet reviews and archives incoming and outgoing email communications, copies of which may be produced at the request of regulators. This message is intended only for the personal and confidential use of the recipients named above. If the reader of this email is not the intended recipient, you have received this email in error and any review, dissemination, distribution or copying is strictly prohibited. If you have received this email in error, please notify the sender immediately by return email and permanently delete the copy you received. Instinet accepts no liability for any content contained in the email, or any errors or omissions arising as a result of email transmission. Any opinions contained in this email constitute the sender's best judgment at this time and are subject to change without notice. Instinet does not make recommendations of a particular security and the information contained in this email should not be considered as a recommendation, an offer or a solicitation of an offer to buy and sell securities. *
Re: Start-up classes
You can use a GBean to run code during the application startup, but I'm not sure off the top of my head whether that will necessarily be run before EJBs become available to clients. Aaron On 11/23/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > I am migrating an application from WebLogic to Geronimo. It consists of EJBs > but it also has a "startup" class, > meaning a class whose main() method has to be invoked before the ejbs are > deployed. Unfortunately this class > performs a huge initialization procedure during class initialization, and it > really has to be done before anything else. > > In WLS there is a tag in config.xml, and a similar tag in > weblogic-application.xml. To do the same in Geronimo > I am guessing that I can declare a inside geronimo-application.xml. > Is that correct? > > Thanks > Guglielmo > > P.S. Your server looks very clean. Thanks for all the work.
Enlisting XAResource objects
I have a home-grown resource manager (XAResource implementation) which I would like enlist in a transaction. I see two ways of doing this: 1) Write a JCA resource adapter, since the app server has to enlist the xa resource for the connection. 2) Create a geronimo "configuration" which has a reference to the transaction manager gbean, then grab the javax.transaction.Transaction object from that and call the enlist- method. Does anybody care to comment on 1 vs. 2 ? Thanks Guglielmo * <<>> In compliance with applicable rules and regulations, Instinet reviews and archives incoming and outgoing email communications, copies of which may be produced at the request of regulators. This message is intended only for the personal and confidential use of the recipients named above. If the reader of this email is not the intended recipient, you have received this email in error and any review, dissemination, distribution or copying is strictly prohibited. If you have received this email in error, please notify the sender immediately by return email and permanently delete the copy you received. Instinet accepts no liability for any content contained in the email, or any errors or omissions arising as a result of email transmission. Any opinions contained in this email constitute the sender's best judgment at this time and are subject to change without notice. Instinet does not make recommendations of a particular security and the information contained in this email should not be considered as a recommendation, an offer or a solicitation of an offer to buy and sell securities. *
Start-up classes
I am migrating an application from WebLogic to Geronimo. It consists of EJBs but it also has a "startup" class, meaning a class whose main() method has to be invoked before the ejbs are deployed. Unfortunately this class performs a huge initialization procedure during class initialization, and it really has to be done before anything else. In WLS there is a tag in config.xml, and a similar tag in weblogic-application.xml. To do the same in Geronimo I am guessing that I can declare a inside geronimo-application.xml. Is that correct? Thanks Guglielmo P.S. Your server looks very clean. Thanks for all the work. * <<>> In compliance with applicable rules and regulations, Instinet reviews and archives incoming and outgoing email communications, copies of which may be produced at the request of regulators. This message is intended only for the personal and confidential use of the recipients named above. If the reader of this email is not the intended recipient, you have received this email in error and any review, dissemination, distribution or copying is strictly prohibited. If you have received this email in error, please notify the sender immediately by return email and permanently delete the copy you received. Instinet accepts no liability for any content contained in the email, or any errors or omissions arising as a result of email transmission. Any opinions contained in this email constitute the sender's best judgment at this time and are subject to change without notice. Instinet does not make recommendations of a particular security and the information contained in this email should not be considered as a recommendation, an offer or a solicitation of an offer to buy and sell securities. *
Email archive search?
From this page http://mail-archives.apache.org/mod_mbox/geronimo-user/ It doesn't look like you can search the mailing list archive. Is there such a search page, and if not, then is it easy to add? * <<>> In compliance with applicable rules and regulations, Instinet reviews and archives incoming and outgoing email communications, copies of which may be produced at the request of regulators. This message is intended only for the personal and confidential use of the recipients named above. If the reader of this email is not the intended recipient, you have received this email in error and any review, dissemination, distribution or copying is strictly prohibited. If you have received this email in error, please notify the sender immediately by return email and permanently delete the copy you received. Instinet accepts no liability for any content contained in the email, or any errors or omissions arising as a result of email transmission. Any opinions contained in this email constitute the sender's best judgment at this time and are subject to change without notice. Instinet does not make recommendations of a particular security and the information contained in this email should not be considered as a recommendation, an offer or a solicitation of an offer to buy and sell securities. *
Re: where to download daily build?
Yes. David Blevins and I are working on such an enterprise. He currently has the builds running every night. We should hopefully be able to publish the builds to a directory very soon too. Cheers Prasad On 11/22/05, Ken Perl <[EMAIL PROTECTED]> wrote: I perfer a good build from geronimo's daily or weekly build, doesanyone contribute his building work? On 11/22/05, Krishnakumar B <[EMAIL PROTECTED]> wrote:> hi Ken,>> U can download the source and do a build in your local machine. Steps> are listed in Wiki ( http://wiki.apache.org/geronimo/Building )>> Regards> Krish>> On 11/22/05, Ken Perl <[EMAIL PROTECTED] > wrote:> > I searched the geronimo site and didn't find where the daily build> > could be obtained.> > --> > perl -e 'print unpack(u,"62V5N\"FME;G\!E> > ")'> >>--perl -e 'print unpack(u,"62V5N\"FME;G\!E")'
Re: EJB JNDI lookup
If your client is a J2EE application client that runs in our client container, you need to configure it with an EJB reference in application-client.xml and then resolve that to the specific EJB in geronimo-application-client.xml. That way your client code will have access to a java:comp/env JNDI environment and the EJB reference will live in there. If the client does *not* run in the client container, then you should try looking up the EJB without the "java:comp/env/" prefix, so I would have expected ctx.lookup("ejb/helloworld-ejb/HelloBean"); to work. If it still does not, could you post the exception? Thanks, Aaron On 11/23/05, Siraj Mohamed <[EMAIL PROTECTED]> wrote: > > > > Thanks Rakesh and Manu for your information. Now my look up doesn't work and > it throws an exception NamingException: > /java:comp/env/ejb/helloworld-ejb/HelloBean not found. > > > > My openejb-jar.xml referes jndi name as > > > > > > > > HelloBean > > ejb/helloworld-ejb/HelloBean > > > > > > > > And I am trying looking up it in my client class as: > > Object homeObject = ctx.lookup("java:comp/env/ejb/helloworld-ejb/HelloBean"); > > > > I also tried with different options like: > > Object homeObject = ctx.lookup("ejb/helloworld-ejb/HelloBean"); or > > Object homeObject = ctx.lookup("HelloBean"); > > > > Either one did not work. > > > > Am I missing some thing else? > > > > Thanks, > > -Siraj > > > > > > > > > > > > From: Ranjan, Rakesh (Cognizant) [mailto:[EMAIL PROTECTED] > Sent: Wednesday, November 23, 2005 6:17 PM > To: user@geronimo.apache.org > Subject: RE: EJB JNDI lookup > > > > > You have not specified the system properties to get the InitialContext. > > Use the following code to get the InitialContext. > > > > Properties props = new Properties(); > > props.put("java.naming.factory.initial","org.openejb.client.RemoteInitialContextFactory"); > > props.put("java.naming.provider.url", "127.0.0.1:4201"); > > props.put("java.naming.security.principal", "system"); > > props.put("java.naming.security.credentials", "manager"); > > > > javax.naming.InitialContext ctx = new javax.naming.InitialContext(props); > > > > With Regards, > > Rakesh Ranjan > > > > > > > > From: Siraj Mohamed [mailto:[EMAIL PROTECTED] > Sent: Wednesday, November 23, 2005 4:05 PM > To: user@geronimo.apache.org > Subject: EJB JNDI lookup > > > > Hi All, > > > > I have deployed a hello world application (helloworld.ear) on Geronimo 1.0 > M5. I have written a java client class to test my application. But I am > getting following error message from the client code: > > > > NamingException: Need to specify class name in environment or system > property, or as an applet parameter, or in an application resource file: > java.naming.factory.initial > > > > It tells that I have to set java.naming.factory.initial and > java.naming.provider.url in the jndi.properties. What would be the values to > be specified for them for Geronimo server? > > > > > > This is my sample client code: > > > > /* > > * A simple client for accessing an EJB. > > */ > > > > public class HelloClient > > { > > public static void main(String[] args) > > { > > System.out.println("client started..."); > > try { > > javax.naming.Context ctx = new javax.naming.InitialContext(); > > > > // This is for use with > com.evermind.server.ApplicationClientInitialContextFactory > > System.out.println("looking up..."); > > Object homeObject = ctx.lookup("java:comp/env/HelloBean"); > > > > // Narrow the reference to HelloHome > > HelloHome home = > > (HelloHome) PortableRemoteObject.narrow(homeObject, > HelloHome.class); > > > > // Create remote object and narrow the reference to Hello. > > Hello remote = > > (Hello) PortableRemoteObject.narrow(home.create(), Hello.class); > > > > System.out.println(remote.sayHello("James Earl")); > > > > } catch(NamingException e) { > > System.err.println("NamingException: " + e.getMessage()); > > } catch(RemoteException e) { > > System.err.println("RemoteException: " + e.getMessage()); > > } catch(CreateException e) { > > System.err.println("FinderException: " + e.getMessage()); > > } > > } > > } > > > > > > Thanks in advance, > > > > -Siraj > > This e-mail and any files transmitted with it are for the sole use of the > intended recipient(s) and may contain confidential and privileged information. > If you are not the intended recipient, please contact the sender by reply > e-mail and destroy all copies of the original message. > Any unauthorized review, use, disclosure, dissemination, forwarding, > printing or copying of this email or any action taken in reliance on this > e-mail is strictly > prohibited and may be unlawful. > >Visit us at http://www.cognizant.com >
RE: EJB JNDI lookup
Thanks Rakesh and Manu for your information. Now my look up doesn’t work and it throws an exception NamingException: /java:comp/env/ejb/helloworld-ejb/HelloBean not found. My openejb-jar.xml referes jndi name asHelloBeanejb-name> ejb/helloworld-ejb/HelloBeanjndi-name> And I am trying looking up it in my client class as: Object homeObject = ctx.lookup("java:comp/env/ejb/helloworld-ejb/HelloBean"); I also tried with different options like: Object homeObject = ctx.lookup("ejb/helloworld-ejb/HelloBean"); or Object homeObject = ctx.lookup("HelloBean"); Either one did not work. Am I missing some thing else? Thanks, -Siraj From: Ranjan, Rakesh (Cognizant) [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 23, 2005 6:17 PM To: user@geronimo.apache.org Subject: RE: EJB JNDI lookup You have not specified the system properties to get the InitialContext. Use the following code to get the InitialContext. Properties props = new Properties(); props.put("java.naming.factory.initial","org.openejb.client.RemoteInitialContextFactory"); props.put("java.naming.provider.url", "127.0.0.1:4201"); props.put("java.naming.security.principal", "system"); props.put("java.naming.security.credentials", "manager"); javax.naming.InitialContext ctx = new javax.naming.InitialContext(props); With Regards, Rakesh Ranjan From: Siraj Mohamed [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 23, 2005 4:05 PM To: user@geronimo.apache.org Subject: EJB JNDI lookup Hi All, I have deployed a hello world application (helloworld.ear) on Geronimo 1.0 M5. I have written a java client class to test my application. But I am getting following error message from the client code: NamingException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial It tells that I have to set java.naming.factory.initial and java.naming.provider.url in the jndi.properties. What would be the values to be specified for them for Geronimo server? This is my sample client code: /* * A simple client for accessing an EJB. */ public class HelloClient { public static void main(String[] args) { System.out.println("client started..."); try { javax.naming.Context ctx = new javax.naming.InitialContext(); // This is for use with com.evermind.server.ApplicationClientInitialContextFactory System.out.println("looking up..."); Object homeObject = ctx.lookup("java:comp/env/HelloBean"); // Narrow the reference to HelloHome HelloHome home = (HelloHome) PortableRemoteObject.narrow(homeObject, HelloHome.class); // Create remote object and narrow the reference to Hello. Hello remote = (Hello) PortableRemoteObject.narrow(home.create(), Hello.class); System.out.println(remote.sayHello("James Earl")); } catch(NamingException e) { System.err.println("NamingException: " + e.getMessage()); } catch(RemoteException e) { System.err.println("RemoteException: " + e.getMessage()); } catch(CreateException e) { System.err.println("FinderException: " + e.getMessage()); } } } Thanks in advance, -Siraj This e-mail and any files transmitted with it are for the sole use of the intended recipient(s) and may contain confidential and privileged information. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message. Any unauthorized review, use, disclosure, dissemination, forwarding, printing or copying of this email or any action taken in reliance on this e-mail is strictly prohibited and may be unlawful. Visit us at http://www.cognizant.com
Re: JNDI remote authentication problem
Hi Vasily, In the j2ee-server-plan.xml file it configures the IP addresses that the (OpenEJB) EJB daemon will accept connections from in the "allowHosts" attribute. For example: class="org.activeio.xnet.StandardServiceStackGBean"> EJB ${PlanOpenEJBPort} ${PlanServerHostname} ${PlanClientAddresses} HOST,NAME,THREADID,USERID HOST,NAME name="Executor">DefaultThreadPool name="Server">openejb:type=Server,name=EJB The In the geronimo\var\config.xml file (where you can specify attribute values that can override the values in the deployed plan) you should see the following section: 0.0.0.0 4201 In theory, you should be able to edit the config.xml file and specify the allowable remote host by doing something like: 0.0.0.0 4201 myhostname *** But I have a bug currently open where the port number in the config.xml file as shown in the example above is not actually used and I have a feeling the same problem will happen for allowHosts (see http://issues.apache.org/jira/browse/GERONIMO-1151 ). I haven't had a chance to debug this yet. Let me know what happens. I think most of the testing so far has been done on the localhost with the default port. Regards, John Zakharov, Vasily M wrote: Hello, all. I'm trying to run an application that should access the beans (deployed in a Geronimo server running on other machine) with a JNDI request. However, I get the following exception immediately at "new InitialContext()" statement: javax.naming.AuthenticationException: Cannot deternmine server protocol version: Received null/0.0; nested exception is: java.io.IOException: Unable to read protocol version. Reached the end of the stream. The Geronimo console states the following at that moment: 15:31:20,132 ERROR [EJB] Host is not authorized to access this service. java.lang.SecurityException: Host is not authorized to access this service. at org.activeio.xnet.hba.ServiceAccessController.checkHostsAuthorization(ServiceAccessController.java:78) at org.activeio.xnet.hba.ServiceAccessController.service(ServiceAccessController.java:51) at org.activeio.xnet.ServiceLogger.service(ServiceLogger.java:74) at org.activeio.xnet.ServiceDaemon$SocketListener.run(ServiceDaemon.java:151) at java.lang.Thread.run(Unknown Source) (here replaces the IP address of the machine where I run my application) I'm using a default installation of Geronimo 1.0 M5, and Windows XP SP2 and Sun's JRE 1.4.2_08 on both machines. The client application's system properties include: java.naming.factory.initial=org.openejb.client.RemoteInitialContextFactory java.naming.provider.url=:4201 java.naming.security.principal=system java.naming.security.credentials=manager (here replaces the name of the machine where Geronimo is running and principal/credentials are the same I use to login to Geronimo console) Also, I've put a local copy of openejb-core-2.0-G1M5.jar to the application's classpath for context factory to be found. Could somebody please point me at what I'm doing wrong and how can I tune Geronimo to accept JNDI connections from the remote machine? Thanks in advance, Vasily Zakharov, Intel Managed Runtime Division
RE: EJB JNDI lookup
You have not specified the system properties to get the InitialContext. Use the following code to get the InitialContext. Properties props = new Properties(); props.put("java.naming.factory.initial","org.openejb.client.RemoteInitialContextFactory"); props.put("java.naming.provider.url", "127.0.0.1:4201"); props.put("java.naming.security.principal", "system"); props.put("java.naming.security.credentials", "manager"); javax.naming.InitialContext ctx = new javax.naming.InitialContext(props); With Regards, Rakesh Ranjan From: Siraj Mohamed [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 23, 2005 4:05 PM To: user@geronimo.apache.org Subject: EJB JNDI lookup Hi All, I have deployed a hello world application (helloworld.ear) on Geronimo 1.0 M5. I have written a java client class to test my application. But I am getting following error message from the client code: NamingException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial It tells that I have to set java.naming.factory.initial and java.naming.provider.url in the jndi.properties. What would be the values to be specified for them for Geronimo server? This is my sample client code: /* * A simple client for accessing an EJB. */ public class HelloClient { public static void main(String[] args) { System.out.println("client started..."); try { javax.naming.Context ctx = new javax.naming.InitialContext(); // This is for use with com.evermind.server.ApplicationClientInitialContextFactory System.out.println("looking up..."); Object homeObject = ctx.lookup("java:comp/env/HelloBean"); // Narrow the reference to HelloHome HelloHome home = (HelloHome) PortableRemoteObject.narrow(homeObject, HelloHome.class); // Create remote object and narrow the reference to Hello. Hello remote = (Hello) PortableRemoteObject.narrow(home.create(), Hello.class); System.out.println(remote.sayHello("James Earl")); } catch(NamingException e) { System.err.println("NamingException: " + e.getMessage()); } catch(RemoteException e) { System.err.println("RemoteException: " + e.getMessage()); } catch(CreateException e) { System.err.println("FinderException: " + e.getMessage()); } } } Thanks in advance, -Siraj This e-mail and any files transmitted with it are for the sole use of the intended recipient(s) and may contain confidential and privileged information. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message. Any unauthorized review, use, disclosure, dissemination, forwarding, printing or copying of this email or any action taken in reliance on this e-mail is strictly prohibited and may be unlawful. Visit us at http://www.cognizant.com
Re: EJB JNDI lookup
Hi Siraj You can use the following Properties props = new Properties(); props.put("java.naming.factory.initial","org.openejb.client.RemoteInitialContextFactory"); props.put("java.naming.provider.url", "127.0.0.1:4201"); props.put("java.naming.security.principal", "testuser"); props.put("java.naming.security.credentials", "testpassword"); Context ctx = new InitialContext(props); principal and credentials can be anything as I think it is not checked . Regards ManuOn 11/23/05, Siraj Mohamed <[EMAIL PROTECTED]> wrote: Hi All, I have deployed a hello world application (helloworld.ear) on Geronimo 1.0 M5. I have written a java client class to test my application. But I am getting following error message from the client code: NamingException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial It tells that I have to set java.naming.factory.initial and java.naming.provider.url in the jndi.properties. What would be the values to be specified for them for Geronimo server? This is my sample client code: /* * A simple client for accessing an EJB. */ public class HelloClient { public static void main(String[] args) { System.out.println("client started..."); try { javax.naming.Context ctx = new javax.naming.InitialContext(); // This is for use with com.evermind.server.ApplicationClientInitialContextFactory System.out.println("looking up..."); Object homeObject = ctx.lookup("java:comp/env/HelloBean"); // Narrow the reference to HelloHome HelloHome home = (HelloHome) PortableRemoteObject.narrow(homeObject, HelloHome.class ); // Create remote object and narrow the reference to Hello. Hello remote = (Hello) PortableRemoteObject.narrow(home.create(), Hello.class); System.out.println(remote.sayHello("James Earl")); } catch(NamingException e) { System.err.println("NamingException: " + e.getMessage()); } catch(RemoteException e) { System.err.println("RemoteException: " + e.getMessage()); } catch(CreateException e) { System.err.println("FinderException: " + e.getMessage()); } } } Thanks in advance, -Siraj
EJB JNDI lookup
Hi All, I have deployed a hello world application (helloworld.ear) on Geronimo 1.0 M5. I have written a java client class to test my application. But I am getting following error message from the client code: NamingException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial It tells that I have to set java.naming.factory.initial and java.naming.provider.url in the jndi.properties. What would be the values to be specified for them for Geronimo server? This is my sample client code: /* * A simple client for accessing an EJB. */ public class HelloClient { public static void main(String[] args) { System.out.println("client started..."); try { javax.naming.Context ctx = new javax.naming.InitialContext(); // This is for use with com.evermind.server.ApplicationClientInitialContextFactory System.out.println("looking up..."); Object homeObject = ctx.lookup("java:comp/env/HelloBean"); // Narrow the reference to HelloHome HelloHome home = (HelloHome) PortableRemoteObject.narrow(homeObject, HelloHome.class); // Create remote object and narrow the reference to Hello. Hello remote = (Hello) PortableRemoteObject.narrow(home.create(), Hello.class); System.out.println(remote.sayHello("James Earl")); } catch(NamingException e) { System.err.println("NamingException: " + e.getMessage()); } catch(RemoteException e) { System.err.println("RemoteException: " + e.getMessage()); } catch(CreateException e) { System.err.println("FinderException: " + e.getMessage()); } } } Thanks in advance, -Siraj