[EJB 3.0] - EJB3 Entity Bean, POJO, without annotations
by dendroid66
Hello,
I develop an application where the EJB3 is used.
According to some advises got from the net, POJO classes are used as entity beans and they contain some EJB3 annotations like @Entity, @Id, @GeneratedValue, @ManyToMany etc. The application server is JBOSS.
To manage and communicate with the server side, a web GUI was created.
It communicates with server by means of EJB3 interface (@Remote).
At the moment I'm introducing a web interface (webservice) for one of a server side interfaces.
Doing this I realized, that the output parameter (an entity bean (POJO)) hardly depends on all the packages that support all the annotations stuff that is used in it.
Therefore, the web service client must be aware of them (when it uses the POJO declaration for the unmarchalling).
My question is:
How is it possible to stay in the frame of the EJB3 model (beans, persisting) and get rid of annotations in POJO?
What is (if any) the standard practice for such a case? (POJO Inheritance, XML descriptions, etc...) ?
Merci.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4216133#4216133
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4216133
15 years, 10 months
[Security & JAAS/JBoss] - Re: JAAS login/logout behaviour
by abille
Hello Anil,
well, I introduced a server side method adminService.logout() doing the following operations:
public void logout() throws MalformedObjectNameException, NullPointerException, InstanceNotFoundException, MBeanException, ReflectionException {
final MBeanServer server = org.jboss.mx.util.MBeanServerLocator.locateJBoss();
final String jaasMgrName = "jboss.security:service=JaasSecurityManager";
final ObjectName jaasMgr = new ObjectName(jaasMgrName);
final Object[] params = { "myDomain" };
final String[] signature = { "java.lang.String" };
@SuppressWarnings("unused")
List users = (List) server.invoke(jaasMgr, "getAuthenticationCachePrincipals", params, signature);
server.invoke(jaasMgr, "flushAuthenticationCache", params, signature);
users = (List) server.invoke(jaasMgr, "getAuthenticationCachePrincipals", params, signature);
}
We called this method before the second login in the previous code. After a second test run with a not restarted server, we get the completly odd behaviour, that the first call in the adminService.logout() method to "getAuthenticationCachePrincipals" returns a list of
both "ln=admin,oce=org_A" and "ln=admin,oce=org_B".
After calling "flushAuthenticationCache" the second call to "getAuthenticationCachePrincipals" returns in fact a zero list.
But oddly this has no effect on the output on clientside ... it still returns wrongly two times the same principal name.
That is, whatever cache the "flushAuthenticationCache" flushes, it does not seem to be the cache where JBoss caches it's principals.
Also, a colleague of mine has remarked, that we can get a "SecurityAssociation", and the method SecurityAssociation.getPrincipal always returns the correct user, without any need to flush any cache.
However, if the sessionContext.getCallerPrincipal is wrong, are the roles correct?
Secondly, we do think that the client side code should not be aware of any need to call additional mehtods simply to flush a cache, which is an implementation detail on server side ...
Should we file a bug?
Regards,
abille
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4216129#4216129
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4216129
15 years, 10 months
[JBoss jBPM] - Custom HBM files.
by Toriton
Hi all,
i'm looking for an help ,about configuring new mapping resources for Hibernate in JBPM.
I'm using Jboss 4.2.2 GA and JBPM 3.3.1 GA with Oracle 10g.
There is any example on how configure a new hbm.xml to use for my persistance?.
I have some problems to create the PAR archive from eclipse because Eclipse seem have some problem to create output folders.
It ignore all xml files copying in the bin folder only the image process ,and the class files.
Ignoring gpd.xml -processdefinition.xml- all Hibernate configuration files.
I'm looking for some example to understand where my custom hbm.xml files need to be mapped and where they have to stay to be loaded correctly.
I tried adding them in the Hibernate.extra.cfg.xml, or directly in hibernate.cfg.xml, but the problem is that jbpm can't find the entity class mapped in the hbm.xml, in classpath. This is correct, the class is in the par archive, and is not deployed still.
Have to deploy par file and entity classes apart?
Any useful link will be appreciated :).
Thanks in advance.
T.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4216128#4216128
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4216128
15 years, 10 months
[Beginners Corner] - Re: your current Jboss evaluation
by Aldian_00
Ok thank you very much for the reply. In fact I either didn't know where to post this and I thought that the beginner section would probably be good since often, experienced user go in this section for helping beginners.
About the goal of this survey, it will help my company to choose its JEE platform. I don't know wether it will be published. On one hand it could be a good thing to see wether contributors of each project agree with the results and if they have corrections to propose. But I don't know wether my boss will think the same.
Here are some details of what we plan to do: We plan to use EJB3 to develop an NGOSS type software and to deploy it on a JEE platform like JBoss. Our software will use Web services to communicate with outdoor and be interfaced to a Network Management System to offer services such as fault management. So it is not a little application we plan to make. The choice of the application server will have consequences for years.
We won't have many clients on front end, but on back end, the NMS that will be interfaced with our app can contain hundred of equipements. So we are particulary interested in failover and load balancing capacities. What can you say about it?
And what do you think of the administration of the Jboss platform? Is it easy to manage?
Thank you very much!
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4216125#4216125
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4216125
15 years, 10 months