[EJB 3.0] - Not injecting instanceId, no matching enc injector ...
by green_bean_1
I am trying to get a very simple field resource injection example to work. however, when i deploy the example, i get the following error in the log file.
15:26:44,644 WARN [ResourceHandler] Not injecting instanceId, no matching enc injector env/com.di.examples.ejb.StatelessLifecycleBean/instanceId found
any ideas?
thankx
| @Remote
| public class StatelessLifecycleBean implements HelloWorld {
| private static int instanceCount = 0;
|
|
| @Resource private Integer instanceId;
|
| private String instanceMessage;
|
| public StatelessLifecycleBean() {
| instanceId = ++instanceCount;
| instanceMessage = getClass().getSimpleName() + "-" + instanceId;
| }
|
| public String getMessage() {
| return instanceMessage;
| }
|
| ...
| <session>
| <ejb-name>StatelessLifecycle</ejb-name>
| <ejb-class>com.di.examples.ejb.StatelessLifecycleBean</ejb-class>
| <env-entry>
| <env-entry-name>instanceId</env-entry-name>
| <env-entry-type>java.lang.Integer</env-entry-type>
| <env-entry-value>5</env-entry-value>
| <injection-target>
| <injection-target-class>com.di.examples.ejb.StatelessLifecycleBean</injection-target-class>
| <injection-target-name>instanceId</injection-target-name>
| </injection-target>
| </env-entry>
| </session>
| ...
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4198116#4198116
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4198116
17 years, 4 months
[EJB 3.0] - Re: Possible Bug?
by green_bean_1
As for my platform, I am using jboss-5.0.0.GA on OS X 10.5.6 using JDK 1.5.0_16..
In regards to the comments / questions dealing with the mappedName v. name.. the example yields the same results whether I am using mappedName or name. in other words..
@EJB(name="javaEEApplication/HelloWorldStatelessBean/remote-com.di.examples.HelloWorld") HelloWorld helloWorld;
@EJB(name="javaEEApplication/StatelessLifecycle/remote-com.di.examples.HelloWorld") HelloWorld lifecycle;
@EJB(name="HelloWorldStatelessBean") HelloWorld helloWorldBean;
@EJB(name="StatelessLifecycle") HelloWorld lifecycleBean;
all resolve to the same exact EJB even though HelloWorldStatelessBean and StatelessLifecyle are two different beans..
i have tried many variations.. but still no success. it still appears that jboss is making the assumption that a business interface can be implemented by only one EJB.. however, in my example i have two beans implement the same business interface. each ejb has a specific (and different) implementation..
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4198111#4198111
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4198111
17 years, 4 months
[Clustering/JBoss] - Re: strace shows futex
by bstansberry@jboss.com
"mohitanchlia" wrote : Such a great explanation. Why don't I get this from docs :) I know it takes so much keep up with the docs.
http://www.jboss.org/file-access/default/members/jbossas/freezone/docs/Cl... is pretty close. :-) It lacks some of the implementation details of my post above; I'm currently redoing this guide for AS 5 so will think about adding that. Always a bit of a tradeoff; too much implementation detail and the concepts get lost, plus the implementation detail is changeable. And it's OSS, so the source is available.
anonymous wrote :
| So if I understand correctly, in above example if for some reason election policy choses Node D as master then the view will be {D,C} instead of {C,D}. Is there a way in JMX Console to see this kind of view.
Who the master is does not affect the service view; it remains {C, D} even if the election policy says D is the master.
Re: getting JMX Console info about the service view, you can access service view info via the jboss:service=DistributedReplicantManager,partitionName=DefaultPartition mbean. (Substitute your partition name for DefaultPartition if you configured something else, e.g. via the -g startup option). To use the mbean you need to know the name under which your service is registered. The "AllServices" mbean attribute lists them as a comma-delimited string. For an HASingletonController, by default it will be the the ObjectName of the controller mbean.
Once you know the service name you can paste it as a param to the lookupReplicantsNodeNames() operation. The result will be the service view in string form.
The DRM mbean also exposes a "isMasterReplica()" operation to which you pass the service name. Be cautious with this; it's a legacy operation from the days when the master was always the first node in the service view; all it does is tell you whether the current node is first in the service view.
You can go to the mbean for your HASingletonController itself; it will tell you if it is the master.
anonymous wrote : Also under the hoods does jgroup use NACKAK to do this kind of communication. Also are there different pings and FD to check Overall Cluster view and Service view.
Service views are maintained at a higher level via DRM telling HAPartition to do group RPCs. HAPartition uses JGroups to do that RPC. NAKACK comes into play in the sense that it ensures all members of the cluster receive the RPC and that they receive it in the correct order.
FD doesn't impact a service view directly, but it does have a big indirect impact, because a node can't be in a service view if it isn't also in the overall view. If JGroups suspects a node (e.g. due to not receiving FD heartbeat responses), the DRM gets a callback and that node is removed from all service views, and services interested in each service view get a callback telling them the service view changed.
anonymous wrote : Thanks again for educating me. It's hard to work with clusters when you don't know what exactly is going on.
Your best bet to understand in detail is to look at source code from http://anonsvn.jboss.org/repos/jbossas. Find the release you want under "tags"; most of the stuff relevant to this thread is in the "cluster" module under the root for the release.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4198103#4198103
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4198103
17 years, 4 months
Delivery reports about your e-mail
by Post Office
The original message was received at Mon, 22 Dec 2008 13:52:47 -0600 from lists.jboss.org [74.200.190.65]
----- The following addresses had permanent fatal errors -----
<jboss-user(a)lists.jboss.org>
----- Transcript of session follows -----
... while talking to lists.jboss.org.:
>>> RCPT To:<jboss-user(a)lists.jboss.org>
<<< 550 MAILBOX NOT FOUND
17 years, 4 months