-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi ,
I am trying this example.
http://www.zkoss.org/smalltalks/jndi/
I am using ZK+EJB3+jboss5.1+mysql+netbeans .My /WEB-INF/jboss-web.xml file is descripe belllow.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE jboss-web PUBLIC "-//JBoss//DTD Web Service Reference 4.2//EN"
"http://www.jboss.org/j2ee/dtd/jboss-web_4_2.dtd">
<jboss-web>
<ejb-local-ref>
<ejb-ref-name>personLocalBean</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<local>demo.PersonBeanLocal</local>
<local-jndi-name>ZkEJB3Demo/PersonBean/local</local-jndi-name>
</ejb-local-ref>
</jboss-web>
----------------------------------------------------------------------------------------------------------------------------
Here I have mentioned : ''ejb-ref-type'
but when I am run this zk web client then I have found that :
Element type "ejb-ref-type" must be declared. @ vfszip:/C:/jboss-5.0.1.GA/server/default/deploy/DemoWeb.war/WEB-INF/jboss-web.xml[7,17]
Any one give me a idea ,how to solve this problem ?
-------------------------------------------------------------------------------------------------------------------------------------
Jboss server log status is following :ERROR
---------------------------------------------
Caused by: org.jboss.xb.binding.JBossXBException: Failed to parse source: Element type "ejb-ref-type" must be declared. @ vfszip:/C:/jboss-5.0.1.GA/server/default/deploy/DemoWeb.war/WEB-INF/jboss-web.xml[7,17]
------------------------------------------------------------------------------------------------------------------------------------
Hi masum
As the message say "ejb-ref-type" must be declared
You have to use a new tag of jboss config
Hi
Thanks your suggestion.
Hi jimmy,.. Integrating EJB with zk is (actually) exciting and convenient. I follow the instruction in http://www.zkoss.org/smalltalks/jndi/ and it works like a charm.
but i wonder that it doesn't work if I put the tag ' <?variable-resolver class="org.zkoss.zkplus.jndi.JndiVariableResolver" ?>' other than index.zul (zuls included after the index.zul)
fyi I am using MVC "apply" pattern go control zuls (GenericForwardComposer subclass).
the variable resolver only works on index.zul and its controller.
any idea?
Hi aktejo
<?variable-resolver class="org.zkoss.zkplus.jndi.JndiVariableResolver" ?> only can exist in one zul page
You can just put it on root page
hi ,
Every EJB3 has one local interface and Remote interface. local interface for same jvm .Remote interface for different jvm.
so, Interface using for client access to ejb session . but zkoss use @localbinding and @ remotebinding . I am not sure
when use localbinding with my zkapplication .
anyone give me a idea ?
Thanks
Masum
zkoss use @localbinding
what zk feature do you use?
hi
I am use EJB3 session bean in zkoss application .
OK, both two annotation are in EJB3,
You can refer to the following link
http://www.anyang-window.com.cn/ejb30-in-the-jndi-bindings-and-multi-channel-transmission/
I have weird zk variable resolver ejb binding behavior.
It works as usual when I didn't put zk.xml into classpath (WEB-INF/zk.xml)
But if i put zk.xml ( to set disable event thread false) the automatic binding only happend on index.zul. the other zul included after cannot find ejb reference from variable resolver.
fyi, I am using zk 5.0.5. this happend only when i deploy apps to websphere (8.0 - 8.5). it is ok on Glassfish.
Any idea ?
Asked: 2010-08-28 00:28:56 +0800
Seen: 1,668 times
Last updated: Dec 06 '12