[Clustering/JBoss] - Best way to get master node (HASingletonDeployer with Barrie
by dmary
Hi all,
I'm using Jboss AS 4.05GA and I was wondering how to contact the master node in order to add new schedules on a ScheduleProvider.
I have 3 nodes in a Farm, and at one moment, there is only one node managing Schedules
See my conf:
<mbean code="com.myproject.business.mbean.MyDBScheduleProvider"
| name="com.myproject.business.mbean:service=MyDBScheduleProvider">
| <depends>com.myproject.business.mbean:service=MyScheduleManager</depends>
| <depends>com.myproject.business.mbean:service=TaskScheduler</depends>
| <depends >jboss:service=partition_prod</depends>
| <depends>jboss.ha:service=HASingletonDeployer,type=Barrier</depends>
| <depends>jboss.j2ee:module=lypsoEJB.jar,service=EJB3</depends>
| <attribute name="ScheduleManagerName">com.myproject.business.mbean:service=MyScheduleManager</attribute>
| <attribute name="DataSourceName">java:mysql-ds</attribute>
| <attribute name="SQLStatement">SELECT target, method_name, method_signature, start_date, period,
| repetitions, date_format FROM Schedule where start_date>NOW()</attribute>
| </mbean>
| <mbean code="com.myproject.business.mbean.TaskScheduler"
| name="com.myproject.business.mbean:service=TaskScheduler">
| <depends>jboss.j2ee:ear=lypso-0.5.9-SNAPSHOT.ear,jar=lypsoEJB.jar,name=WSListenerSessionBean,service=EJB3</depends>
| </mbean>
| <mbean code="com.myproject.business.mbean.MyScheduleManager"
| name="com.myproject.business.mbean:service=MyScheduleManager">
| <depends >jboss:service=partition_prod</depends>
| <attribute name="StartAtStartup">true</attribute>
| </mbean>
I saw on other post, that is possible to get all IP address of a farm with getting property "CurrentView" from service jboss:service=default_partition, and taking the first, which is normaly the master node.
Is it the right way on Jboss 4.05GA ?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4158916#4158916
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4158916
17 years, 10 months
[EJB 3.0] - Re: EntityManager Injection, Null Pointer Exception. (Sorry.
by jaikiran
anonymous wrote : HERE ARE THE CONSOLE OUTLINE WHEN I DEPLOY THE APPLICATION:
| 17:50:41,517 INFO [JmxKernelAbstraction] persistence.units:ear=surgeonfish.ear,jar=surgeonfish.jar,unitName=time_report_persistence_context
| 17:50:41,532 INFO [EJBContainer] STARTED EJB: com.atosorigin.utils.pojo.PrStaffHome ejbName: PrStaffHome
This line shows that the EJB has been properly deployed with the Entity manager dependency resolved.
anonymous wrote : WHEN I TRY IT I AM TAKING ERROR:
| ------------------------------------------------------------------------------
| 17:55:56,935 WARN [ExplodedJarVisitor] Exploded jar does not exists (ignored): file:../surgeonfish.jar
| 17:55:56,935 INFO [AnnotationBinder] Binding entity from annotated class: com.atosorigin.utils.pojo.PrGroups
| 17:55:56,951 INFO [EntityBinder] Bind entity com.atosorigin.utils.pojo.PrGroups on table pr_groups
| 17:55:56,951 INFO [AnnotationBinder] Binding entity from annotated class: com.atosorigin.utils.pojo.PrStaff
| 17:55:56,951 INFO [EntityBinder] Bind entity com.atosorigin.utils.pojo.PrStaff on table pr_staff
However this part of the log is strange. I don't know why the application/entities are being "redeployed" when you are accessing your application. What exactly do you do in this step? I mean how do you invoke the application? For some reason, the application is getting redeployed.
I see the following commented out portion in the EJB that you posted. Are you sure the class file that has been deployed also has this part commented?
anonymous wrote :
| /*
| EntityManagerFactory emf = Persistence.createEntityManagerFactory("time_report_persistence_context");
| EntityManager em = emf.createEntityManager();
| PrStaff instance1 = em.find(PrStaff.class, id);
| ---this lines working without any error...---
| */
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4158912#4158912
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4158912
17 years, 10 months
[JBossWS] - Re: Streaming webservices
by tommy.bergkvist
Unfortunately I am note the one who is responsible for the technical specifiaction. The transport should comply with a specified XSD and also various clients and servers (not only the ones I am implementing) should be able to communicate.
Also, the XML elements that are that large actually contains binary documents that the server is not required to understand. They should just be stored in an archive as base64 encoded strings.
I have tried to figure out how to solve this, but there does not seem to exist any implementation to handle streaming webservices with large XML elements. The one parser I have used which can handle this is Woodstox, but jboss does not support this, right? Maybe in the future?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4158908#4158908
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4158908
17 years, 10 months