[Beginners Corner] - JBoss with OSCache: Storing arraylist-formatted data, fetche
by rasor22
Hi To All,
I currently am a JBoss beginner and have a project which involves the following scenario (1 and 2 must all occur before JBoss is fully started).
1. I have to create a component that will call an MS SQL stored proc (sp). This sp will fetch a huge amount of structured data more than 200MB. Once this is fetched, the data will be formatted into an array list.
2. This 200MB+ arraylist-formatted data will be stored as a cache into oscache with a unique key. This all happens before the JBoss is completely started.
3. While the web server is in service and calls an action class method, the method will check for the oscache entry with the unique key. It must see that cache/key so it won't have to re-fetch that data and put it in a bean, since fetching the data and processing it within the action class entails processing time of 1.25 hours.
4. The cache entry is set as alive throughout the web application life span, so this must occur only during JBoss startup. This means binding the component within JBoss so the component will be able to see oscache static instance, perform the 1 and 2 process, and store the formatted data to oscache before JBoss is fully started.
I can create a java component to do this, but how will it be binded to JBoss making sure that the component can communicate to the oscache instance even before JBoss is fully started?
I know the info I gave may be incomplete, although I would like to add that this is a J2EE application with JBoss, MVC, JSP, JavaBeans, and Struts.
Thank you very much in advance for any help!
Ritchie
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4059517#4059517
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4059517
18Â years, 9Â months
[Clustering/JBoss] - Cluster Restart/Failover with EJB3 Stateless
by RedChili
Hello,
We are using a clustered JBoss environment with an EJB3 based application. The client application connects to multiple beans (one for every panel) and thus has multiple proxy interceptors.
Now we have tested failover with the following scenario:
3 JBoss Nodes forming one partition, from those 3 nodes we fail one or two (see steps below). On the Client Application we are only using two panels each using a different bean (resulting in two client proxy interceptors), and try to access the application server.
These are the steps taken in our test case:
| R.......JBoss Node is running and member of the partition
| S.......JBoss Node is stopped and not member of the partition
| P1,P2...Panels in the application (different client proxies)
| (#).....Number of connect try/request from the panel
| nr......requests weren't routed to that node (though they should I guess))
| if a column is blank no tries were made from that panel
|
| | JBoss 1 | JBoss 2 | JBoss 3 | Proxy Knowledge of Nodes
| | R | R | R |
| P1| OK (1) | OK (2) | OK (3) | 1,2,3
| P2| OK (1) | | | 1,2,3
| ---------------------------------
| | S | R | R |
| P1| - | OK (1,2)| - | 2,3 (updated with request)
| P2| | | | 1,2,3 (no update)
| ---------------------------------
| | R | R | R |
| P1| nr | OK (1,3)| OK (2,4)| 1,2,3 (updated with request)
| P2| | | | 1,2,3 (no update)
| ---------------------------------
| | R | S | R |
| P1| OK (1,2)| - | OK (3) | 1,3 (updated with request)
| P2| OK (1) | - | OK (2) | 1,3 (updated with request)
| ---------------------------------
| | R | R | R |
| P1| | OK (1) | | 1,2,3 (updated with request)
| P2| | | | 1,3 (no update)
| ---------------------------------
| | S | R | S |
| P1| | OK (1) | | 2 (updated with request)
| P2| | FAILED! | | 1,3 (no update possible!)
|
My conclusion is, as stated in the JBoss Cluster manual, that the panel 2 proxy (P2) doesn't get an cluster state update between only 1 and 3 running and only 2 running. Thus it still tries to contact 1 and 3 and fails. For this panel it looks like the whole cluster has been restarted and it can't recover from that.
Now the simple question is: Is there a similar technique to handle a cluster restart in EJB3 (as described here http://docs.jboss.com/jbossas/guides/clusteringguide/r2/en/html/cluster.c... for EJB2)?
Tanks,
Reinhard
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4059516#4059516
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4059516
18Â years, 9Â months
[JBoss Seam] - option values generated by s:selectItems
by chrismalan
The following html is generated:
<option value="0">admin</option>
| <option value="1">manager</option>
| <option value="2">user</option>
It should be this:
<option value="admin">admin</option>
| <option value="manager">manager</option>
| <option value="user">user</option>
This comes from the Role class which has an @Id annotation for the primary key, which is a String.
The code that produces the selectOneMenu looks like this:
<h:selectOneMenu value="#{role.name}" required="true" id="roleSelect">
| <s:selectItems value="#{roles}" var="role" label="#{role.name}" noSelectionLabel="Please Select..."/>
| <s:convertEntity />
| </h:selectOneMenu>
"role" is the name of the entity bean, or it can be the name of the factory specified in components.xml - I've tried both ways.
"roles" can either be an outjected List or the name of the query specified in components.xml. Again, I've tried both ways.
The option labels are always faithfully produced. It's the values...
This is what the relevant part of components.xml looks like when it is used:
<framework:entity-query name="roles" ejbql="select r from Role r order by r.name" />
| <framework:entity-home name="roleHome" entity-class="au.com.databaseapplications.persistence.Role" />
| <factory name="role" value="#{roleHome.instance}" />
|
I've looked at the ui examples, over and over. I've tried roleHome.instance.name instead of role.name in h:selectOneMenu value=
The results are the same.
Any idea how I can get the option values to be correctly generated?
This is Seam 1.2.1 on JBoss 4.2.0
Thanks,
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4059510#4059510
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4059510
18Â years, 9Â months