[JCA/JBoss] - Can I share connection pool among applications?
by jowizzle
I have 5 different instances of the same web application (to provide the service to 5 different clients). They all connect to the same oracle database, but they should each connect to a different schema. Currently I use a different datasource for each application, so my deployments look something like this:
app1.war, app1-ds.xml
app2.war, app2-ds.xml
...
app5.war, app5-ds.xml
I have a total of 550 allowable connections to oracle database, so I allow each to make up to 100 connections via the MaxSize attribute on the ManagedConnectionPool.
The problem is that app1 gets far more usage, and sometimes has surpasses that 100-connection limit, while the others rarely see more than 30 concurrent connections. Can I set up a single shared pool that has 550 max connections that all 5 applications can draw from?
I know that I can supply credentials to getConnection(..), but that would require a code change to my application. I read something very brief that I interpreted be a method for piggy-backing credentials from the app's login module. Or perhaps it was a misinterpretation.
In any case, I appreciate your suggestions and advice. Thanks!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4089398#4089398
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4089398
18 years, 6 months
[JBoss Messaging] - jms message sent to another cluster picked before transactio
by navjeetc
We have two separate JBoss clusters on the same machine. A stateless session bean method (transaction is enabled) on one cluster adds a domain object to the database and sends a message to the other cluster that indicates an event has occurred and the MDB (on the other cluster) goes to the database and reads the domain object just persisted. Looks like the MDB on the other machine is invoked before the session bean on the first machine commits the transaction, thereby reading the previously inserted data. We are using ClusteredXAConnectionFactory to send the message to the topic.
Is this expected behaviour or there is something wrong in the setup. I would expect the MDB on the other cluster not to execute onMessage() until the transaction on the sender side has committed.
We are using JBoss 4.2.1.GA and JBoss messaging 1.3.0.GA.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4089396#4089396
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4089396
18 years, 6 months
[JBoss Seam] - Re: #{conversationList} appears to be empty
by djfjboss
Many thanks for your suggestions. In the light of this I've modified the XHTML to:
<rich:panel rendered="true">
<s:link value="Begin conversation"
action="#{personAction.beginConversation}" />
 
<s:link value="End conversation"
action="#{personAction.endConversation}" />
<f:facet name="header">Conversations</f:facet>
<f:subview id="conversations">
<ui:repeat value="#{conversationList}" var="conv">
ID: <h:outputText value="#{conv.id}"></h:outputText>
Descr: <h:outputText value="#{conv.description}"></h:outputText>
</ui:repeat>
</f:subview>
</rich:panel>
and the 'begin conversation' method to the following abomination:
@Begin(join=true)
public String beginConversation() {
Conversation c = Conversation.instance();
boolean started = c.begin();
log.info("### begun a new conversation: " + started);
ConversationEntries entries = ConversationEntries.instance();
log.info("### Have " + entries.size() + " conversations");
Collection cce = entries.getConversationEntries();
Iterator it = cce.iterator();
while (it.hasNext()) {
ConversationEntry ce = (ConversationEntry)it.next();
log.info("### Conversation id: " + ce.getId() + ", descr: " + ce.getDescription());
}
return null;
}
The log file now has entries such as:
17:09:31,788 INFO [PersonActionImpl] ### Beginning conversation
17:09:31,788 INFO [PersonActionImpl] ### begun a new conversation: false
17:09:31,788 INFO [PersonActionImpl] ### Have 2 conversations
17:09:31,788 INFO [PersonActionImpl] ### Conversation id: 5, descr: null
17:09:31,788 INFO [PersonActionImpl] ### Conversation id: 9, descr: null
Originally I was only displaying the description - seeing that this is null I thought that might explain the absence of output (even though I have given my pages a description in pages.xml), however as you can see the id is not null but still no output!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4089395#4089395
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4089395
18 years, 6 months
[JBoss Portal] - Re: Is this a JBP 2.6.1 bug? (403 Error From Dashboard Link)
by gspillman
I am having the same problem, but NM-156's solution of ordering the login modules does not fix it.
I am using JBP 2.6.1 + JBoss AS 4.2.1 distribution, and am running it on Windows XP Pro.
Also using the NTLM login module from the http://jaaslounge.sourceforge.net project.
Here are the jar files added from JaasLounge to server\default\lib
jaaslounge-1.0.0RC1.jar
jcifs-1.1.11.jar
jcifs-ext-0.9.4.jar
Here is my server\default\deploy\jboss-portal.sar\conf\login-config.xml:
| <application-policy name="portal">
| <authentication>
| <login-module code="org.jboss.portal.identity.auth.IdentityLoginModule" flag="optional">
| <module-option name="unauthenticatedIdentity">guest</module-option>
| <module-option name="userModuleJNDIName">java:/portal/UserModule</module-option>
| <module-option name="roleModuleJNDIName">java:/portal/RoleModule</module-option>
| <module-option name="userProfileModuleJNDIName">java:/portal/UserProfileModule</module-option>
| <module-option name="membershipModuleJNDIName">java:/portal/MembershipModule</module-option>
| <module-option name="additionalRole">Authenticated</module-option>
| <module-option name="password-stacking">useFirstPass</module-option>
| </login-module>
|
| <login-module code="org.jaaslounge.ntlm.NtlmLoginModule" flag="required">
| <module-option name="debug">true</module-option>
| <module-option name="mode">JBoss</module-option>
| <module-option name="domain">DUMMYDOMAIN</module-option>
| <module-option name="host">WINNT-SVR-VM</module-option>
| <module-option name="additionalRole">Authenticated</module-option>
| </login-module>
|
| <login-module code="org.jboss.portal.identity.auth.SynchronizingLoginModule" flag="optional">
| <module-option name="synchronizeIdentity">true</module-option>
| <module-option name="synchronizeRoles">true</module-option>
| <module-option name="additionalRole">Authenticated</module-option>
| <module-option name="defaultAssignedRole">User</module-option>
| <module-option name="userModuleJNDIName">java:/portal/UserModule</module-option>
| <module-option name="roleModuleJNDIName">java:/portal/RoleModule</module-option>
| <module-option name="membershipModuleJNDIName">java:/portal/MembershipModule</module-option>
| <module-option name="userProfileModuleJNDIName">java:/portal/UserProfileModule</module-option>
| </login-module>
| </authentication>
| </application-policy>
|
Simply adding the jars from JaasLounge, and configuring login-config.xml will allow users to login using thier Windows Domain user and password. However, clicking on the Dashboard link produces the follow page:
HTTP Status 403 -
--------------------------------------------------------------------------------
type Status report
message
description Access to the specified resource () has been forbidden.
--------------------------------------------------------------------------------
JBossWeb/2.0.0.GA
I have also modified server\default\conf\jboss-log4j.xml to expose portal security messages using:
| <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
| <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
| <param name="Target" value="System.out"/>
| <param name="Threshold" value="TRACE"/>
|
| <layout class="org.apache.log4j.PatternLayout">
| <!-- The default pattern: Date Priority [Category] Message\n -->
| <param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [%c{1}.%M] %m%n"/>
| </layout>
| </appender>
| <category name="org.jboss.portal.security">
| <priority value="TRACE" />
| </category>
|
This produced the following lines when clicking on the Dashboard link:
TRACE [JACCPortalAuthorizationManager.checkPermission] hasPermission:uri=dashboard:/portal/user::action=portalobject::type=portalobject
TRACE [JACCPortalAuthorizationManager.checkPermission] hasPermission:result=false
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4089392#4089392
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4089392
18 years, 6 months
[JBoss Seam] - Re: Starting up Asynchronous Method at startup
by wiberto
I tried this approach and it works great. the only problem I'm seeing is that if I redeploy the EAR where the application is at after the AS is running I get a SAX error:
| Caused by: org.jboss.xb.binding.JBossXBException: Failed to create a new SAX parser
| at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.<init>(SaxJBossXBParser.java:96)
| at org.jboss.xb.binding.UnmarshallerImpl.<init>(UnmarshallerImpl.java:55)
| at org.jboss.xb.binding.UnmarshallerFactory$UnmarshallerFactoryImpl.newUnmarshaller(UnmarshallerFactory.java:96)
| ... 72 more
| Caused by: javax.xml.parsers.ParserConfigurationException: Feature 'http://apache.org/xml/features/xinclude' is not recognized.
| at org.apache.xerces.jaxp.SAXParserFactoryImpl.newSAXParser(Unknown Source)
| at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.<init>(SaxJBossXBParser.java:92)
| ... 74 more
|
If I do a clean load of the application by starting the AS then it works fine.
Any idea why? Is it trying to use a different SAX parser after it has started?
Thanks,
Jose
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4089391#4089391
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4089391
18 years, 6 months