[JBoss Seam] - Re: Application config file outside the EAR
by SmokingAPipe
I could do that, but isn't the app classpath all within the EAR? I want to be able to ship out an EAR file on a CD and have the sysadmin (who knows nothing about any of this stuff) be able to copy it into a directory and say, "I'm done".
My idea right now is to try to do this the JBoss Way. Not knowing exactly what the JBoss Way is, I'm trying to use an MBean so that config params could be set within the jmx console. That's how all the other services within JBoss are configured, so why not configure my application that way?
Turns out it was very easy to create an MBean that is visible within the JMX console, and to be able to get and set properties.
What I need to figure out now is how to make that mbean data persistent across server restarts. I'm Googling for that but any suggestions would be welcome.
Any other options? Is there some place within the JBoss directories where I could / should stash a properties file that is external to the EAR?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4075394#4075394
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4075394
18Â years, 10Â months
[JBoss Seam] - Re: NoSuchMethodFound createFullTextQuery()
by momochone11
Also, I also tried WITHOUT using Search.createFullTextSession() as suggested by documentation.. I have another method that looks like this and still end up with the same exception.
public List getSearchResults()
| {
| if(searchPattern == null)
| return null;
| if("".equals(searchPattern))
| {
| searchPattern = null;
| return getEntityManager().createQuery("select be from Location be order by date desc").getResultList();
| }
| Map boostPerField = new HashMap();
| boostPerField.put("identifier", 4f);
| String productFields[] = {
| "identifier"
| };
| QueryParser parser = new MultiFieldQueryParser(productFields, new StandardAnalyzer(), boostPerField);
| parser.setAllowLeadingWildcard(true);
| org.apache.lucene.search.Query luceneQuery = null;
| try
| {
| luceneQuery = parser.parse(searchPattern);
| }
| catch(Exception e) { }
| FullTextSession session = (FullTextSession)getEntityManager().getDelegate();
| org.hibernate.Query query = session.createFullTextQuery(luceneQuery, Location.class);
| return query.list();
| }
I am quite lost, I followed the example, and the jars are being loaded. I don't understand why it keeps on saying NoSuchMethodFound..
any help is appreciated!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4075389#4075389
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4075389
18Â years, 10Â months
[JBoss Seam] - NoSuchMethodFound createFullTextQuery()
by momochone11
Hello,
I am having some trouble integrating Hibernate Search into my app with Seam 2.0.
I have this method, its just copy and paste and modified abit from a Hibnerate test:
public void testSessionWrapper() throws Exception {
| FullTextSession s = Search.createFullTextSession((org.Hibernate.Session)getEntityManager().getDelegate());
| QueryParser parser = new QueryParser( "title", new StopAnalyzer() );
|
| Query query = parser.parse( "summary:noword" );
| Class[] abc = new Class[] {
| Location.class
| };
| FullTextQuery hibQuery = s.createFullTextQuery( query,abc);
| }
Everything COMPILES fine, but I keep on getting this exception when I try to actually search:
Caused by: java.lang.NoSuchMethodError: org.hibernate.search.FullTextSession.createFullTextQuery(Lorg/apache/lucene/search/Query;[Ljava/lang/Class;)Lorg/hibernate/Query;
| at com.mxnmedia.siteaudit.glue.SearchAction.getSearchResults(SearchAction.java:69)
I am using Hibernate Search Beta 4, when I deploy my app it SAYS its using Hibernate Search Beta4 , so it's using the right jar (or not?). I tried other beta versions and the deploy message does change (instead of saying using beta 4, it says uses beta #), but yet the same exception message when I search.
Can anyone help?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4075385#4075385
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4075385
18Â years, 10Â months
[JBoss Seam] - The zen of seamgen'd Home/EntityHome
by tynor
At the risk of being accused of not sufficiently using the source Luke, can someone explain how seamgen'd EntityHome's are intended to work?
Our project was bootstrapped with seamgen, but has taken on a life of its own. As we add new Entities, we need to add corresponding EntityHome's, but there are many things about the seamgen'd ones that are not obvious to us. Cutting/pasting blindly can be a dangerous thing, so we wish to understand why seamgen did what it did. To start:
* When will a getDefinedInstance() ever return non-null? I've never seen any of our wire() functions set any properties from a non-null getDefinedInstance() call.
* How are the various @In FooHome's that are refered expected to be initialized? When should we be calling their setId() functions (which seems to be the trigger for making getDefinedInstance() return non-null)
* What are the expectations from pages.xml to call wire()? What about when instantiating a class programatically? (ie. if I add a MyEntity findByName() function, should I be calling wire() and various setId() functions?
The only discussion I can find that explains some of this is the following, and it only says "what" is happening with respect to xxx-to-one properties, not why:
[url]http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4047589
[/url]
There are no comments on the Home / EntityHome classes that the seamgen'd classes use - perhaps once some of these questions are answered I can help write some.
Seam 1.2.1-GA
(though I've checked Seam 2.0.0-beta and don't see any docs for this there either).
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4075381#4075381
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4075381
18Â years, 10Â months