[JCA/JBoss] - Re: Problem of accessing Oracle DS in JBOSS from a stand-alo
by weston.price@jboss.com
One more 'anti-pattern', actually, it's a bug IMO. When using the Remote data source code like the following can lead to a leak pretty quickly:
|
| try
| {
| Connection conn = DataSource.getConnection()
| PreparedStatement ps = conn.prepareCall("SomeSQL");
| ps.close();
|
| }catch(Exception e)
| {
|
| }
| finally
| {
|
| if(ps != null)
| ps.close();
|
| if(conn != null)
| conn.close();
|
| }
|
What ends up happening in this particular instance is that the first ps.close() actually removes the Statement from the internal map on the server side. At the second close attempt a SQLException is thrown (who knows why). As a result, the connection itself would never get closed in this case. This actually crept up on the TCK for Oracle10g and was causing all sorts of issues.
Yes, I know that to be 'truly' safe both the ps.close() and the conn.close() should be contained within their own try/catch/finally block but this is never a guarantee.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4038366#4038366
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4038366
19 years, 1 month
[JBoss Seam] - Re: Seam Conversation Should Be Flexible but NOT
by app4you@yahoo.com
Atleprange,
Yes, I did all of your mentioned methods. Otherwise, you think I could get it done :).
For tree component, I was using Apache Tree2. The weird thing is the combination of AJAX4JSF won't work well with the <h:commandLink>. I had to use <s:link> instead. Now for ending the a form's conversation when user clicks on a treenode or tab, I used <s:link propagation="end"> to close any form that is being opened that has conversation scope, which failed to end the current conversation sometimes. And BTW, each tab will have its own Tree2 navigation menu tree display as well.
For window conversation isolation, there wasn't any need for it but I knew that since each time the @Begin got call, it will create a new id across the application.
As far as my app requirements, some search form has to be in session, specially those that requires to display the conversationList stack, while other are just conversation scope.
Well, I can tell that I had fun implementing a full blown app using Seam. But I am a bit skeptical to recommend or use it again soon. Unless there is a solid sample app bundled with Seam download that has some type of complex interface layout, like the trees and tabs, that handles the conversations sufficiently.
Thank you.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4038362#4038362
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4038362
19 years, 1 month
[Security & JAAS/JBoss] - Problems with the Subject
by jhmjesus
It assumes this context:
1.One ejb jar with one X Stateless .
2.Another ejb jar with Y Stateless.
3.The Security Domain is the same for both.
Well, the login was made for client with user A. At this moment was performed one method of the X Stateless. In the sequence client perform another method in Y Stateless. The Subject is OK.
The client made the logout.
Now the client made the login with user B perform the same method in X Stateless. After this it executed the same method in Y Stateless. At this moment the Subject is of user A.
I'm using isValid(principal,credential,subject) SecurityAssociation method to retrieve the Subject. In my jboss-service.xml JAAS Security Manager configuration the attribute is DefaultCacheTimeout = 0 and DefaultCacheResolution = 0.
What's the problem??? Why the user A Subject still exists in the EJB Container after the first logout.
My environment:
-OpenSuSE Linux version 10.0
-JDK vesion 1.5.0_06
-JBoss-AS version4.0.4.GA
-EJB3 RC9FD+Patch.
Thaks a lot.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4038361#4038361
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4038361
19 years, 1 month
[JBoss Eclipse IDE (users)] - EJB 3.0 wizard and code/descriptors generation
by dkane
Dear colleagues,
I have some experience with WTP + WASCE app server, and now would like to move to JBoss IDE + JBoss AS in order to use EJB3.0 (not available in WASCE).
Both WTP and JBoss IDE are built over Eclipse. In WTP, XDoclet eliminated a lot of manual work when creating EJBs. I selected New..EJB with XDoclet support , then used a GUI wizard and got all 4 (5,6) Java classes for new bean auto-genetrated. As well as ejb-jar.xml and appserver-specific descriptors.
I know that EJB3.0 specification does not require so many interfaces/descriptors. This is already a step to simplicity for developers.
But what about convenient wizard for EJB3.0 in JBoss IDE ?
I was unable to plug XDoclet support into EJB3.0 project. I have attached xdoclet-1.2.3 , but there is nothing to create with XDoclet in New..EJB3.0 Project section. In New..EJB project there was "XDoclet" confuguration available, but not here.
So far I don't know EJB3.0 in deep, but I guess some descriptors should still exist in EJB3.0 module. Wizard generates the only file jndi.properties.
I have created a single session bean in auto-generated EJB3.0 project and wanted to add it to running JBoss 4.0.5 by "Add/remove projects". IDE said that there are no projects to add. Apparently, some descriptors are missing.
Then, I haven't found a way to generate code for entity bean in EJB3.0 project. "New..EJB3.0" path contains only EJB3.0 project, Message driven bean and Session bean.
Please let me know are any tutorials available for creating EJB3.0 module with all kinds of beans in JBoss IDE 2.0 beta and deploying them to JBoss AS 4.0.5.
Many thanks in advance.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4038360#4038360
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4038360
19 years, 1 month