[JCA/JBoss] - How do I make a file available to a startup task - use a Res
by bobsmith
I have a WAR file containing an XML file and I have a singleton class that, on first access, opens the xml file and configures itself from it.
| org.xml.sax.InputSource is = new InputSource("http://localhost:8080/mywar/myfile.xml");
|
That was fine until I needed to perform a startup task that relied on information in the XML file. The problem being that mywar.war has not been deployed at the point the startup service executes. It seems that I cannot put a dependency in the startup service on mywar.war, I can only specify dependencies on other services, not on wars (I am using JBoss 3.2.6, so Barrier Control is not an option).
I though that perhaps I should write a ResourceAdapter that would provide access to my XML file, but this seems overkill and I'm not convinced it is the way to go.
Is there anyone out thee who has experienced the same dilemma, and could perhaps advise me on the way to address my problem?
- write my own ResourceAdapter implementation?
- use a freely available ResourceAdapter implementation?
- or perhaps there is a really obvious way that I am missing of making my XML file available to a startup task?
Many thanks for any help.
Bob
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3968455#3968455
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3968455
19 years, 7 months
[JBoss Seam] - Re: when and how does the seam create tables in the databas
by texan
I believe it is the following property (in bold) in the peristence.xml file (from the booking example):
<persistence>
| <persistence-unit name="bookingDatabase">
| <provider>org.hibernate.ejb.HibernatePersistence</provider>
| <jta-data-source>java:/bookingDatasource</jta-data-source>
| <properties>
| <property name="hibernate.hbm2ddl.auto" value="create-drop"/>
| <property name="hibernate.show_sql" value="true"/>
| <!-- These are the default for JBoss EJB3, but not for HEM: -->
| <property name="hibernate.cache.provider_class" value="org.hibernate.cache.HashtableCacheProvider"/>
| <property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.JBossTransactionManagerLookup"/>
| </properties>
| </persistence-unit>
| </persistence>
This actually bit me on butt when I first incorporated the seam setup into my existing project, as it dropped my tables and recreated them. Ouch - so mych for my test data! I learned that lesson pretty quickly.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3968454#3968454
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3968454
19 years, 7 months
[JBoss Portal] - Re: Page Title
by evl123
Good question,
I dug around and found the title is generated by the layout jsps
server\default\deploy\jboss-portal.sar\portal-core.war\layouts\generic
index.jsp
maximized.jsp
So quick and dirty is to replace that value
or
create a new layout id and clone and change the default set.
But a much nicer way would be to have a page title property
set in the deployment xml file.
deployment/page elment would have (optional)
page.title
deployment/portal should have a default
page.title (in case the page didn't define one)
This way you get flexible global portal title or individual page titles
This may already be doable, if someone could explain what objects are available in the layout jsps (e.g. how can one access Page properties?)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3968446#3968446
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3968446
19 years, 7 months