[Installation, Configuration & Deployment] - Re: packaging a war file with struts 1.3.8 for jboss 4.0.4
by tb44
i try a solution but i have still a prblem (not same).
i build an ear file with contain :
* one file war
* 2 file jar
* struts file struts-2.0.6/lib/commons-beanutils-1.6.jar
struts-2.0.6/lib/commons-chain-1.1.jar
struts-2.0.6/lib/commons-logging.jar
struts-2.0.6/lib/commons-validator-1.3.0.jar
struts-2.0.6/lib/struts-core-1.3.5.jar
struts-2.0.6/lib/struts2-codebehind-plugin-2.0.6.jar
struts-2.0.6/lib/struts2-config-browser-plugin-2.0.6.jar
struts-2.0.6/lib/struts2-core-2.0.6.jar
struts-2.0.6/lib/struts2-jasperreports-plugin-2.0.6.jar
struts-2.0.6/lib/struts2-jfreechart-plugin-2.0.6.jar
struts-2.0.6/lib/struts2-jsf-plugin-2.0.6.jar
struts-2.0.6/lib/struts2-pell-multipart-plugin-2.0.6.jar
struts-2.0.6/lib/struts2-plexus-plugin-2.0.6.jar
struts-2.0.6/lib/struts2-sitegraph-plugin-2.0.6.jar
struts-2.0.6/lib/struts2-sitemesh-plugin-2.0.6.jar
struts-2.0.6/lib/struts2-spring-plugin-2.0.6.jar
struts-2.0.6/lib/struts2-struts1-plugin-2.0.6.jar
struts-2.0.6/lib/struts2-tiles-plugin-2.0.6.jar
* META-INF/application.xml
* META-INF/jboss-app.xml which is:
<jboss-app>
<loader-repository>orvault:loader=orvault.ear
<loader-repository-config>
java2ParentDelegation=false
</loader-repository-config>
</loader-repository>
</jboss-app>
i have also changed MANIFEST file for war package like this :
Manifest-Version: 1.0
Class-Path: ./struts-2.0.6/lib/struts-core-1.3.5.jar ./struts-2.0.6/lib/commons-beanutils-1.7.0.jar ./struts-2.0.6/lib/commons-logging-1.0.4.jar
it resolve the problem of ClassNotFound ActionServlet but now log jboss say this :
Caused by: org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException: Invalid class loader hierarchy. You have more than one version of 'org.apache.commons.logging.Log' visible, which is not allowed.
i try to remove commons-logging-1.0.4.jar from manifest, struts directory and also copy commons-logging file from server jboss but not efficient.
how can i manage to execute my ear application ?
thanks.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4039369#4039369
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4039369
19 years
[JBoss Seam] - Re: How To Cancel Update in Home Object
by gzoller
Carsten,
I think we're looking at the same problem from different angles. One desired behavior I'm looking for is the ability to cancel a data entry page w/o the changes popping up in the persistent state. I have one page in my app that does this just fine and one that (like yours) somehow persists and keeps the values I wanted to throw away upon cancel. I'll have to do a line-by-line comparison to figure out what the differences are.
The heart of my question is more about the ability to access a field's previous value prior to persisting it, for example in a Home object's update() method. Say for example in update() you'd like to take the difference between a field's old and newly set value and do something with the difference. How would you get the old value?
At the time update() is called the Entity's field has already been set in memory via setFoo(), so no help there. Aha, I thought---I can just hit the db with a query to temporarily pull back the previous value (the find() I show in my example code). But strangely the new value comes back from the query.
Here's what gets me: If I'm hitting the db from within the update() method the new value may exist in memory but hasn't (shouldn't) have been persisted until I call super.update(), right? So why am I getting the new value back? Hmm.
I'd love to know what others have done if they needed to compare old/new values of fields during setting or persisting. The only other thing I thought to try next is to save old values internally in the Entity (transiently of course) and hope that old value is still the last value set when update() is called.
Greg
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4039365#4039365
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4039365
19 years
[JBossCache] - Re: 2.0 and JMX
by bstansberry@jboss.com
In JBC 2.0, the cache no longer self registers; you have to do it manually. Basically, we recognized that JMX integration is really not a core function of the cache, and 1) should be done by external code that understands the JMX environment, and 2) should be extracted into a separate class.
What you should do is:
| Cache cache = createCache();
| MBeanServer mbs = getMBeanServer();
| mbs.registerMBean(new org.jboss.cache.jmx.CacheJmxWrapper(cache), monitorName);
|
CacheJmxWrapper exposes a property "registerInterceptors", which defaults to true. When you register the wrapper in JMX, it gets a callback from JMX (via MBeanNotification interface) and if registerInterceptors=true it will register mbeans for all the interceptors.
I haven't looked at this for a while, and it may not work yet, but you can also try this semi-hacky trick:
| Cache cache = createCache();
| MBeanServer mbs = getMBeanServer();
| mbs.registerMBean(new org.jboss.cache.jmx.CacheLegacyJmxWrapper(cache), monitorName);
|
(note use of CacheLegacyJmxWrapper).
CacheLegacyJmxWrapper actually exposes via JMX getters for a lot of the configuration options.
I'll defer to Manik as to whether he wants to expose getMembers().
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4039364#4039364
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4039364
19 years
[JBossWS] - Re: String[] with SOAP... Please help me!
by chui
"santhosh288" wrote : Hello Chui,
|
| Even I am facing the same issue with String[] as input parameter in my WS. Did you find any solution for this? Please let me know.
|
| Thanks,
| Santhosh
Hi, santhosh288 ! Unfortunately I didn't find a solution for this. =/ Watch this topic, if I find a solution I'll post it here, ok??
"kcp" wrote : Did you try to wrap the array in a another class?
Thanks, kcp, but this didn't function. I read a tutorial that suggested a class instead of String[], but I don't remember what was the error I found. Then I tried the automatic generation with WSTools and I got the files I posted before.
"thomas.diesler(a)jboss.com" wrote : Please have a look at the array tests in the testsuit
Sorry, but... Where can I find the testsuit?? Any URL or something like that?
---------------
Thank you all for the answers!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4039362#4039362
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4039362
19 years
[JBoss Seam] - Update entity in authenticate method
by twocoasttb
What is the correct way to update an entity in my authenticate method (called from Identity)? I want to update the user entity with a 'last connected' date. As far as I can tell, I have to handle the transaction manually, like this:
@Name("authenticator")
| public class Authenticator {
|
| @In
| EntityManager entityManager;
|
| @Out(scope=ScopeType.SESSION, required=false)
| SiteUser currentUser;
|
| @In(create=true) @Out
| SessionPreferences prefs;
|
| public boolean authenticate() {
| Query q = entityManager.createQuery("from SiteUser su where upper(username) = upper(:username) and password = :password and active = true");
| q.setParameter("username", Identity.instance().getUsername());
| q.setParameter("password", Identity.instance().getPassword());
| if (q.getResultList().size() == 1) {
| currentUser = (SiteUser)q.getSingleResult();
| prefs.setCurrentOrganization(currentUser.getOrganization());
| Identity.instance().addRole("admin");
|
| try {
| UserTransaction utx = Transactions.getUserTransaction();
| utx.begin();
| entityManager.joinTransaction();
| currentUser.setLastConnected(new java.util.Date());
| utx.commit();
| } catch (Exception e) {
| log.error("Exception updating user: " + e.getMessage());
| }
|
| return true;
| }
| return false;
| }
| }
Is there a better way to do it?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4039359#4039359
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4039359
19 years