Re: [jboss-dev-forums] [JBoss AS7 Development] - Data Source Configuration in AS 7
by Rico Neubauer
Rico Neubauer [http://community.jboss.org/people/MrEasy] commented on the document
"Data Source Configuration in AS 7"
To view all comments on this document, visit: http://community.jboss.org/docs/DOC-16657#comment-6572
--------------------------------------------------
Example for an Oracle XA-datasource:
+<xa-datasource jndi-name="java:/MyDB" pool-name="MyDB" enabled="true" use-java-context="true">+
+ <xa-datasource-class>oracle.jdbc.xa.client.OracleXADataSource</xa-datasource-class>+
+ <xa-datasource-property name="URL">jdbc:oracle:thin:@server:1521:dbname</xa-datasource-property>+
+ <!-- HA: Oracle Specific methods to deal with connection problems -->+
+ <new-connection-sql>call DBMS_APPLICATION_INFO.SET_MODULE('MyApp ${bisas.pid}','MyDB')</new-connection-sql>+
+ <security>+
+ <user-name>MyUser</user-name>+
+ <password>MyPassword</password>+
+ </security>+
+ <!-- pooling parameters -->+
+ <xa-pool>+
+ <min-pool-size>5</min-pool-size>+
+ <max-pool-size>200</max-pool-size>+
+ <!-- uncomment to enable interleaving <interleaving/> -->+
+ <is-same-rm-override>false</is-same-rm-override>+
+ <!-- Oracles XA datasource cannot reuse a connection outside a transaction once enlisted in a global transaction and vice-versa -->+
+ <no-tx-separate-pools/>+
+ </xa-pool>+
+ <!-- timeout and expiry parameters -->+
+ <validation>+
+ <validate-on-match>false</validate-on-match>+
+ <background-validation-minutes>5</background-validation-minutes>+
+ <!-- Uses the pingDatabase method to check a connection is still valid before handing it out from the pool -->+
+ <!--valid-connection-checker-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleValidConnectionChecker</valid-connection-checker-class-name-->+
+ <!-- Checks the Oracle error codes and messages for fatal errors -->+
+ <exception-sorter class-name="org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter"></exception-sorter>+
+ </validation>+
+ <!-- TODO why is this not working? It should comply with the schema+
+ <time-out>+
+ <blocking-timeout-millis>60000</blocking-timeout-millis>+
+ <idle-timeout-minutes>15</idle-timeout-minutes>+
+ </time-out>+
+ -->+
+ <statement>+
+ <prepared-statement-cache-size>20</prepared-statement-cache-size>+
+ <!-- Whether to monitor for unclosed Statements and ResultSets and issue warnings when the user forgets to close them (default nowarn).+
+ Use nowarn for production and true for testing -->+
+ <track-statements>nowarn</track-statements>+
+ </statement>+
+</xa-datasource>+
--------------------------------------------------
13 years, 4 months
[JBoss ESB Development] - Stuck in BRMS
by starfish15
starfish15 [http://community.jboss.org/people/starfish15] created the discussion
"Stuck in BRMS"
To view the discussion, visit: http://community.jboss.org/message/602414#602414
--------------------------------------------------------------
Hello every1,
I am doing the needful with the BRMS after coding and learning JBoss ESB. However i am stuck terribly in the same. I did the following
* Unzipped the brms-deployable-5.1.0.zip
* Next unzipped the jboss-brms-manager
* Placed the jboss-brms.war at *D:\JBoss SOA\jboss-soa-p.5.0.0\jboss-as\server\default\deploy\*
* In the properties-service.xml file, added *drools.serialization.sign=false* at attribute *Properties* like mentioned below
<attribute name="Properties">
drools.serialization.sign=false
</attribute>
* Next at *D:\JBoss SOA\jboss-soa-p.5.0.0\jboss-as\server\default\deploy\jboss-brms.war\WEB-INF,* added the following in components.
* <security:role-based-permission-resolver enable-role-based-authorization="true"/>*
* Then on a web browser tried hitting http://localhost:8080/jboss-brms/
* The Login Page asking the User Name and Password came up
* Tried logging in using admin/admin for both
* Pop -Up saying incorrect username and password came up.
Also someone told me to do this "uncomment the user and roles settings in the configuration. Check the conf/props and open the brms-users.properties and brms-groups.properties files." Now the catch is i am unable to find both these files absolutely anywhere within the server folder in jboss-as of jboss-soa-p.5.0.0.
Kinldy assist at the earliest and do let me know if i am mistaken absolutely anywhere.
Regards,
Starfish
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/602414#602414]
Start a new discussion in JBoss ESB Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 4 months
[JBoss AS7 Development] - Unable to use com.sun.jndi.ldap.LdapCtxFactory
by Matt Drees
Matt Drees [http://community.jboss.org/people/matt.drees] created the discussion
"Unable to use com.sun.jndi.ldap.LdapCtxFactory"
To view the discussion, visit: http://community.jboss.org/message/608523#608523
--------------------------------------------------------------
Hi all,
My project has a piece that needs to read from our ldap. My code looks something like this:
public DirContext createLdapContext()
{
Properties env = new Properties();
env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory");
...
return new InitialDirContext(env);
}
However, it appears the ModuleClassLoader won't load the com.sun.jndi.ldap.LdapCtxFactory:
...
Caused by: javax.naming.NamingException: Failed instantiate InitialContextFactory com.sun.jndi.ldap.LdapCtxFactory from classloader ModuleClassLoader for Module "deployment.ccp.war:main" from Service Module Loader
at org.jboss.as.naming.InitialContextFactoryBuilder.createInitialContextFactory(InitialContextFactoryBuilder.java:58) [jboss-as-naming-7.0.0.Beta4-SNAPSHOT.jar:7.0.0.Beta4-SNAPSHOT]
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:664) [:1.6.0_24]
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288) [:1.6.0_24]
at javax.naming.InitialContext.init(InitialContext.java:223) [:1.6.0_24]
at javax.naming.InitialContext.<init>(InitialContext.java:197) [:1.6.0_24]
at javax.naming.directory.InitialDirContext.<init>(InitialDirContext.java:82) [:1.6.0_24]
at org.ccci.ccp.security.LdapContextProducer.createLdapContext(LdapContextProducer.java:59) [classes:]
... 65 more
In digging some, I found the "jboss.modules.system.pkgs" property, and it looks like i could set this to "com.sun.jndi.ldap" and this exception should go away. Is this the right way to address this?
Thanks!
-Matt
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/608523#608523]
Start a new discussion in JBoss AS7 Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 4 months