[jboss-user] [EJB3] - Re: Unwanted deployments after migrating EJB3 app from JBoss 4.2.3 to 5.1.0
Csaba Toth
do-not-reply at jboss.com
Mon Nov 22 17:36:41 EST 2010
Csaba Toth [http://community.jboss.org/people/tothc] created the discussion
"Re: Unwanted deployments after migrating EJB3 app from JBoss 4.2.3 to 5.1.0"
To view the discussion, visit: http://community.jboss.org/message/572261#572261
--------------------------------------------------------------
Sure. The KeyManagerService is annotated, but it's not the implementation, it is the interface class. Here is KeyManagerService.java, it is in the keyserver-ejb-1.0.0.jar
package org.hiplab.simgap.ejb.service;
import javax.ejb.Remote;
import org.hiplab.simgap.ApplicationException;
import org.hiplab.simgap.model.Key;
@Remote
public interface KeyManagerService
{
public Key addKey(String sessionKey) throws ApplicationException;
public void deleteKey(String sessionKey, Long keyId) throws ApplicationException;
public Key getKey(String sessionKey, Long keyId) throws ApplicationException;
}
Is it a problem, if the implementation class (KeyManagerServiceBean.java) is also contained in the ejb-jar?
package org.hiplab.simgap.ejb.service;
import javax.ejb.Stateless;
import javax.interceptor.Interceptors;
import org.hiplab.simgap.ApplicationException;
import org.hiplab.simgap.context.Context;
import org.hiplab.simgap.ejb.BaseSpringInjectableBean;
import org.hiplab.simgap.ejb.SpringInjectionInterceptor;
import org.hiplab.simgap.model.Key;
@Stateless(name="KeyManagerService")
@Interceptors ({SpringInjectionInterceptor.class})
public class KeyManagerServiceBean extends BaseSpringInjectableBean implements KeyManagerService
{
private static final long serialVersionUID = -9052466924525425485L;
public Key addKey(String sessionKey) throws ApplicationException {
log.trace("In addKey method.");
Context.authenticate(sessionKey);
org.hiplab.simgap.service.KeyManagerService keyService = Context.getKeyManagerService();
return keyService.addKey();
}
public void deleteKey(String sessionKey, Long keyId) throws ApplicationException {
log.trace("In deleteKey method.");
Context.authenticate(sessionKey);
org.hiplab.simgap.service.KeyManagerService keyService = Context.getKeyManagerService();
keyService.deleteKey(keyId);
}
public Key getKey(String sessionKey, Long keyId) throws ApplicationException {
log.trace("In getKey method.");
Context.authenticate(sessionKey);
org.hiplab.simgap.service.KeyManagerService keyService = Context.getKeyManagerService();
return keyService.getKey(keyId);
}
}
Or do you see any unusual thing?
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/572261#572261]
Start a new discussion in EJB3 at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2029]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20101122/e342fdee/attachment.html
More information about the jboss-user
mailing list