Stax Developer Community

Developer Community

I successfully deployed a seam application to the stax cloud.
First i configured my seam app to run in Tomcat instead of JBoss and than i modified the stax deploy target to deploy the seam application:

http://chess.n2.staxapps.net/

I am working in the seam project directory and moved the stax build file this folder.

Views: 8

Comment

You need to be a member of Stax Developer Community to add comments!

Join Stax Developer Community

Daniel Murygin Comment by Daniel Murygin on March 12, 2010 at 10:58am
You can not post xml here...

tomcat/conf/context.xml:
[Context]
..
[Resource name="jdbc/chess" auth="Container" type="javax.sql.DataSource"
username="name"
password="pwd"
driverClassName="com.mysql.jdbc.Driver"
url="jdbc:mysql://ip:3306/db"
maxActive="5"
maxIdle="2"
validationQuery="Select 1" /]
..
[/Context]

stax-application.xml:
[stax-application]
..
[resource name="jdbc/chess" auth="Container" type="javax.sql.DataSource"]
[param name="username" value="schach" /]
[param name="password" value="pwd" /]
[param name="url" value="jdbc:stax://db" /]
[/resource]
..
[/stax-application]
Spike Washburn Comment by Spike Washburn on April 4, 2009 at 2:38pm
That path is described in the application.xml file as per the standard j2ee spec. If you don't want to change that path, just update the path in the application.xml file.
Daniel Murygin Comment by Daniel Murygin on April 4, 2009 at 2:18pm
In my application package stax-deploy.zip is a deploy folder. In standard ear files there is no folder like this.
Spike Washburn Comment by Spike Washburn on April 3, 2009 at 8:19am
Alexey, the application package that is deployed to Stax is a standard EAR file with an additional stax-application.xml file which sets up any stax-specific bindings (such as mapping datasources to stax databases). This stax-application.xml is the equivalent of the jboss-*.xml or sun-*.xml files you'd find from other appserver environments.

If you want to integrate stax deployment into your existing application, you'll need to package your app as an EAR file, and then you can use the Stax deploy ANT task to deploy your EAR file.

Please take a look at this wiki article for information about integrating Stax into an ANT-based build environment as it should provide you with insight into how to integrate Stax into your project.
Daniel Murygin Comment by Daniel Murygin on April 3, 2009 at 7:24am
First you should configure your app to run in a local tomcat-6 with a tomcat datasource. The datasource configuration from tomcat you have to add to stax-application.xml.

tomcat/conf/context.xml:

...

username="name"
password="pwd"
driverClassName="com.mysql.jdbc.Driver"
url="jdbc:mysql://ip:3306/db-name"
maxActive="5"
maxIdle="2"
validationQuery="Select 1" />
..


stax-application.xml:

..


..


Next step:
Create a stax-deploy.zip. content:

META-INF
+-application.xml
+- stax-application.xml
deploy
+-webapp.war (<- your application configured for tomcat-6)

Now you can deploy stax-deploy.zip with the stax-build.xml from stax sdk.
Alexey Kakunin Comment by Alexey Kakunin on April 3, 2009 at 3:39am
Daniel, hi! Looks very interesting. I'm currently looking for migrating my existed APP (JSF + Spring + Hibernate) into stax. Since this application is already exists - Stax templates is not an option for me (as well as stax templates is not supported JSF). So, I'm looking for any info, about what should be changed in existed WAR-configuration (data-source, anything else?) to make it possible to deploy and run it in Stax.

If you will able to share info it will be really helpful!
Spike Washburn Comment by Spike Washburn on April 2, 2009 at 2:02pm
Thanks for letting us know Seam works on Stax. I'm glad to see that JBoss to the time to make sure the the framework could be packaged up in a way that lets it run on any standard J2EE Web container.

Quick Links

Send Feedback

If you have any questions or feedback about Stax, please drop us a note.

© 2012   Created by Spike Washburn.

Badges  |  Report an Issue  |  Terms of Service