cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peeths <>
Subject read this: cocoon , ejb and jboss
Date Wed, 22 Jun 2005 10:18:47 GMT
hi all ,

read this , working on cocoon .

Integrating cocoon with jBoss
Download cocoon-war-2.1.7.war and then we have to
deploy that to the jboss server , to deploy that , we
started jboss server in standard mode and then copied
the cocoon war file to
/usr/local/jboss-4.0.0/server/standard/deploy/ folder
and in the server console we got the message saying
that the perticular war file is being deployed .Then
run the cocoon home page using
http://localhost:8080/cocoon-war-2.1.7/ .

Deploying ejb in cocoon
To  deployment ejb in cocoon you should have an ejb
container , so we have to integrate ejb with any
application server , here we are using jBoss server.
Here i'm using a js (java script ) file to invoke an
ejb client , i'm using the command 

   var query = new Packages.hibernate.logging.Query();

where hibernate.logging is the package and Query is
the bean's client , and Packages is the inbuilt
keyword for accessing packages. Then from the client
you can call the bean class as we normally calling the
bean. If you are using data base in the bean you have
to configure the cocoon.xconf file as 

 <jdbc logger="core.datasources.personnel"
      <pool-controller max="10" min="5"/>
 <jdbc name ="hibernatedbds">
  <pool-controller min = "5" max = "10" />

and in the bean calss we can access the database as 

public String xxxxxxx(String user, String
password,Session session) throws RemoteException

	if(session == null)
		System.out.println("Session is null");
	Transaction tx = session.beginTransaction();
	org.hibernate.Query q =  session.createQuery("from 
hibernate.logging.User as user where user.users =
:users and 	user.password = :passwords");
	List  list = q.list();
		return "false";
	catch(Exception e)
		System.out.println("Called EJB");
		return "true";

and in the client program we'll give 
String value = remote.Validate(user,password,session);

to access the remote method

when the program is ready and compiled create the jar
file and then deploy it to the deploy folder of jboss
and a copy od the same jar file to the
cocoon/WEB-INF/lib/. Then you can run the program .


How much free photo storage do you get? Store your friends 'n family snaps for FREE with Yahoo!

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message