Re: your current Geronimo evaluation

2009-03-10 Thread Jaikiran


djencks wrote:
 
 
 Anyway, I think you should try out the servers you think are  
 interesting and see which one(s) fit your requirements and style of  
 work.  This is not really the place to discuss the advantages or  
 disadvantages of JBoss.  You can easily deploy simple apps on any app  
 server.  To me it seems more interesting to ask how the app server  
 fits into the software development and maintenance workflow.  For  
 instance, how much of the server configuration easily fits in scm and  
 how does it get from scm to the developer, qa, and production  
 servers? 
 david jencks
 
+10

-- 
View this message in context: 
http://www.nabble.com/your-current-Geronimo-evaluation-tp22329850s134p22428916.html
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.



Re: jndi datasource access problem

2009-03-10 Thread Rex Wang
can you show us the deployment plan and deployment descriptor of your
application using the datasource?


Rex.

2009/3/4 David Jencks david_jen...@yahoo.com


 On Mar 3, 2009, at 12:50 AM, Jack Cai wrote:



 2009/3/3 Kaupo kpar...@gmail.com



 Jack Cai wrote:
 
  Are you runing this piece of code in the server container or in a
  standalone
  Web service client? Looks like you are running in the client. You can't
  access the server context (resources) in the standalone client.
 
 This code was in the same server. I'm using it in my UserDao, for user
 authentication. It just doesn't want to work when I try using basic
 authentication on my webservice (that is running in the same server) Maybe
 the axis2 engine used in geronimo automatically somehow makes my
 webservice
 a standalone client?


 No, that should not happen. Maybe it's configuration problem. You can see
 the usage information of your datasource in admin console (in Database
 Pools page, click Usage link of your datasource.


 Maybe its a bug in the ejb webservices code.  Could you provide a full
 stack trace to the jndi lookup error?

 thanks
 david jencks

 Are you able to run the code successfully with the global JNDI name now?

 -Jack





Re: JNDI in Geronimo 2

2009-03-10 Thread Rex Wang
Tang, I believe Russell use a remote client, but not a application client.

to Russell, try ejbd://localhost:4201


Rex.

2009/3/10 Ying Tang yingtang1...@gmail.com

 Hi Russell,

 I suggest you use JDK 1.5 instead of 1.6. It is also recommended that
 Eclipse and Geronimo use the same Java environment.

 Please let me know if there is still any problem.

 Best Regards,

 Ying Tang


 2009/3/10 Russell Collins russell.coll...@mclaneat.com

  Thank you Tang.  This should be real strait forward but there has got to
 be some reason why this is not working.  Here is the configuration that I
 have.  This may help in solving this issue.



 Eclipse Ganymede

 Java 1.6..0_11

 Geronimo 2.1.2

 Geronimo 2.1.3 (tried it on both)



 There are a couple of other things that I tried that gave me different
 results.

 1.Added a runtime dependency to the Geronimo Runtime.  This gave me a
 different error.  It was a java runtime error that said that the response
 from the server is: -1

 2.Created a client j2ee application to run my app.



 Basically, I am following everything in that link that you sent me.  I am
 just getting these errors when trying to look up the object.  Any more
 insight would be greatly appreciated.





 *From:* Ying Tang [mailto:yingtang1...@gmail.com]
 *Sent:* Monday, March 09, 2009 11:21 PM
 *To:* user@geronimo.apache.org
 *Subject:* Re: JNDI in Geronimo 2



 Hi Russell,

 I tried your example on Geronimo 2.1.4.

 1. I renamed the implementation class  as FirstObjectBean.  A bit
 different from your code:
 ---

 @Stateless

 *public* *class* *FirstObjectBean* *implements* *FirstObjectRemote* {
 import

 *   public* *String* *hello*(*String* name){

   *return* Hello  + name;

}

 }
 ---

 2.  In the application client that referece the EJB, I used
 ---
 *import ejb.FirstObjectRemote;*
 ...
 *FirstObjectRemote* firstObject = (*FirstObjectRemote*)context.*lookup*(
 FirstObjectBeanRemote);
 ---
 3. Add the EJB project to the build path of the application client
 project.
 4. Add the two projects to the Geronimo server, and run the application
 client.

 The application works well and the Hello Russel message shows up.

 For more detailed information, please refer to:

 http://cwiki.apache.org/confluence/display/GMOxDOC22/Deploying+and+running+EJB+application+clients

 Hope this helps.


 Best Regards,

 Ying Tang  (Sophia)

  2009/3/9 Russell Collins russell.coll...@mclaneat.com

 Hello.  I am new to the list, new to EJB 3.0 and new to Geronimo 2.  I am
 pretty sure I understand all of the concepts but I am having an issue with a
 JNDI lookup in Geronimo.  I have created a Bean and it looks as follows.



 Interface:



 @Remote

 *public* *interface* *FirstObjectRemote* {

   *public* *String* *hello*(*String* name);

 }



 Class:



 @Stateless

 *public* *class* *FirstObject* *implements* *FirstObjectRemote* {



*public* *FirstObject*() {

}



@Override

 *   public* *String* *hello*(*String* name){

   *return* Hello  + name;

}



 }



 Everything deploys just fine (at lease I think it does).  I created a test
 class:





 *public* *class* *TheClass*

 {

 *public* *static* *void* *main*(*String*[] args)

   {

 *Properties* prop=*new* *Properties*();

 prop.*put*(*Context*.*INITIAL_CONTEXT_FACTORY*,
 org.apache.openejb.client.RemoteInitialContextFactory);

 prop.*put*(*Context*.*PROVIDER_URL*, ejbd://localhost:1099
 );



 *try*{

   *Context* context = *new* *InitialContext*(prop);

   *FirstObjectRemote* firstObject = (*FirstObjectRemote*
 )context.*lookup*(FirstObjectRemote);

   *System*.*out*.*println*(firstObject.*hello*(Russell
 ));

 }

 *catch*(*Exception* ex){

   *System*.*out*.*println*(ex.*toString*());

 }



   }

 }





 I get an error I when trying to run this.  The error that comes back is:





 *javax.naming.NamingException*: Cannot lookup '/FirstObjectRemote'. [Root
 exception is *java.rmi.RemoteException*: Error while communicating with
 server: ; nested exception is:

   java.lang.NoClassDefFoundError: javax/transaction/RollbackException]







 What am I missing?







Re: JNDI in Geronimo 2

2009-03-10 Thread Ying Tang
Yes,  should be ejbd://localhost:4201. The same as the example in the
dochttp://cwiki.apache.org/confluence/display/GMOxDOC22/Deploying+and+running+EJB+application+clients
.

2009/3/10 Rex Wang rwo...@gmail.com

 Tang, I believe Russell use a remote client, but not a application client.

 to Russell, try ejbd://localhost:4201


 Rex.

 2009/3/10 Ying Tang yingtang1...@gmail.com

 Hi Russell,

 I suggest you use JDK 1.5 instead of 1.6. It is also recommended that
 Eclipse and Geronimo use the same Java environment.

 Please let me know if there is still any problem.

 Best Regards,

 Ying Tang


 2009/3/10 Russell Collins russell.coll...@mclaneat.com

  Thank you Tang.  This should be real strait forward but there has got to
 be some reason why this is not working.  Here is the configuration that I
 have.  This may help in solving this issue.



 Eclipse Ganymede

 Java 1.6..0_11

 Geronimo 2.1.2

 Geronimo 2.1.3 (tried it on both)



 There are a couple of other things that I tried that gave me different
 results.

 1.Added a runtime dependency to the Geronimo Runtime.  This gave me
 a different error.  It was a java runtime error that said that the response
 from the server is: -1

 2.Created a client j2ee application to run my app.



 Basically, I am following everything in that link that you sent me.  I am
 just getting these errors when trying to look up the object.  Any more
 insight would be greatly appreciated.





 *From:* Ying Tang [mailto:yingtang1...@gmail.com]
 *Sent:* Monday, March 09, 2009 11:21 PM
 *To:* user@geronimo.apache.org
 *Subject:* Re: JNDI in Geronimo 2



 Hi Russell,

 I tried your example on Geronimo 2.1.4.

 1. I renamed the implementation class  as FirstObjectBean.  A bit
 different from your code:
 ---

 @Stateless

 *public* *class* *FirstObjectBean* *implements* *FirstObjectRemote* {
 import

 *   public* *String* *hello*(*String* name){

   *return* Hello  + name;

}

 }
 ---

 2.  In the application client that referece the EJB, I used
 ---
 *import ejb.FirstObjectRemote;*
 ...
 *FirstObjectRemote* firstObject = (*FirstObjectRemote*)context.*lookup*(
 FirstObjectBeanRemote);
 ---
 3. Add the EJB project to the build path of the application client
 project.
 4. Add the two projects to the Geronimo server, and run the application
 client.

 The application works well and the Hello Russel message shows up.

 For more detailed information, please refer to:

 http://cwiki.apache.org/confluence/display/GMOxDOC22/Deploying+and+running+EJB+application+clients

 Hope this helps.


 Best Regards,

 Ying Tang  (Sophia)

  2009/3/9 Russell Collins russell.coll...@mclaneat.com

 Hello.  I am new to the list, new to EJB 3.0 and new to Geronimo 2.  I am
 pretty sure I understand all of the concepts but I am having an issue with a
 JNDI lookup in Geronimo.  I have created a Bean and it looks as follows.



 Interface:



 @Remote

 *public* *interface* *FirstObjectRemote* {

   *public* *String* *hello*(*String* name);

 }



 Class:



 @Stateless

 *public* *class* *FirstObject* *implements* *FirstObjectRemote* {



*public* *FirstObject*() {

}



@Override

 *   public* *String* *hello*(*String* name){

   *return* Hello  + name;

}



 }



 Everything deploys just fine (at lease I think it does).  I created a
 test class:





 *public* *class* *TheClass*

 {

 *public* *static* *void* *main*(*String*[] args)

   {

 *Properties* prop=*new* *Properties*();

 prop.*put*(*Context*.*INITIAL_CONTEXT_FACTORY*,
 org.apache.openejb.client.RemoteInitialContextFactory);

 prop.*put*(*Context*.*PROVIDER_URL*, ejbd://localhost:1099
 );



 *try*{

   *Context* context = *new* *InitialContext*(prop);

   *FirstObjectRemote* firstObject = (*FirstObjectRemote*
 )context.*lookup*(FirstObjectRemote);

   *System*.*out*.*println*(firstObject.*hello*(Russell
 ));

 }

 *catch*(*Exception* ex){

   *System*.*out*.*println*(ex.*toString*());

 }



   }

 }





 I get an error I when trying to run this.  The error that comes back is:





 *javax.naming.NamingException*: Cannot lookup '/FirstObjectRemote'.
 [Root exception is *java.rmi.RemoteException*: Error while communicating
 with server: ; nested exception is:

   java.lang.NoClassDefFoundError:
 javax/transaction/RollbackException]







 What am I missing?








Re: Newbie problem with Geronimo 2.1.3

2009-03-10 Thread Ricardo Peironcely
Thanks David.

I've erased the modules form geronimo-application.xml and the project runs
without problems.

2009/3/5 David Jencks david_jen...@yahoo.com


 On Mar 5, 2009, at 8:24 AM, Ricardo Peironcely wrote:

  I've found my error, but i don't know how to solve it.

 I'm working with eclipse geronimo adapter. And when I define the
 modules in geronimo-application.xml i wrote:

   app:module
   app:webPruebaGeronimoWeb.war/app:web
   app:alt-ddPruebaGeronimoWeb.war/app:alt-dd
   /app:module
   app:module
   app:jarPruebaGeronimoEjb.ejb/app:jar
   app:alt-ddPruebaGeronimoEjb.jar/app:alt-dd
   /app:module

 The error raises when try to open the jar file as an xml because is
 referenced by the alt-dd tag.

 But I don't know what write in this alt-dd tag. Must I create any
 new file in the EAR package? Is not enough with the openejb-jar.xml
 from EJB jar and geronimo-web.xml from WAR?


 - if you have individual module plans (openejb-jar.xml and
 geronimo-web.xml) in the modules you should be able to completely leave out
 both app:module elements

 - I prefer to have all my geronimo configuration in one place.  In this
 case you would put the content of the module plans inside the app:module
 elements in place of the app:alt-dd element.  I actually prefer to keep this
 single plan outside my ear file but this is certainly not necessary.

 thanks
 david jencks



 Best regards and thanks.
 Ricardo Peironcely

 2009/3/4 Kevan Miller kevan.mil...@gmail.com:


 On Mar 4, 2009, at 3:25 PM, Ricardo Peironcely wrote:

  Hello all!!

 I've a problem with a very simple application.

 I've developed an war with a simple JSP that uses a simple method in a
 class of the same project. This class invoques a Stateless 3.0 EJB
 that always return hello world. The application is packed in an EAR.

 When I try to deply this app in Geronimo 2.1.3 with the Deploy New
 option in the console, always get the same error:


 That's certainly not a very helpful error message. Can you tell us what's
 in
 your EAR file? Or, can you share your EAR file with us?

 --kevan






-- 
Un saludo / Best regards / С уважением

Ricardo Peironcely


Re: jar.xml files

2009-03-10 Thread Kevan Miller


On Mar 10, 2009, at 12:12 AM, Russell Collins wrote:

I am having an issue with the ejb-jar.xml and openejb-jar.xml  
files.  When I don’t add anything to these files, they have no  
errors.  However, when I add an element (in this case enterprise- 
beans) I get the following errors:


[severity=ERROR,message=unexpected element (uri:,  
local:enterprise-beans). Expected elements are {http://openejb.apache.org/xml/ns/openejb-jar-2.2 
}ejb-ql-compiler-factory,{http://geronimo.apache.org/xml/ns/deployment-1.2 
}service,{http://geronimo.apache.org/xml/ns/naming-1.2}message- 
destination,{http://openejb.apache.org/xml/ns/openejb-jar-2.2}db- 
syntax-factory,{http://geronimo.apache.org/xml/ns/ 
security-2.0}security,{http://geronimo.apache.org/xml/ns/deployment-1.2 
}environment,{http://java.sun.com/xml/ns/ 
persistence}persistence,{http://geronimo.apache.org/xml/ns/naming-1.2 
}cmp-connection-factory,{http://openejb.apache.org/xml/ns/openejb-jar-2.2 
}relationships,{http://geronimo.apache.org/xml/ns/ 
deployment-1.2}gbean,{http://openejb.apache.org/xml/ns/openejb-jar-2.2 
}enterprise-beans,{http://openejb.apache.org/xml/ns/openejb- 
jar-2.2}enforce-foreign-key-constraints,{http://geronimo.apache.org/xml/ns/j2ee/application-1.2 
}security 
,locator=[node=null,object=null,url=null,line=11,col=24,offset=-1]]


Looks like your enterprise-beans element is in the wrong xml  
namespace. What does your plan look like?


--kevan

CMP exception: Attempt to cast instance xxx [java.lang.String] to PersistenceCapable failed. Ensure that it has been enhanced.

2009-03-10 Thread Phili

Hi

i've been playing around with a test project consisting of

a cmp entity bean and a simple 1-method-webservice trying to persist on
instance of that entity.

deployment of the classes went well but i couldnt get an entity-instance
persisted.


the entity class look something like this

@Entity
@Table(name=SOMETABLE)
public class EntityClass implements Serializable
{
@Id
@GeneratedValue(strategy=GenerationType.AUTO)
public int id;
@Column(length=100)
public String name;

int getId()
{
return id;
}

void setId(int id)
{
this.id = id;
}

String getName()
{
return name;
}

void setName(String name)
{
this.name = name;
}
}


whereas the webservice implementation is

@Stateless
@WebService(serviceName = TestWS,
portName = TestWSPort,
endpointInterface = ,
targetNamespace = xxx)
public class TestWSBean implements TestWS {

@PersistenceContext(unitName=TestPU)
private EntityManager em;

public String saveName(String value)
{
String result = ok;

try {
EntityClass b = new EntityClass();
b.setName(value);
em.persist(value);  
}
catch(Exception ex) {
ex.printStackTrace();
result = ex.getLocalizedMessage() +   + 
ex.getClass().getName();  
}

return result;
}
}


Calling the webservice-method from within the eclipse ws-explorer i get the
following message:



Attempt to cast instance abc [java.lang.String] to PersistenceCapable
failed.  Ensure that it has been enhanced.
org.apache.openjpa.persistence.ArgumentException
 
geronimo is 2.1.3.

Kind regards

 Phil
-- 
View this message in context: 
http://www.nabble.com/CMP-exception%3A-Attempt-to-cast-instance-%22xxx--java.lang.String-%22-to-PersistenceCapable-failed.--Ensure-that-it-has-been-enhanced.-tp22436043s134p22436043.html
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.


Re: your current Geronimo evaluation

2009-03-10 Thread Aldian_00


Ok Thank you very much everyone for the reply. I would still have a tough
question to ask you:

About Geronimo's load balancing / failover capacities. Is it only based on
apache's ones, or is there a functionality specific to Geronimo about this? 

I am asking this because it seems that apache's load balancing only bother
of front-end aspects: severals servers with thousands of clients
(web-browsers or desktop applications). And in our case we plan to developp
an application of type Operations Support Systems which will be interfaced
to an existant Network Management System, and we will need to use back-end
type load-balancing between all our thousands of equipements. As for our
client applications, we won't have many.

So here is the question: Is Geronimo able to perform load-balancing of
back-end type?

Aldian
-- 
View this message in context: 
http://www.nabble.com/your-current-Geronimo-evaluation-tp22329850s134p22436951.html
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.



RE: JNDI in Geronimo 2

2009-03-10 Thread Russell Collins
Thank you Wang and Tang.  Here are the things that I have done.


* Changed the JDK to version 1.5.0_6

* Updated all of my classes to use this version of Java

* Changed the provider url to ejbd://localhost:4201

I get the error

java.lang.RuntimeException: Invalid response from server: -1




From: Ying Tang [mailto:yingtang1...@gmail.com]
Sent: Tuesday, March 10, 2009 3:23 AM
To: user@geronimo.apache.org
Subject: Re: JNDI in Geronimo 2

Yes,  should be ejbd://localhost:4201. The same as the example in the 
dochttp://cwiki.apache.org/confluence/display/GMOxDOC22/Deploying+and+running+EJB+application+clients.
2009/3/10 Rex Wang rwo...@gmail.commailto:rwo...@gmail.com
Tang, I believe Russell use a remote client, but not a application client.

to Russell, try ejbd://localhost:4201


Rex.
2009/3/10 Ying Tang yingtang1...@gmail.commailto:yingtang1...@gmail.com

Hi Russell,

I suggest you use JDK 1.5 instead of 1.6. It is also recommended that Eclipse 
and Geronimo use the same Java environment.

Please let me know if there is still any problem.

Best Regards,

Ying Tang

2009/3/10 Russell Collins 
russell.coll...@mclaneat.commailto:russell.coll...@mclaneat.com


Thank you Tang.  This should be real strait forward but there has got to be 
some reason why this is not working.  Here is the configuration that I have.  
This may help in solving this issue.



Eclipse Ganymede

Java 1.6..0_11

Geronimo 2.1.2

Geronimo 2.1.3 (tried it on both)



There are a couple of other things that I tried that gave me different results.

1.Added a runtime dependency to the Geronimo Runtime.  This gave me a 
different error.  It was a java runtime error that said that the response from 
the server is: -1

2.Created a client j2ee application to run my app.



Basically, I am following everything in that link that you sent me.  I am just 
getting these errors when trying to look up the object.  Any more insight would 
be greatly appreciated.





From: Ying Tang [mailto:yingtang1...@gmail.commailto:yingtang1...@gmail.com]
Sent: Monday, March 09, 2009 11:21 PM
To: user@geronimo.apache.orgmailto:user@geronimo.apache.org
Subject: Re: JNDI in Geronimo 2



Hi Error! Filename not specified.Russell,

I tried your example on Geronimo 2.1.4.

1. I renamed the implementation class  as FirstObjectBean.  A bit different 
from your code:
---

@Stateless

public class FirstObjectBean implements FirstObjectRemote { import

   public String hello(String name){

  return Hello  + name;

   }

}
---

2.  In the application client that referece the EJB, I used
---
import ejb.FirstObjectRemote;
...
FirstObjectRemote firstObject = 
(FirstObjectRemote)context.lookup(FirstObjectBeanRemote);
---
3. Add the EJB project to the build path of the application client project.
4. Add the two projects to the Geronimo server, and run the application client.

The application works well and the Hello Russel message shows up.

For more detailed information, please refer to:
http://cwiki.apache.org/confluence/display/GMOxDOC22/Deploying+and+running+EJB+application+clients

Hope this helps.


Best Regards,

Ying Tang  (Sophia)

2009/3/9 Russell Collins 
russell.coll...@mclaneat.commailto:russell.coll...@mclaneat.com

Hello.  I am new to the list, new to EJB 3.0 and new to Geronimo 2.  I am 
pretty sure I understand all of the concepts but I am having an issue with a 
JNDI lookup in Geronimo.  I have created a Bean and it looks as follows.



Interface:



@Remote

public interface FirstObjectRemote {

  public String hello(String name);

}



Class:



@Stateless

public class FirstObject implements FirstObjectRemote {



   public FirstObject() {

   }



   @Override

   public String hello(String name){

  return Hello  + name;

   }



}



Everything deploys just fine (at lease I think it does).  I created a test 
class:





public class TheClass

{

public static void main(String[] args)

  {

Properties prop=new Properties();

prop.put(Context.INITIAL_CONTEXT_FACTORY, 
org.apache.openejb.client.RemoteInitialContextFactory);

prop.put(Context.PROVIDER_URL, ejbd://localhost:1099);



try{

  Context context = new InitialContext(prop);

  FirstObjectRemote firstObject = 
(FirstObjectRemote)context.lookup(FirstObjectRemote);

  System.out.println(firstObject.hello(Russell));

}

catch(Exception ex){

  System.out.println(ex.toString());

}



  }

}





I get an error I when trying to run this.  The error that comes back is:





javax.naming.NamingException: Cannot lookup '/FirstObjectRemote'. [Root 
exception is java.rmi.RemoteException: Error while 

RE: jar.xml files

2009-03-10 Thread Russell Collins
Here is what my ejb-jar.xml file looks like



?xml version=1.0 encoding=UTF-8?
ejb-jar xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; 
xmlns=http://java.sun.com/xml/ns/javaee; 
xmlns:ejb=http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd; 
xsi:schemaLocation=http://java.sun.com/xml/ns/javaee 
http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd; version=3.0
  display-name
Secondenterprise /display-name
  ejb-client-jarSecondenterpriseClient.jar/ejb-client-jar
  enterprise-beans
  session
ejb-nameThirdObject/ejb-name
ejb-classcom.ent.third.ThirdObject/ejb-class
remoteThirdObjectRemote/remote
  /session
  /enterprise-beans
/ejb-jar


From: Kevan Miller [mailto:kevan.mil...@gmail.com]
Sent: Tuesday, March 10, 2009 8:32 AM
To: user@geronimo.apache.org
Subject: Re: jar.xml files


On Mar 10, 2009, at 12:12 AM, Russell Collins wrote:


I am having an issue with the ejb-jar.xml and openejb-jar.xml files.  When I 
don't add anything to these files, they have no errors.  However, when I add an 
element (in this case enterprise-beans) I get the following errors:

[severity=ERROR,message=unexpected element (uri:, local:enterprise-beans). 
Expected elements are 
{http://openejb.apache.org/xml/ns/openejb-jar-2.2}ejb-ql-compiler-factory,{http://geronimo.apache.org/xml/ns/deployment-1.2}service,{http://geronimo.apache.org/xml/ns/naming-1.2}message-destination,{http://openejb.apache.org/xml/ns/openejb-jar-2.2}db-syntax-factory,{http://geronimo.apache.org/xml/ns/security-2.0}security,{http://geronimo.apache.org/xml/ns/deployment-1.2}environment,{http://java.sun.com/xml/ns/persistence}persistence,{http://geronimo.apache.org/xml/ns/naming-1.2}cmp-connection-factory,{http://openejb.apache.org/xml/ns/openejb-jar-2.2}relationships,{http://geronimo.apache.org/xml/ns/deployment-1.2}gbean,{http://openejb.apache.org/xml/ns/openejb-jar-2.2}enterprise-beans,{http://openejb.apache.org/xml/ns/openejb-jar-2.2}enforce-foreign-key-constraints,{http://geronimo.apache.org/xml/ns/j2ee/application-1.2}security,locator=[node=null,object=null,url=null,line=11,col=24,offset=-1]]

Looks like your enterprise-beans element is in the wrong xml namespace. What 
does your plan look like?

--kevan


Re: Gbean to install plugin from remote repository?

2009-03-10 Thread David Jencks


On Mar 9, 2009, at 7:34 PM, James D Carroll wrote:


I really hate hijack the OP, but in truth none of the scenarios you
mentioned are what I'd like to be able to do:

My group creates products that other areas of the company may or may  
not

find useful. Vacation tracker, time sheets, workflow, whatever.  What
I'm trying to make the case for is that instead of those groups  
running

on our servers (and us getting the bill), we give them a copy of
Geronimo and show them how to point to and install only those
applications/plugins that they want from the Admin Console. Creating a
custom server for them to start would certainly be possible and easy
enough to do from what I can see, but at the end of the day, we want  
to

basically say Here's your container, here's the repository of what we
make, grab what you want.

As for Maven, all I can say is that every time I've tried to use it  
(in

Eclipse) I've just gotten very frustrated. I'm sure its much more my
problem than Maven's and it looks like it has TONS to offer.  I just
don't have the patience to get it right.


I think there are two ways to do this:

1. non-maven (relies on running scripts by hand, editing files by  
hand, difficult to automate)


Set up a geronimo instance somewhere to use as your geronimo plugin  
repository.  Deploy your apps into it, and either copy a suitable  
geronimo-plugin.xml into the appropriate place in the unpacked plugin  
in the geronimo repository or edit it using the admin console.  (I  
haven't checked the admin console geronimo-plugin.xml editor recently  
to see how functional it is)


2. maven (more automated, pretty much everything important is in scm)
Build your apps into plugins using maven with the car-maven-plugin.   
The geronimo-plugin.xml will be constructed for you from your  
pom.xmls.  At this point you can either install your plugins into a  
geronimo instance somewhere acting as your geronimo plugin repository  
or use maven to deploy into nexus.


If you deploy into geronimo, geronimo will generate a plugin catalog  
for you.  If you use nexus, you'll have to generate one yourself and  
make it available somewhere.  (I guess you can deploy it as an  
artifact in nexus?? I haven't tried this)  The car-maven-plugin will  
update a local plugin catalog for you automatically and there's also a  
goal to scan your local repo and construct a catalog.


I've been using maven for years and can't quite imagine life without  
it, despite all the annoyances.  I've just recently tried using it in  
eclipse, using m2eclipse and I'm not sure how much added value that  
brings.  Help with editing poms is nice but I haven't found much use  
for eclipse running maven for me.


thanks
david jencks






Thanks!


On Mon, 2009-03-09 at 11:19 -0700, David Jencks wrote:
Could you outline your goal a little more from a higher level  
viewpoint?


If you are trying to produce a consistent reproducible server image
with known contents through your build system I recommend  
assembling a

custom server using maven.

If you are trying to install plugins to an existing server using
scripts I recommend gshell.

If you are building plugins using maven (highly recommended) I
recommend sonatype nexus as a remote plugin repository.  You can
easily set up a company-wide nexus instance and arrange for maven to
deploy your plugins into it.

IIRC in trunk the geronimo-maven-plugin can also be used to install
plugins into a running geronimo server.  I don't recall if this made
it into the 2.1.x series.

thanks
david jencks


On Mar 9, 2009, at 10:50 AM, RickI wrote:



You can also use tomcat/jetty that comes with geronimo to expose
repo via
http.

What I try to do is to install plugin from remote repo without web
console.
I try to do it from ant by calling deploy command line tool,
or from java code by calling gbean.

Thanks,

Ricky


RunHua Chi wrote:


Alright, to accomplish what you expected, it's more likely about
how to
set
up a http server and expose the file via http url.

Here is the topic for your information.
http://httpd.apache.org/docs/2.2/sections.html.(Assume you are  
using

Apache
http server.)
And farming,load balancing and clustering topics using Geronimo,
please
refer to

http://cwiki.apache.org/confluence/display/GMOxDOC22/Clustering+and+farming


Jeff Chi


On Sun, Mar 8, 2009 at 11:35 AM, James D Carroll 
jamesdcarrol...@verizon.net wrote:


The example showed 2 'remote' repositories (for apache) as does my
local
install, so that's why I was thinking that it was possible.

And the scenario you gave of a company wide repository is
precisely why
I was asking. I work at a very large/ global company and my group
creates web based apps, but in PHP running on Apache. I'm trying
to make
the case that we should move to Java/Geronimo so that we can
create the
code and post it to the repository. Then the other areas could
come and
get it whenever they wanted; perhaps to a test instance first,  
then
their prod server 

Re: your current Geronimo evaluation

2009-03-10 Thread Xasima Xirohata
Sorry,
 and we will need to use back-end type load-balancing

is it on the topic of  Group Communication Management System, means
1) load balancing to propagate requests  to the certain instance of
Network Management System (equipment)
2) automatic determining of inclusion / exclusion certain instance
(equipment) to/from the group
3) determining fail overs in request propagation or instance (equipment) live.

So you want to use Geronimo in scope of  Clients - Geronimo -
GROUP {equipment}, don't you?



On Tue, Mar 10, 2009 at 5:38 PM, Aldian_00 aldian...@gmail.com wrote:


 Ok Thank you very much everyone for the reply. I would still have a tough
 question to ask you:

 About Geronimo's load balancing / failover capacities. Is it only based on
 apache's ones, or is there a functionality specific to Geronimo about this?

 I am asking this because it seems that apache's load balancing only bother
 of front-end aspects: severals servers with thousands of clients
 (web-browsers or desktop applications). And in our case we plan to developp
 an application of type Operations Support Systems which will be interfaced
 to an existant Network Management System, and we will need to use back-end
 type load-balancing between all our thousands of equipements. As for our
 client applications, we won't have many.

 So here is the question: Is Geronimo able to perform load-balancing of
 back-end type?

 Aldian
 --
 View this message in context: 
 http://www.nabble.com/your-current-Geronimo-evaluation-tp22329850s134p22436951.html
 Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.





-- 
Best regards,
 ~ Xasima Xirohata ~


Re: JNDI in Geronimo 2

2009-03-10 Thread Rex Wang
Russell, could you provide the whole exception strack?

I can not got your problem.

here is my code:
public class Client {
public static void main(String[] args) throws Exception {

try {
Properties p = new Properties();
p.setProperty(java.naming.factory.initial,
org.apache.openejb.client.RemoteInitialContextFactory);
p.setProperty(java.naming.provider.url,
ejbd://localhost:4201);

InitialContext context = new InitialContext(p);

FirstObjectRemote obj= (FirstObjectRemote)
context.lookup(FirstObjectBeanRemote);
System.out.println(obj.hello(Rex));

} catch (Exception e) {
e.printStackTrace();
}

}
}

I try it with Tang's EJB code as follows:
import javax.ejb.Stateless;
@Stateless
public class FirstObjectBean implements FirstObjectRemote{
public String hello(String name){
  return Hello  + name;
   }
}


import javax.ejb.Remote;
@Remote
public interface FirstObjectRemote {
public String hello(String name);
}



Rex



2009/3/11 Russell Collins russell.coll...@mclaneat.com

  Thank you Wang and Tang.  Here are the things that I have done.



 · Changed the JDK to version 1.5.0_6

 · Updated all of my classes to use this version of Java

 · Changed the provider url to ejbd://localhost:4201



 I get the error



 *java.lang.RuntimeException*: Invalid response from server: -1









 *From:* Ying Tang [mailto:yingtang1...@gmail.com]
 *Sent:* Tuesday, March 10, 2009 3:23 AM

 *To:* user@geronimo.apache.org
 *Subject:* Re: JNDI in Geronimo 2



 Yes,  should be ejbd://localhost:4201. The same as the example in the 
 dochttp://cwiki.apache.org/confluence/display/GMOxDOC22/Deploying+and+running+EJB+application+clients
 .

 2009/3/10 Rex Wang rwo...@gmail.com

 Tang, I believe Russell use a remote client, but not a application client.

 to Russell, try ejbd://localhost:4201


 Rex.

 2009/3/10 Ying Tang yingtang1...@gmail.com



 Hi Russell,

 I suggest you use JDK 1.5 instead of 1.6. It is also recommended that
 Eclipse and Geronimo use the same Java environment.

 Please let me know if there is still any problem.

 Best Regards,

 Ying Tang

  2009/3/10 Russell Collins russell.coll...@mclaneat.com



 Thank you Tang.  This should be real strait forward but there has got to be
 some reason why this is not working.  Here is the configuration that I
 have.  This may help in solving this issue.



 Eclipse Ganymede

 Java 1.6..0_11

 Geronimo 2.1.2

 Geronimo 2.1.3 (tried it on both)



 There are a couple of other things that I tried that gave me different
 results.

 1.Added a runtime dependency to the Geronimo Runtime.  This gave me a
 different error.  It was a java runtime error that said that the response
 from the server is: -1

 2.Created a client j2ee application to run my app.



 Basically, I am following everything in that link that you sent me.  I am
 just getting these errors when trying to look up the object.  Any more
 insight would be greatly appreciated.





 *From:* Ying Tang [mailto:yingtang1...@gmail.com]
 *Sent:* Monday, March 09, 2009 11:21 PM
 *To:* user@geronimo.apache.org
 *Subject:* Re: JNDI in Geronimo 2



 Hi *Error! Filename not specified.*Russell,


 I tried your example on Geronimo 2.1.4.

 1. I renamed the implementation class  as FirstObjectBean.  A bit different
 from your code:
 ---

 @Stateless

 *public* *class* *FirstObjectBean* *implements* *FirstObjectRemote* {
 import

 *   public* *String* *hello*(*String* name){

   *return* Hello  + name;

}

 }
 ---

 2.  In the application client that referece the EJB, I used
 ---
 *import ejb.FirstObjectRemote;*
 ...
 *FirstObjectRemote* firstObject = (*FirstObjectRemote*)context.*lookup*(
 FirstObjectBeanRemote);
 ---
 3. Add the EJB project to the build path of the application client project.

 4. Add the two projects to the Geronimo server, and run the application
 client.

 The application works well and the Hello Russel message shows up.

 For more detailed information, please refer to:

 http://cwiki.apache.org/confluence/display/GMOxDOC22/Deploying+and+running+EJB+application+clients

 Hope this helps.


 Best Regards,

 Ying Tang  (Sophia)

 2009/3/9 Russell Collins russell.coll...@mclaneat.com

 Hello.  I am new to the list, new to EJB 3.0 and new to Geronimo 2.  I am
 pretty sure I understand all of the concepts but I am having an issue with a
 JNDI lookup in Geronimo.  I have created a Bean and it looks as follows.



 Interface:



 @Remote

 *public* *interface* *FirstObjectRemote* {

   *public* *String* *hello*(*String* name);

 }



 Class:



 @Stateless

 *public* *class* *FirstObject* *implements* *FirstObjectRemote* {




Re: JNDI in Geronimo 2

2009-03-10 Thread Rex Wang
BTW
you should add
repository\org\apache\openejb\openejb-client\3.0\openejb-client-3.0.jar
to your client's build path.


Rex

2009/3/11 Rex Wang rwo...@gmail.com

 Russell, could you provide the whole exception strack?

 I can not got your problem.

 here is my code:
 public class Client {
 public static void main(String[] args) throws Exception {

 try {
 Properties p = new Properties();
 p.setProperty(java.naming.factory.initial,
 org.apache.openejb.client.RemoteInitialContextFactory);
 p.setProperty(java.naming.provider.url,
 ejbd://localhost:4201);

 InitialContext context = new InitialContext(p);

 FirstObjectRemote obj= (FirstObjectRemote)
 context.lookup(FirstObjectBeanRemote);
 System.out.println(obj.hello(Rex));

 } catch (Exception e) {
 e.printStackTrace();
 }

 }
 }

 I try it with Tang's EJB code as follows:
 import javax.ejb.Stateless;
 @Stateless
 public class FirstObjectBean implements FirstObjectRemote{
 public String hello(String name){
   return Hello  + name;
}
 }


 import javax.ejb.Remote;
 @Remote
 public interface FirstObjectRemote {
 public String hello(String name);
 }



 Rex



 2009/3/11 Russell Collins russell.coll...@mclaneat.com

  Thank you Wang and Tang.  Here are the things that I have done.



 · Changed the JDK to version 1.5.0_6

 · Updated all of my classes to use this version of Java

 · Changed the provider url to ejbd://localhost:4201



 I get the error



 *java.lang.RuntimeException*: Invalid response from server: -1









 *From:* Ying Tang [mailto:yingtang1...@gmail.com]
 *Sent:* Tuesday, March 10, 2009 3:23 AM

 *To:* user@geronimo.apache.org
 *Subject:* Re: JNDI in Geronimo 2



 Yes,  should be ejbd://localhost:4201. The same as the example in the 
 dochttp://cwiki.apache.org/confluence/display/GMOxDOC22/Deploying+and+running+EJB+application+clients
 .

 2009/3/10 Rex Wang rwo...@gmail.com

 Tang, I believe Russell use a remote client, but not a application client.

 to Russell, try ejbd://localhost:4201


 Rex.

 2009/3/10 Ying Tang yingtang1...@gmail.com



 Hi Russell,

 I suggest you use JDK 1.5 instead of 1.6. It is also recommended that
 Eclipse and Geronimo use the same Java environment.

 Please let me know if there is still any problem.

 Best Regards,

 Ying Tang

  2009/3/10 Russell Collins russell.coll...@mclaneat.com



 Thank you Tang.  This should be real strait forward but there has got to
 be some reason why this is not working.  Here is the configuration that I
 have.  This may help in solving this issue.



 Eclipse Ganymede

 Java 1.6..0_11

 Geronimo 2.1.2

 Geronimo 2.1.3 (tried it on both)



 There are a couple of other things that I tried that gave me different
 results.

 1.Added a runtime dependency to the Geronimo Runtime.  This gave me a
 different error.  It was a java runtime error that said that the response
 from the server is: -1

 2.Created a client j2ee application to run my app.



 Basically, I am following everything in that link that you sent me.  I am
 just getting these errors when trying to look up the object.  Any more
 insight would be greatly appreciated.





 *From:* Ying Tang [mailto:yingtang1...@gmail.com]
 *Sent:* Monday, March 09, 2009 11:21 PM
 *To:* user@geronimo.apache.org
 *Subject:* Re: JNDI in Geronimo 2



 Hi *Error! Filename not specified.*Russell,


 I tried your example on Geronimo 2.1.4.

 1. I renamed the implementation class  as FirstObjectBean.  A bit
 different from your code:
 ---

 @Stateless

 *public* *class* *FirstObjectBean* *implements* *FirstObjectRemote* {
 import

 *   public* *String* *hello*(*String* name){

   *return* Hello  + name;

}

 }
 ---

 2.  In the application client that referece the EJB, I used
 ---
 *import ejb.FirstObjectRemote;*
 ...
 *FirstObjectRemote* firstObject = (*FirstObjectRemote*)context.*lookup*(
 FirstObjectBeanRemote);
 ---
 3. Add the EJB project to the build path of the application client
 project.
 4. Add the two projects to the Geronimo server, and run the application
 client.

 The application works well and the Hello Russel message shows up.

 For more detailed information, please refer to:

 http://cwiki.apache.org/confluence/display/GMOxDOC22/Deploying+and+running+EJB+application+clients

 Hope this helps.


 Best Regards,

 Ying Tang  (Sophia)

 2009/3/9 Russell Collins russell.coll...@mclaneat.com

 Hello.  I am new to the list, new to EJB 3.0 and new to Geronimo 2.  I am
 pretty sure I understand all of the concepts but I am having an issue with a
 JNDI lookup in Geronimo.  I have created a Bean and it looks as follows.



 Interface:



 

Recording resource consumption

2009-03-10 Thread James D Carroll
I've looked at the monitoring stuff in general and it seems to be geared
more towards a real time view of what going on.  That's fine, but I was
wondering if there is a feature in Geronimo that would log resource
consumption over a period time for a particular instance.

Bottomline, I need to be able to say to someone We installed your stuff
on our server and it consumed this much server resource, so you owe me
this much money.

Any pointers in the right direction for more reading and researching on
my part would be greatly appreciated.

Thanks!



Re: Recording resource consumption

2009-03-10 Thread David Jencks


On Mar 10, 2009, at 8:30 PM, James D Carroll wrote:

I've looked at the monitoring stuff in general and it seems to be  
geared
more towards a real time view of what going on.  That's fine, but I  
was

wondering if there is a feature in Geronimo that would log resource
consumption over a period time for a particular instance.

Bottomline, I need to be able to say to someone We installed your  
stuff

on our server and it consumed this much server resource, so you owe me
this much money.

Any pointers in the right direction for more reading and researching  
on

my part would be greatly appreciated.


The only thing I'm aware of is the monitoring console which IIUC can  
be arranged to store snapshots of resource consumption at configurable  
intervals.  Maybe you could peek into the database with your billing  
software :-)


IIRC the one in trunk (2.2) although not released has somewhat simpler  
code (based on jpa).


Otherwise you probably have to write something yourself although  
you might be able to leverage some jmx monitoring solution.


david jencks




Thanks!