[JBoss-dev] JSR77,88 and SingleJBoss

2002-01-02 Thread Michael Lu



Hi,

I'm working on a layer to provide invocation and asynchronous 
messaging supportfor EJBs inour project. Thisincludes EJB 
module discovery, registration and some initial bootstrapping. I was able to do 
it by implementing a MBean and register itto JMX server to 
receiveMBean registration notification and then look up 
thedeployment descripterattribute in EJBModule through MEJB. This 
worked before.Butafter I resyncedwith the latest CVS 
code,I realized some changes:

 After a hot re-deploy an EJB module, there is only one 
J2EEApplication MBean under SingleJBoss management domain registered for the 
re-deployed module.

My problem with that is only EJBModule MBean contains the 
deployment descriptor and nowthe EJBModule isgone :( (I found 
out if you restart JBoss server, it will come back: there 
will be 3 MBeans(one J2EEApplication, one EJBModule and one EJB) for each EJB 
deployed). The base class J2EEDeployedObjectfor J2EEApplication and 
J2EEModule/EJBModule in JSR 77 has defined a deploymentDescriptor attribute that 
should be available for a attribute lookup or method invocation through MEJB. 
The current implementation in JBoss providesDD only in EJBModule as an 
attribute.


I understand JSR 77 is only a information model andit 
came out late. Also it has left many spaces for developers to decide how to 
implement it, for example,like the one I have mentioned, howa 
deployed EJB module should be managed. The current implementationis very 
nice and after a bit hack I was able to getit work in my 
project.Some suggestions:

1.In ListenerRegistration.java, 
themEventTypeis hardcoded to be RMIalthough there are other 2 
types(JMS andPolling) available.If a constructorthat accepts a 
type param could be added would be nice.

2. In JMS client listener code, only remote listener is 
removed aftercalling removeNotificationListener, the local JMS listener is 
left running. This will cause JBossMQ complains client reset the queue 
connectionwhen client stopped. This can be easily fixed by adding a 
call to stop the queue when client stops.

3. As JSR88 has come out, I think maybe now it is a good time 
to consolidate all the deployment descriptors and configurationinformation 
and provide them through MEJBand/or DeploymentManager/Factory/whatever as 
ConfigBean atrun timefor hot deployment, all the DDs and 
configurations could be maintainedin a centralplaceas live 
java objects, with a gooddeployment frontend, maybe we don't need 
tomanually deal withall the DDs 
anymore...

Regards,
mlu


[JBoss-dev] Shutting down error

2001-11-26 Thread Michael Lu



Hi there,


I'm getting this error every time I shut down the server:(see 
below)

I guess the reason is the service shutting down order. Module 
jmx-ejb-adaptor.jar is the second to the last being deployed but is also almost 
the last being un-deployed when shutting down the whole 
server.Shouldn'tit be in the first round of undeployment 
whenshutting down? I can live with thiserror regardless, just a 
reminder...


23:00:42,923 INFO 
[org.jboss.deployment.J2eeDeployer#Default] Stopping module 
jmx-ejb-adaptor.jar23:00:42,933 INFO [org.jboss.ejb.ContainerFactory] 
Undeploying:file:/C:/jboss/jboss-3.0.0alpha/deploy/Default/jmx-ejb-adaptor.jar23:00:42,953 
ERROR [org.jboss.ejb.ContainerFactory] 
handleContainerManagementjavax.management.InstanceNotFoundException: Could 
not find Management:jndiName=ejb/jmx/ejb/Adaptorat 
org.jboss.system.ServiceController.stop(ServiceController.java:555)at 
org.jboss.system.ServiceController.undeploy(ServiceController.java:305)at 
java.lang.reflect.Method.invoke(Native Method)at 
com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)at 
com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)at 
org.jboss.ejb.ContainerFactory.handleContainerManagement(ContainerFactory.java:707)at 
org.jboss.ejb.ContainerFactory.undeploy(ContainerFactory.java:492)at 
org.jboss.ejb.ContainerFactory.undeploy(ContainerFactory.java:316)at 
java.lang.reflect.Method.invoke(Native Method)at 
com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)at 
com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)at 
org.jboss.deployment.J2eeDeployer.stopModule(J2eeDeployer.java:703)at 
org.jboss.deployment.J2eeDeployer.stopApplication(J2eeDeployer.java:660)at 
org.jboss.deployment.J2eeDeployer.stopService(J2eeDeployer.java:400)at 
org.jboss.system.ServiceMBeanSupport.stop(ServiceMBeanSupport.java:150)at 
java.lang.reflect.Method.invoke(Native Method)at 
com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)at 
com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)at 
org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:774)at 
$Proxy0.stop(Unknown Source)at 
org.jboss.system.ServiceController.stop(ServiceController.java:551)at 
org.jboss.system.ServiceController.undeploy(ServiceController.java:305)at 
org.jboss.system.ServiceController.shutdown(ServiceController.java:444)at 
java.lang.reflect.Method.invoke(Native Method)at 
com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)at 
com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)at 
org.jboss.system.Shutdown.shutdownServices(Shutdown.java:98)at 
org.jboss.system.Shutdown$1.run(Shutdown.java:63)