Re: [JBoss-user] Connection Pooling
in JBoss.xml I define: resource-managers resource-manager res-class=org.jboss.ejb.deployment.JDBCResource res-nameoraclePool/res-name res-jndi-nameoraclePool/res-jndi-name /resource-manager /resource-managers in the java source code you can do like: protected Connection getConnection() throws SQLException { InitialContext initCtx = null; String aOraclePoolName = java:comp/env/jdbc/oraclePool; try { initCtx = new InitialContext(); DataSource ds = (DataSource) initCtx.lookup(aOraclePoolName); return ds.getConnection(); } } On Wed, 23 May 2001 21:30:31 -0700, Lan Nguyen wrote: *This message was transferred with a trial version of CommuniGate(tm) Pro* Hi Everyone; After you modify the jboss.jcml to include mbean code=org.jboss.jdbc.XADataSourceLoader name=DefaultDomain:service=XADataSource,name=OracleDS attribute name=PoolNameOracleDS/attribute attribute name=DataSourceClassorg.opentools.minerva.jdbc.xa.wrapper.XADataSourceImp l/attribute attribute name=URLjdbc:oracle:thin:@serverhostname:1521:ORCL/attribute attribute name=JDBCUserscott/attribute attribute name=Passwordtiger/attribute /mbean how do you access this connection pool in the client program?? ps - does any one have an example of a client program for connection pooling?? Thank -Lan ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] CMP and BLOBs
hi all, I would be thankfull if anyone advice me if it is possible to map byte[] to the BLOB field of DB? I'm going to use Oracle 8i, MSSQL or PostgreSQL any tips, samples or links to how to would be perfect. Thanks in advance, D
Re: [JBoss-user] CMP and BLOBs
re hi, For BMP beans if I using Oracle 8i BLOBs works fine. I'm interesting if anyone uses CMP for BLOBs storing. (not necessary Oracle) site http://wamoz.com/JDBC_and_Oracle_LOB.asp tells about the BMP way of data reading / writing. DD On Tue, 22 May 2001 16:04:23 +0200, Burkhard Vogel wrote: No, due to Oracle driver limitations. see http://wamoz.com/JDBC_and_Oracle_LOB.asp Burkhard - Original Message - From: Darius Davidavicius [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, May 22, 2001 3:20 PM Subject: [JBoss-user] CMP and BLOBs hi all, I would be thankfull if anyone advice me if it is possible to map byte[] to the BLOB field of DB? I'm going to use Oracle 8i, MSSQL or PostgreSQL any tips, samples or links to how to would be perfect. Thanks in advance, DD ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] Message Driven Beans test problem
Hi all, advice needed. I testing how the Mesage driven beans working and have the probems while deploying it. I have created test message driven bean according http://www.jboss.org/documentation/HTML/ch07s03.html description. When i deploying bean i getting exception: [Container factory] Deploying MDB [Container factory] Serious error in init: java.lang.NoClassDefFoundError: javax /ejb/MessageDrivenBean [Container factory] java.lang.Exception: java.lang.NoClassDefFoundError: javax/e jb/MessageDrivenBean [Container factory] at org.jboss.ejb.MessageDrivenContainer.init(MessageDriv enContainer.java:156) As i can see MessageDrivenBean.class is in the jar %JBOSS_HOME%\lib\ext\ejb2.0.jar I have testing with JBoss 2.1 and with JBoss 2.2.1 Thanks in advance, DD ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] OracleXADataSource, OracleXid, minerva...XADataSourceImpl
I using MinervaXADataSourceImpl and happy with it. (i was working on Oracle 816 and 815 ) When i started to work with JBoss I was trying Oracle data sources but i was getting errors when i was using BLOB fields and Forein Keys. DD Darius Davidavicius Living-Source http://www.living-source.com/team_employee.php3?e_id=9e_nextid=2 ICQ: 18325334 ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] JASS: Illegal access
Hi jboss-jaas gurus, please save my time :(( I just a hour ago downloaded the last JBoss version from CVS And after i run my cleint i do getting such log information: [EMailManager] Illegal access, principal=DDD method=create EMailManager is the SessionBean. I do using my writen DialogLoginModule implements LoginModule where in the boolean login() function i check login and password in my oracle DBs in my jboss.xml of this Session bean i have container-configurations container-configuration container-nameStandard Stateless SessionBean/container-name role-mapping-managerjava:/jaas/other/role-mapping-manager authentication-modulejava:/jaas/other/authentication-module /container-configuration /container-configurations in auth.conf (server) i have other { com.ls.dialog.util.JB.DialogLoginModule required db="java:/oraclePool" table="JBossUsersTable" name="UserName" password="UserPassword"; } Any suggestions why i getting Illegal access? It seems like in the file org.jboss.ejb.plugins.SecurityInterceptor.java realmMapping.doesUserHaveRole(principal, methodRoles) == false How i can set the Role for my client or maybe by default all roles are disabled? BTW With the version i took a month ago such configuration was working fine. Thanks in advance. DD Darius Davidavicius Living-Source http://www.living-source.com/team_employee.php3?e_id=9e_nextid=2 ICQ: 18325334 ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] Commit and Rollback in jboss
I dont think it is JBoss thing. i'm not common with postgresql but in oracle NEXTVAL is not rollbackable. I mean if you increase sequence it is way to rollback it. Its DB feature. DD On Mon, 26 Mar 2001 18:01:31 +0800, Ricky wrote: Hi all , I am using Linux6.1 , jBoss2.1 , Tomcat3.2.1 and jdk1.3 , postgresql. I have the code below in the stateless bean : I trying to rollback the transaction if there are existing sequence id in the table. However , the method did not rollback because when i check the sequence table , it will increment the sequence value. How to rollback the method below , anyone have any idea ? Thanks public void addProjectInfo(ProjectInfoJB projectinfojb) throws RemoteException, CreateException ,FinderException,UserException { System.out.println(projectinfojb.getProjectno()); if(isProjectNoExists(projectinfojb.getProjectno())){ try{ Connection conn = null; PreparedStatement ps = null; ResultSet rs = null; conn = this.getConnection() ; ps = conn.prepareStatement("Select NEXTVAL('userprojectinfo_seq') from userprojectinfo_seq"); rs = ps.executeQuery(); -- this will execute the sql statement but it should rollback if found same sequence id in the table if(rs.next()){ projectinfojb.setProjectid(rs.getInt("nextval")); } } catch(Exception ce){ ce.printStackTrace(); } projectinfohome.create(projectinfojb); } } ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user Darius Davidavicius Living-Source http://www.living-source.com/team_employee.php3?e_id=9e_nextid=2 ICQ: 18325334 ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user