[JBoss Portal] - Re: Management portlet improvements
by kbarfield
Delegated Administration ? Admins should be able to delegate administration at the portlet, portal page, or portal level to a role. In addition, they should be filter this administration by a user parameter, like department name.
Copy/Move ? Admins should be able to copy or move the setup of a portal page or portal to another location in the tree.
Navigation Setup ? There should be a way to setup the navigation portlet at the portal level, and have it default for all portal pages when they are created. The Admin can change this default navigation portlet. In addition, the renderers should be set to empty by default for navigation portlets.
Column layout ? The column layout for the portal page in the admin portlet should reflect the page layout (if there are two columns on the page, there should be two columns on the admin portlet for that page, and so on). The columns should be in the same order as they would be shown on the page.
Audit/History ? Show when the latest change to the page was made, and if it was done through the admin portlet (and if so by whom), or if it was done by deployment of a portlet.
Import/Export ? Import/Export parts of the tree to migrate between environments or for backup purposes.
Preview ? Allow the administrator to see/interact with the changed portal tree before making it ?live?.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4019049#4019049
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4019049
19Â years, 2Â months
[EJB 3.0] - NamingException: Could not dereference object - EJB 3.0 Stat
by htran_888
Hi All,
I am receiving the following error when trying to reference 2 Stateful Session beans (TransactionPersistenceContext & ExtendedPersistenceContext):
--------------------------------------------------------------------------------------
Distributing D:\Test\EJB3ex511-client\dist\EJB3ex511-client.jar to [org.jboss.deployment.spi.LocalhostTarget@13aaba1]
Deploying D:\Test\EJB3ex511-client\dist\EJB3ex511-client.jar
Deploying D:\Test\EJB3ex511-client\dist\EJB3ex511-client.jar
Applicaton Deployed
Operation start started
Operation start completed
run-deploy:
run-tool:
run-jar:
log4j:WARN No appenders could be found for logger (org.jboss.security.SecurityAssociation).
log4j:WARN Please initialize the log4j system properly.
no cabin should be null: null
Master Suite
1
1
3
Updating detached cabin instance with new bed count of 4
Finding cabin to see it has been updated with a merge() on server
new bed count is: 4
javax.naming.NamingException: Could not dereference object [Root exception is java.lang.reflect.UndeclaredThrowableException] at org.jnp.interfaces.NamingContext.getObjectInstanceWrapFailure(NamingContext.java:1150)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:705)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:587)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at ejb3ex511client.Main.main(Main.java:50)
Caused by: java.lang.reflect.UndeclaredThrowableException
at $Proxy1.createProxy(Unknown Source)
at org.jboss.ejb3.JndiProxyFactory.getObjectInstance(JndiProxyFactory.java:52)
--------------------------------------------------------------------------------------
Here are the codes for 1 Stateless (TravelAgentBean - pre-requisite) & 1 Stateful (TransactionPersistenceContextBean) session beans and a Client manipulating these beans:
@Stateless
| public class TravelAgentBean implements TravelAgentRemote
| {
| @PersistenceUnit(unitName="EJB3ex51") private EntityManagerFactory factory;
| @PersistenceContext(unitName="EJB3ex51") private EntityManager manager;
|
| public void createCabin(Cabin cabin)
| {
| manager.persist(cabin);
| }
|
| public Cabin findCabin(int pKey)
| {
| return manager.find(Cabin.class, pKey);
| }
|
| public void updateCabin(Cabin cabin)
| {
| manager.merge(cabin);
| }
@Stateful
| public class TransactionPersistenceContextBean implements TransactionPersistenceContextRemote
| {
| @PersistenceContext(unitName="titan", type=PersistenceContextType.TRANSACTION)
| private EntityManager manager;
|
| private Cabin cabin;
|
| public void setCabin(int pk)
| {
| cabin = manager.find(Cabin.class, pk);
| }
|
| public void updateBedCount(int newBedCount)
| {
| cabin.setBedCount(newBedCount);
| }
|
| @Remove
| public void remove()
| {
| }
| }
public static void main(String[] args) {
|
| try
| {
| Context jndiContext = getInitialContext();
| Object ref = jndiContext.lookup("travelagent.TravelAgentRemote");
| TravelAgentRemote dao = (TravelAgentRemote)ref;
|
| Cabin noCabin = dao.findCabin(1);
| System.out.println("no cabin should be null: " + noCabin);
|
| Cabin cabin_1 = new Cabin();
| cabin_1.setId(1);
| cabin_1.setName("Master Suite");
| cabin_1.setDeckLevel(1);
| cabin_1.setShipId(1);
| cabin_1.setBedCount(3);
|
| dao.createCabin(cabin_1);
|
| Cabin cabin_2 = dao.findCabin(1);
| System.out.println(cabin_2.getName());
| System.out.println(cabin_2.getDeckLevel());
| System.out.println(cabin_2.getShipId());
| System.out.println(cabin_2.getBedCount());
|
| System.out.println("Updating detached cabin instance with new bed count of 4");
| cabin_2.setBedCount(4);
| dao.updateCabin(cabin_2);
|
| System.out.println("Finding cabin to see it has been updated with a merge() on server");
| Cabin cabin_3 = dao.findCabin(1);
| System.out.println("new bed count is: " + cabin_3.getBedCount());
|
| ref = jndiContext.lookup("travelagent.TransactionPersistenceContextRemote");
| TransactionPersistenceContextRemote txBean = (TransactionPersistenceContextRemote)ref;
|
| Cabin fetchedCabin = dao.findCabin(1);
| int oldBedCount = fetchedCabin.getBedCount();
|
| System.out.println("Set up transaction persistence context stateful bean");
| txBean.setCabin(1);
| txBean.updateBedCount(5);
|
| fetchedCabin = dao.findCabin(1);
| System.out.println("Cabin bed count will still be " + oldBedCount + ": " + fetchedCabin.getBedCount());
|
| System.out.println("Set up extended persistence context stateful bean");
|
| ref = jndiContext.lookup("travelagent.ExtendedPersistenceContextRemote");
| ExtendedPersistenceContextRemote extendedBean = (ExtendedPersistenceContextRemote)ref;
|
| extendedBean.setCabin(1);
| extendedBean.updateBedCount(5);
|
| fetchedCabin = dao.findCabin(1);
| System.out.println("Cabin bed count will be 5: " + fetchedCabin.getBedCount());
|
| // cleanup
| txBean.remove();
| extendedBean.remove();
|
| }
| catch (javax.naming.NamingException ne)
| {
| ne.printStackTrace();
| }
| }
|
| public static Context getInitialContext()
| throws javax.naming.NamingException
| {
| return new javax.naming.InitialContext();
| }
I have tried to split the client into separate classes but the outcome is still the same.
I am running Netbeans 5.5, JBoss 4.0.5 AS on Windows XP platform.
I have struggled with this issue for many days after trying different method of deployment including using both sun-appserver-pe9.0 & JBoss 4.0.5 AS without success.
This exercise is from workbook (ex05_1), title EJB 3.0 by Bill Burke.
Any assistance would be very much appreciated.
Thanks,
Henry
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4019038#4019038
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4019038
19Â years, 2Â months